Find y(0.5) for `y'=-2x-y`, `x_0=0, y_0=-1`, with step length 0.1 using Taylor Series method (first order differential equation) Solution:Given `y'=-2x-y, y(0)=-1, h=0.1, y(0.5)=?`
Here, `x_0=0,y_0=-1,h=0.1,x_n=0.5`
Differentiating successively, we get
Derivative steps
`d/(dx)(-2x-y)`
`=-d/(dx)(2x)-d/(dx)(y)`
`=-2-y'`
Now, `d^2/(dx^2)(-2x-y)=d/(dx)(-2-y')`
`=-d/(dx)(2)-d/(dx)(y')`
`=-0-y''`
`=0-y''`
`=-y''`
Now, `d^3/(dx^3)(-2x-y)=d/(dx)(-y'')`
`=-y'''`
`y'=-2x-y`
`y''=-2-y'`
`y'''=-y''`
`y^(iv)=-y'''`
Now substituting, we get
`y_0'=-2x_0-y_0=1`
`y_0''=-2-y_0'=-3`
`y_0'''=-y_0''=3`
`y_0^(iv)=-y_0'''=-3`
Putting these values in Taylor Series, we have
`y_1 = y_0 + hy_0' + h^2/(2!) y_0'' + h^3/(3!) y_0''' + h^4/(4!) y_0^(iv) + ...`
for `n=0,x_0=0,y_0=-1`
`=-1+0.1*(1)+(0.1)^2/(2)*(-3)+(0.1)^3/(6)*(3)+(0.1)^4/(24)*(-3)+...`
`=-1+0.1-0.015+0+0+...`
`=-0.9145`
`x_1=x_0+h=0+0.1=0.1`
Now substituting, we get
`y_1'=-2x_1-y_1=0.7145`
`y_1''=-2-y_1'=-2.7145`
`y_1'''=-y_1''=2.7145`
`y_1^(iv)=-y_1'''=-2.7145`
Putting these values in Taylor Series, we have
`y_2 = y_1 + hy_1' + h^2/(2!) y_1'' + h^3/(3!) y_1''' + h^4/(4!) y_1^(iv) + ...`
for `n=1,x_1=0.1,y_1=-0.9145`
`=-0.9145+0.1*(0.7145)+(0.1)^2/(2)*(-2.7145)+(0.1)^3/(6)*(2.7145)+(0.1)^4/(24)*(-2.7145)+...`
`=-0.9145+0.0715-0.0136+0+0+...`
`=-0.8562`
`x_2=x_1+h=0.1+0.1=0.2`
Now substituting, we get
`y_2'=-2x_2-y_2=0.4562`
`y_2''=-2-y_2'=-2.4562`
`y_2'''=-y_2''=2.4562`
`y_2^(iv)=-y_2'''=-2.4562`
Putting these values in Taylor Series, we have
`y_3 = y_2 + hy_2' + h^2/(2!) y_2'' + h^3/(3!) y_2''' + h^4/(4!) y_2^(iv) + ...`
for `n=2,x_2=0.2,y_2=-0.8562`
`=-0.8562+0.1*(0.4562)+(0.1)^2/(2)*(-2.4562)+(0.1)^3/(6)*(2.4562)+(0.1)^4/(24)*(-2.4562)+...`
`=-0.8562+0.0456-0.0123+0+0+...`
`=-0.8225`
`x_3=x_2+h=0.2+0.1=0.3`
Now substituting, we get
`y_3'=-2x_3-y_3=0.2225`
`y_3''=-2-y_3'=-2.2225`
`y_3'''=-y_3''=2.2225`
`y_3^(iv)=-y_3'''=-2.2225`
Putting these values in Taylor Series, we have
`y_4 = y_3 + hy_3' + h^2/(2!) y_3'' + h^3/(3!) y_3''' + h^4/(4!) y_3^(iv) + ...`
for `n=3,x_3=0.3,y_3=-0.8225`
`=-0.8225+0.1*(0.2225)+(0.1)^2/(2)*(-2.2225)+(0.1)^3/(6)*(2.2225)+(0.1)^4/(24)*(-2.2225)+...`
`=-0.8225+0.0222-0.0111+0+0+...`
`=-0.811`
`x_4=x_3+h=0.3+0.1=0.4`
Now substituting, we get
`y_4'=-2x_4-y_4=0.011`
`y_4''=-2-y_4'=-2.011`
`y_4'''=-y_4''=2.011`
`y_4^(iv)=-y_4'''=-2.011`
Putting these values in Taylor Series, we have
`y_5 = y_4 + hy_4' + h^2/(2!) y_4'' + h^3/(3!) y_4''' + h^4/(4!) y_4^(iv) + ...`
for `n=4,x_4=0.4,y_4=-0.811`
`=-0.811+0.1*(0.011)+(0.1)^2/(2)*(-2.011)+(0.1)^3/(6)*(2.011)+(0.1)^4/(24)*(-2.011)+...`
`=-0.811+0.0011-0.0101+0+0+...`
`=-0.8196`
`x_5=x_4+h=0.4+0.1=0.5`
`:.y(0.5)=-0.8196`
| `n` | `x_n` | `y_n` | `y_n'` | `y_n''` | `y_n'''` | `y_n^(iv)` | `x_(n+1)` | `y_(n+1)` |
| 0 | 0 | -1 | 1 | -3 | 3 | -3 | 0.1 | -0.9145 |
| 1 | 0.1 | -0.9145 | 0.7145 | -2.7145 | 2.7145 | -2.7145 | 0.2 | -0.8562 |
| 2 | 0.2 | -0.8562 | 0.4562 | -2.4562 | 2.4562 | -2.4562 | 0.3 | -0.8225 |
| 3 | 0.3 | -0.8225 | 0.2225 | -2.2225 | 2.2225 | -2.2225 | 0.4 | -0.811 |
| 4 | 0.4 | -0.811 | 0.011 | -2.011 | 2.011 | -2.011 | 0.5 | -0.8196 |
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then