Question: The backwards Euler difference operator is given by:
Nhyn = [(yn − yn−1)/ hn] − f(tn, yn)
For differential equation y′ = f(t, y). Determine the order of the local truncation error. Explain why this difference operator is consistent.
Question: Consider the Van der Pol oscillator
x′′ − µ(1 − x2)x′+ x = 0
(a) Write this equation as a system of first order equations.
(b) Taking µ = 2, use MatLab’s routine ode45 to compute the solution for the initial value problem x(0) = 0 and x′(0) = 5 from t = 0 to t = 40. Plot x as a function of t and also plot x vs x′ in phase-space.
(c) Repeat for the initial conditions x(0) = 0 and x′(0) = 0.01.
(d) What is the fixed point of the system? Use your numerical results to argue what the long time behavior of the system is.
Question: Consider the differential equation give by:
y′ = −10(y − sin t)
(a) Derive by hand exact solution that satisfies the initial condition y(0) = 1.
(b) Numerically obtain the solution to the IVP using Forward Euler with a step size of h = 0.1 from t = 0 to t = 3. Print the value of the approximate solution at time t = 3. Also plot the exact solution (with a solid line) and the approximate solution (with square markers) on the same plot.
(c) Numerically determine the relative global error,
eh =|1 − yh(3)/y(3)|
of your approximate solution at t = 3 when h = h, h/2, h/4, h/8 and h/16. Plot the log of the relative error vs. the log of the spacing h.
Explain why this verifies your scheme is convergent to order 1.