Given: -2 d + 2y = e²t Sin t, 0
(a)
let dy/dt=z
Given y′′=2z-2y+e2xsin(x),y(0)=-0.4,y′(0)=-0.6,h=0.1,y(0.3)=?
put dydx=z and differentiate w.r.t. x, we obtain d2ydx2=dzdx
We have system of equations
dy/dt=z=f(t,y,z)
dz/dt=2z-2y+exp(2t)sin(t)=g(t,y,z)
Euler method for second order differential equation
y1=y0+hf(t0,y0,z0)=-0.4+(0.1)⋅f(0,-0.4,-0.6)=-0.4+(0.1)⋅(-0.6)=-0.4+(-0.06)=-0.46
z1=z0+hg(t0,y0,z0)=-0.6+(0.1)⋅g(0,-0.4,-0.6)=-0.6+(0.1)⋅(-0.4)=-0.6+(-0.04)=-0.64
y2=y1+hf(t1,y1,z1)=-0.46+(0.1)⋅f(0.1,-0.46,-0.64)=-0.46+(0.1)⋅(-0.64)=-0.46+(-0.064)=-0.524
z2=z1+hg(t1,y1,z1)=-0.64+(0.1)⋅g(0.1,-0.46,-0.64)=-0.64+(0.1)⋅(-0.2381)=-0.64+(-0.0238)=-0.6638
y3=y2+hf(t2,y2,z2)=-0.524+(0.1)⋅f(0.2,-0.524,-0.6638)=-0.524+(0.1)⋅(-0.6638)=-0.524+(-0.0664)=-0.5904
∴y(0.3)=-0.5904
Step by step
Solved in 2 steps