Numerical analysis

  • #1

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!
 

Answers and Replies

  • #2
HallsofIvy
Science Advisor
Homework Helper
41,833
964

Homework Statement



Consider the equation
y0 = Ly; y(0) = 1:
**L = lamda**
Surely this isn't what you meant. Did you mean y'= Ly?

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!
 
  • #3
yes that is what i meant, sorry, working on this for a long time... kinda burnt out
 

Related Threads on Numerical analysis

  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
8
Views
2K
  • Last Post
Replies
2
Views
901
Replies
0
Views
1K
  • Last Post
Replies
3
Views
2K
Replies
2
Views
1K
Top