2. Example-2
2. Find y(0.5) for `y'=-2x-y`, y(0) = -1, with step length 0.1 using Taylor Series method
Solution: Given `y'=-2x-y, y(0)=-1, h=0.1, y(0.5)=?`
Here, `x_0=0,y_0=-1,h=0.1`
Differentiating successively, we get `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's 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.0005+0+...`
`=-0.91451`
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.71451`
`y_1''=-2-y_1'=-2.71451`
`y_1'''=-y_1''=2.71451`
`y_1''''=-y_1'''=-2.71451`
Putting these values in Taylor's 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.91451+0.1*(0.71451)+(0.1)^2/(2!)*(-2.71451)+(0.1)^3/(3!)*(2.71451)+(0.1)^4/(4!)*(-2.71451)+...`
`=-0.91451+0.07145-0.01357+0.00045+0+...`
`=-0.85619`
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.45619`
`y_2''=-2-y_2'=-2.45619`
`y_2'''=-y_2''=2.45619`
`y_2''''=-y_2'''=-2.45619`
Putting these values in Taylor's 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.85619+0.1*(0.45619)+(0.1)^2/(2!)*(-2.45619)+(0.1)^3/(3!)*(2.45619)+(0.1)^4/(4!)*(-2.45619)+...`
`=-0.85619+0.04562-0.01228+0.00041+0+...`
`=-0.82246`
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.22246`
`y_3''=-2-y_3'=-2.22246`
`y_3'''=-y_3''=2.22246`
`y_3''''=-y_3'''=-2.22246`
Putting these values in Taylor's 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.82246+0.1*(0.22246)+(0.1)^2/(2!)*(-2.22246)+(0.1)^3/(3!)*(2.22246)+(0.1)^4/(4!)*(-2.22246)+...`
`=-0.82246+0.02225-0.01111+0.00037+0+...`
`=-0.81096`
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.01096`
`y_4''=-2-y_4'=-2.01096`
`y_4'''=-y_4''=2.01096`
`y_4''''=-y_4'''=-2.01096`
Putting these values in Taylor's 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.81096+0.1*(0.01096)+(0.1)^2/(2!)*(-2.01096)+(0.1)^3/(3!)*(2.01096)+(0.1)^4/(4!)*(-2.01096)+...`
`=-0.81096+0.0011-0.01005+0.00034+0+...`
`=-0.81959`
`:.y(0.5)=-0.81959`
This material is intended as a summary. Use your textbook for detail explanation. Any bug, improvement, feedback then
|