Show a quiver plot in the (t,y) plane of the differential equation dy/dt = sin(y+t) over the region 0 ≤ t ≤ 2pi and -pi ≤ y ≤ pi. Use Matlab's ode45 function to compute solution curves y(t) for each of the following initial conditions, and superimposed the solution curves on the quiver plot in the indicated colors y(0) = -1 in red, y(0) = 0 in blue , y(0) = 1 in black. Be sure to set the axes tight around the quiver plot, set the unit length of the axes to be equal, label the axes, and title the graph.
(a) The van der Pol oscillator is defined by the second-order differential equation
This second-order equation can be converted to a system of two first-order equations by letting y be a 2-d vector
Use this definition of the vector to produce a quiver plot of the van der Pol oscillator in the plane for , over the range and . Using Matlab's ode45, compute solution curves for the five different initial values and , and superimpose them on the quiver plot in red.
Hint: put the call to ode45 inside a for loop that sets the value of to the five different initial values.
(b) Put your work for part (a) in a script file, and run the script for a range of values of between -1 and 1. How does the character of the solutions of the equation change as passes through 0? Turn in plots for a negative, zero, and a positive value of , whichever values you think best illustrate the change as passes through zero.
Hint: To avoid the need to change the value of in both the script and the function file that defines , define as an anonymous function within your script file, so that it inherits the of the script file.