Euler's method produces mirrored solution?

44 Views Asked by At

I have the differential equation $$ 0.22y'' + y' + 10000y = 2000\pi \cos (2000 \pi t) $$

from this I get the Euler's method system of equations: $$ t_{n+1} = t_n + 0.001 $$ $$ x_{n+1} = x_n + 0.001\left(\frac{2000\pi \cos(2000\pi t) - 10000y_n-x_n}{0.22}\right) $$ $$ y_{n+1} = y_n + 0.001x_n $$

and using Microsoft Excel to fill a spreadsheet with approximations using the Excel equations

t_n $\text{=B3+0.001}$

x_n $\text{=C3+0.001*(2000*PI()*COS(2000*PI()*B3)-10000*D3-C3)/0.22}$

y_n $\text{=D3+0.001*C3}$

where the initial conditions are B3=0, C3=1/0.22 and D3=0, and then obviously dragging down so the cell references update each time.

Plotting this data with Excel shows

enter image description here

while the true solution is mirrored, where the amplitude starts off high and slowly dampens.

Where am I going wrong in Euler's method.

1

There are 1 best solutions below

2
On

It is a linear equation, you can compute the exact solution quite easily... $$ y(t)=\sin (213.201 x) (0.0110345 \sin (6069.98 x)+0.0103102 \sin (6496.39 x))+\cos (213.201 x) (-0.0110345 \cos (6069.98 x)+0.0103102 \cos (6496.39 x)+4.54618) $$

In fact, there will be no dampening.