Beruflich Dokumente
Kultur Dokumente
1.2
Euler
0.8 Exact
Mod-Euler-double step size
y
0.6
0.4
0.2
0
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2
x
Prob.: dy/dx=Ay/(1+Bx) ; at x=0, y=1.0 ; Find y vs. x
Numerical Solutions:
Let dy/dx=f(x,y) , w be the approximation to y
Step Size: h x0= 0 y0= 1
Sol.. w|o=a
k1=hf(x|i,w|i)
k2=hf(x|i+h/2, w|i+k1/2) w is a dummy name for y
k3=hf(x|i+h/2, w|i+k2/2)
k4=hf(x|(i+1), w|i+k3) A= -0.9 B= 2
w|(i+1)=w|i+(k1+2k2+2k3+k4)/6 h= 0.4
i x w k1 k2 k3 k4 y (exact) % Error