I was given the following second-order differential equation, y <mrow class="MJX-TeX

Leland Morrow

Leland Morrow

Answered question

2022-06-24

I was given the following second-order differential equation,
y + 2 y + y = g ( t ) ,
and that the solution is y ( t ) = ( 1 + t ) ( 1 + e t ). Using the solution I determined that
g ( t ) = t + 3.
Following from this I transformed this second-order differential equation into a system of first-order differential equations, which is
( x 1 x 2 ) = ( 0 1 1 2 ) ( y y ) + ( 0 t + 3 )
Now I want to perform a single step with Δ t = 1 starting from t=0 with the Forward Euler method and after that with the Backward Euler method. Firstly with the Forward Euler method I use:
w n + 1 = w n + Δ t f ( t n , w n )
and I compute w 0 as
w 0 = ( y ( 0 ) y ( 0 ) ) = ( 2 1 )
so therefore
w 1 = ( 3 0 )
Now I want to perform the Backward Euler method.
w n + 1 = w n + Δ t f ( t n + 1 , w n + 1 )
so
w 1 = ( 2 1 ) + ( 0 1 1 2 ) w 1 + ( 0 4 )
From which i get
w 1 = 1 4 ( 11 3 )
y two results seems to be quite differnt and that gets me to believe that I have made a mistake somewhere. Could someone let me know if they believe this to be correct, or why this could be wrong?

Answer & Explanation

Bruno Hughes

Bruno Hughes

Beginner2022-06-25Added 24 answers

Note that the second is ( 2.75 , 0.75 ) T . Your results are not that different for a step size of Δ t = 1 and a Lipschitz constant L between 2 and 3. This setup is on the border between barely useful and chaotic, you want L Δ t smaller 1.5 for results that are qualitatively valid, and smaller 0.1 for results that begin to be quantitatively valid.
If you want to get a better intuition of that, repeat the calculation with smaller step sizes 0.5, 0.25, 0.1 (and the correspondingly increased step number) and observe that the error shrinks roughly linearly in the step size.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Differential Equations

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?