Solve Differential Equation with Euler's Method

Click For Summary
SUMMARY

The discussion focuses on solving the differential equation $$\frac{dy}{dt} = -\lambda t y(t)$$ with the initial condition $$y(0) = y_0$$ using both explicit and implicit Euler methods. Participants clarify the definitions of the damping coefficient and the stability conditions for the explicit method, emphasizing the importance of selecting appropriate values for the time step $$\Delta t$$ and the damping coefficient $$\lambda$$. The explicit method results in $$y_{k+1} = y_k(1 - \Delta t \lambda t)$$ while the implicit method yields $$y_{k+1} = \frac{y_k}{1 + \Delta t \lambda t}$$. Stability limits for the explicit method are discussed, with a noted failure at $$\Delta t = 0.501$$ and a critical stability limit around $$\Delta t = 0.32$$.

PREREQUISITES
  • Understanding of differential equations, specifically first-order linear equations.
  • Familiarity with numerical methods, particularly Euler's method.
  • Knowledge of stability analysis in numerical methods.
  • Basic understanding of damping coefficients in the context of differential equations.
NEXT STEPS
  • Study the stability criteria for Euler's method in numerical analysis.
  • Learn about the Runge-Kutta methods for solving differential equations.
  • Explore the implications of varying the damping coefficient $$\lambda$$ on the solution stability.
  • Investigate the error analysis between numerical solutions and exact solutions for differential equations.
USEFUL FOR

Students and professionals in mathematics, engineering, and physics who are working with differential equations and numerical methods for solving them.

youcef
Messages
8
Reaction score
0
Hi evry body
i would like to have an help to resolve this exercice below
the followin differential equation with its initial condition
dy/dt=-lambda t y(t) t>=0
avec y(0)=y0
where lambda is damping coeficient strictly positive.
-find the solution of this equation with Euler's explicite and implicite methode
-find analytically the values of h in order to euler methode (explicite) being applicable and obviously stable ( lim IynI=0 where n --->infini .and find the superior borne of time lag h according lambda>0
thanks
warmest Regards
 
Physics news on Phys.org
Hello youcef, bienvenu a PF :smile: !

$${dy\over dt } = - \lambda \, t \, y(t) \\
y(0) = y_0$$ is what you want to solve ? Or have to solve (in that case it should be in the homework section!)

Or is it ## -\lambda(t) \, y(t) ## or is it just ##- \lambda \, y(t)## ?

What would make ##\lambda## a damping coefficient ? (I am used to damping coefficients in forms like ##{d^2y\over dt^2 } = - \lambda \, { dy\over dt}\ ## so I thought I'd better ask first.)
 
  • Like
Likes youcef
BvU said:
Hello youcef, bienvenu a PF :smile: !

$${dy\over dt } = - \lambda \, t \, y(t) \\
y(0) = y_0$$ is what you want to solve ? Or have to solve (in that case it should be in the homework section!)

Or is it ## -\lambda(t) \, y(t) ## or is it just ##- \lambda \, y(t)## ?

What would make ##\lambda## a damping coefficient ? (I am used to damping coefficients in forms like ##{d^2y\over dt^2 } = - \lambda \, { dy\over dt}\ ## so I thought I'd better ask first.)
Thanks
$${dy\over dt } = - \lambda \, t \, y(t) \\
y(0) = y_0$$
 
OK, so let's get started on the first part: for Euler explicit you get $$ { y_{k+1}-y_k\over \Delta t} = -\lambda \, t \, y_k $$ and for Euler implicit you have to solve $$
{ y_{k+1}-y_k\over \Delta t} = -\lambda \, t \, y_{k+1}
$$to get ##y_{k+1} ## as a function of ##y_k##, ## t##, and ##\Delta t##.

Agree ?

--
 
Thanks BvU .I Agree.let's continue
 
Well, where do you have a problem when you do continue ?
 
  • Like
Likes youcef
Wow, I don't follow. Is this for explicit Euler ?
So how do you come from $$
{ y_{k+1}-y_k\over \Delta t} = -\lambda \, t \, y_k
$$ to your ...(1) ? I don't see a square appearing at all !
 
BvU said:
Wow, I don't follow. Is this for explicit Euler ?
So how do you come from $$
{ y_{k+1}-y_k\over \Delta t} = -\lambda \, t \, y_k
$$ to your ...(1) ? I don't see a square appearing at all !
sorry
for implicite method yk+1=yk/(1+Δtλt)
for explicit
yk+1=yk(1-Δtλt)
 
What happened to your post ? If you edit it away completely, no one else can follow the thread later on !

for implicit method yk+1 = yk / (1 + Δt λ t )
for explicit yk+1 = yk (1 - Δt λ t )
Good. Any further problems ? If not then part one is ready ?
 
  • Like
Likes youcef
  • #10
BvU said:
What happened to your post ? If you edit it away completely, no one else can follow the thread later on !Good. Any further problems ? If not then part one is ready ?
you are very kind .yes no problem.let's go to second part
 
  • #11
IF part 1 is ready, then what does your solution look like ? Any differences between implicit and explicit methods ?
Do you know the error both methods give when compared to the exact solution ?
What choices of delta t and lambda did you make ? I tried lambda = 0.5 and delta t up to 0.5 (0.501 went bang for the explicit Euler...)

But in fact the stability limit is exceeded a lot earlier. 0.32 also crashes
 
  • #12
BvU said:
IF part 1 is ready, then what does your solution look like ? Any differences between implicit and explicit methods ?
Do you know the error both methods give when compared to the exact solution ?
What choices of delta t and lambda did you make ? I tried lambda = 0.5 and delta t up to 0.5 (0.501 went bang for the explicit Euler...)

But in fact the stability limit is exceeded a lot earlier. 0.32 also crashes
i don't understand what do you mean.is that is wrong solution
 
  • #13
So far, I haven't seen your solution of the differential equation, so I don't know...
 
  • #14
good morning
so anyone can't resolve it?
 
  • #15
youcef said:
good morning
so anyone can't resolve it?
I don't understand. How far are you really with part 1? What results do you have to show ? See questions in post #11
 
  • #16
BvU said:
nderstand. How far are you really with part 1? What results do you have to show ? See question
I have no idea if yes i do it by my self.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K