0
3.1kviews
Using Taylor's series expansion solve $\frac{dy}{dx}=-xy^2$ with x=0,y=2 and compare it with exact solution.
1 Answer
0
128views

$ \frac{dy}{dx} = -xy^2, x_0 = 0, y_0 = 2 \\ $

$ \text { Taylor's Series is given by } \\ $

$ y = y_0 + (x-x_0)y_0'+ \frac{(x-x_0)^2} {2!}y_0'' \\ $

$ y' = -xy^2 \Longrightarrow y_0' = -x_0y_0 ^2 = 0 \\ $

$ y'' = -x2yy' + y^2 \Longrightarrow y_0''' = -2x_0y_0y_0' - y_0^2 = -4 \\ $

$ y''' = -2[yy' + xyy'' + xy'^2] - 2yy' ] = -2[xyy'' + xy'^2] - 4yy' ] $

$ \Longrightarrow y_0''' = -2[x_0y_0y_o'' + x_0y_0'^2] -4y_0y_0' = -0 $

$ y^{IV} =-2[ y_0y''' + x_0y_0y'' +x_0y'y'' + y_0'^2 + 2x_0y_0'y_0''] -4[y_0y''_0 + y_0'^2 $

$ \Longrightarrow y_0^{IV} =-2[2(-4) +4 (2(-4)) = 48 $

$ \therefore y = 2 + x_0 + \frac{x^2}{2!}(-4) + \frac{x^2}{3!}(0) + \frac{x^4}{4!}48 + ...... \\ $

$ = 2- 2x^2 + 2x^4 + .... \\ $

$ = 2 (1- x^2 +x^4 ) \\ $

$\text{ Exact Solution : } \\ $

$ \frac{dy}{dx} = -xy^2 \Longrightarrow \int\frac{dy}{y^2} = -\int xdx \\ $

$ \frac{-1}{y} = -\frac{x^2}{2} + c \\ $

$ \text{ When x = 0, y = 2, }c = \frac{-1}{2} \\ $

$ -\frac{1}{y} = -{x^2}{2} -\frac{1}{2} \Longrightarrow -\frac{1}{y} = \frac{x^2}{2} + \frac{1}{2} = \frac{x^2 + 1}{2} \\ $

$ y = \frac {2}{x^2+1 } = 2(x^2 +1)^{-1} = 2[1-x^2 + x^4] \\ $

Please log in to add an answer.