Find y(0.5) for `y'=-2x-y`, `x_0=0, y_0=-1`, with step length 0.1 using Taylor Series method (1st order derivative) 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''''=-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''''=-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'''' + ...`
`=-1+0.1*(1)+(0.1)^2/(2!)*(-3)+(0.1)^3/(3!)*(3)+(0.1)^4/(4!)*(-3)+...`
`=-1+0.1-0.015+0+0+...`
`=-0.9145`
Again taking `(x_1,y_1)` in place of `(x_0,y_0)` and repeat the process
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''''=-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'''' + ...`
`=-0.9145+0.1*(0.7145)+(0.1)^2/(2!)*(-2.7145)+(0.1)^3/(3!)*(2.7145)+(0.1)^4/(4!)*(-2.7145)+...`
`=-0.9145+0.0715-0.0136+0+0+...`
`=-0.8562`
Again taking `(x_2,y_2)` in place of `(x_1,y_1)` and repeat the process
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''''=-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'''' + ...`
`=-0.8562+0.1*(0.4562)+(0.1)^2/(2!)*(-2.4562)+(0.1)^3/(3!)*(2.4562)+(0.1)^4/(4!)*(-2.4562)+...`
`=-0.8562+0.0456-0.0123+0+0+...`
`=-0.8225`
Again taking `(x_3,y_3)` in place of `(x_2,y_2)` and repeat the process
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''''=-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'''' + ...`
`=-0.8225+0.1*(0.2225)+(0.1)^2/(2!)*(-2.2225)+(0.1)^3/(3!)*(2.2225)+(0.1)^4/(4!)*(-2.2225)+...`
`=-0.8225+0.0222-0.0111+0+0+...`
`=-0.811`
Again taking `(x_4,y_4)` in place of `(x_3,y_3)` and repeat the process
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''''=-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'''' + ...`
`=-0.811+0.1*(0.011)+(0.1)^2/(2!)*(-2.011)+(0.1)^3/(3!)*(2.011)+(0.1)^4/(4!)*(-2.011)+...`
`=-0.811+0.0011-0.0101+0+0+...`
`=-0.8196`
`:.y(0.5)=-0.8196`
| `n` | `x_n` | `y_n` | `y_n'` | `y_n''` | `y_n'''` | `y_n''''` | `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