This problem concerns the IVP involving the Bernoulli equation
where(0) = 1. You are to solve this problem using the trapezoidal and RK4 methods.
(a) Verify that the exact solution is
Also, determine the value of
from the initial condition.
(b) Assuming
= 0.01, on the same axes plot the exact and the two numerical solutions for 0 ≤
≤ 3 in the case of when
= 80.
(c) Redo (b) for
= 20,
= 40, and
= 160 (there should be one graph for each
). If one of the methods is unstable you can exclude it from the plot (for that value of
) but make sure to state this in your write-up.
(d) Plot the max error
∞
, defined in (7.44), as a function of
for each method, using
= 40, 80, 160, 320, 640. The two curves should be in the same log-log plot.
(e) Compare the two methods based on your results from parts (b)–(d). This includes ease of use, speed of calculation, accuracy of results, and apparent stability.