- #1
proplaya201
- 14
- 0
Homework Statement
Consider the equation
y0 = Ly; y(0) = 1:
**L = lamda**
Verify that the solution to this equation is y(t) = e^(Lt). We want to solve this equation numerically to obtain an approximation to y(1). Consider the two following methods to approximate
the solution to this equation:
Method I: y_(n+1) = y_(n) + hf(y_(n+1); t_(n+1))
Method II:y_(n+1) = y_(n) +(h/2)*(f(y_(n); t_(n)) + f(y_(n+1); t_(n+1)))
(a) Compute the truncation error for both methods. Which one is more accurate?
(b) i was able to do this one!
(c) Obtain an expression for y_(n+1) as a function of y0 for methods I and II.
(d) Using the expressions obtained in the previous part, compute lim (as n goes to inf) y_(n)
(Remember: h = 1/n).
(e) In view of the results in the previous part, do the methods converge?
(f) Assume that h = :1, and L = -1000. Plot y0, y1, y2, y3, and y4 for both
methods. Plot the function y(t) = e^(Lt). In view of these plots, which method performs
better?
i am just soo lost when it comes to solving this problem. i have idea how to approach it. any help with this will be greatly appreciated!