Numerical Analysis: Solving y0 = Ly; y(0) = 1 w/ Methods I & II

Click For Summary
SUMMARY

The discussion focuses on solving the differential equation y' = Ly with the initial condition y(0) = 1, where L represents a constant (lambda). Two numerical methods are proposed for approximating the solution at y(1): Method I (explicit Euler method) and Method II (Heun's method). The truncation errors for both methods are computed, revealing that Method II is more accurate. The convergence of both methods is analyzed, particularly with L set to -1000 and h equal to 0.1, leading to a comparison of the plotted results for both methods against the analytical solution y(t) = e^(Lt).

PREREQUISITES
  • Understanding of ordinary differential equations (ODEs)
  • Familiarity with numerical methods for solving ODEs
  • Knowledge of truncation error analysis
  • Experience with plotting functions in a programming environment
NEXT STEPS
  • Study the explicit Euler method for solving ODEs
  • Learn about Heun's method and its advantages over the Euler method
  • Explore truncation error analysis in numerical methods
  • Practice plotting functions using Python's Matplotlib or similar tools
USEFUL FOR

Students and professionals in mathematics, engineering, or computer science who are working on numerical analysis and require a deeper understanding of solving differential equations using numerical methods.

proplaya201
Messages
14
Reaction score
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!
 
Physics news on Phys.org
proplaya201 said:

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

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
2K
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 14 ·
Replies
14
Views
3K
Replies
1
Views
2K