BACKGROUND
Higher order differential equations solved in Matlab require an initial condition. That means having an
initial value of both the function and some of its derivatives. This is called an Initial Value Problem (IVP).
However, as you likely learned in Math 238, differential equations are defined in other ways. Boundary
Value Problems (BVP) instead define the differential equation by specifying the function's value at
multiple points. For example
y" = y' cos(y)
y(0) = 1, y(10) = 2
Using what we've learned so far, we can't solve this. Our initial condition for the numerical method
requires y(0) and y'(0). We have y(0), but not y'(0). But why don't we just guess y'(0)?
If we make a guess for y'(0), we could solve the differential equation from t = [0,10]. If y(10) happens
to be 2, we guessed correctly. If not, we could try to modify our guess to get a better result.
We have already learned a numerical method for exactly this type of problem. Root finding!
THE PROBLEM
Use the secant root-finding method to find the appropriate initial condition to the BVP
y" = y' cos(y)
y(0) = 1, y(10) = 2
And plot the solution y(t). This graph should be build using ode45, and it should start at y = 1 and end
at y = 2.
Fig: 1