Solve Differential Equation with Euler's Method

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.
 
Back
Top