6.10 problem 10

6.10.1 Maple step by step solution

Internal problem ID [5028]
Internal file name [OUTPUT/4521_Sunday_June_05_2022_03_00_06_PM_44423711/index.tex]

Book: Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section: Chapter 8, Series solutions of differential equations. Section 8.4. page 449
Problem number: 10.
ODE order: 2.
ODE degree: 1.

The type(s) of ODE detected by this program : "second order series method. Ordinary point", "second_order_change_of_variable_on_x_method_1", "second order series method. Taylor series method"

Maple gives the following as the ode type

[[_Emden, _Fowler]]

\[ \boxed {x^{2} y^{\prime \prime }-x y^{\prime }+2 y=0} \] With the expansion point for the power series method at \(x = 2\).

The ode does not have its expansion point at \(x = 0\), therefore to simplify the computation of power series expansion, change of variable is made on the independent variable to shift the initial conditions and the expasion point back to zero. The new ode is then solved more easily since the expansion point is now at zero. The solution converted back to the original independent variable. Let \[ t = x -2 \] The ode is converted to be in terms of the new independent variable \(t\). This results in \[ \left (t +2\right )^{2} \left (\frac {d^{2}}{d t^{2}}y \left (t \right )\right )-\left (t +2\right ) \left (\frac {d}{d t}y \left (t \right )\right )+2 y \left (t \right ) = 0 \] With its expansion point and initial conditions now at \(t = 0\). The transformed ODE is now solved. Solving ode using Taylor series method. This gives review on how the Taylor series method works for solving second order ode.

Let \[ y^{\prime \prime }=f\left ( x,y,y^{\prime }\right ) \] Assuming expansion is at \(x_{0}=0\) (we can always shift the actual expansion point to \(0\) by change of variables) and assuming \(f\left ( x,y,y^{\prime }\right ) \) is analytic at \(x_{0}\) which must be the case for an ordinary point. Let initial conditions be \(y\left ( x_{0}\right ) =y_{0}\) and \(y^{\prime }\left ( x_{0}\right ) =y_{0}^{\prime }\). Using Taylor series gives\begin {align*} y\left ( x\right ) & =y\left ( x_{0}\right ) +\left ( x-x_{0}\right ) y^{\prime }\left ( x_{0}\right ) +\frac {\left ( x-x_{0}\right ) ^{2}}{2}y^{\prime \prime }\left ( x_{0}\right ) +\frac {\left ( x-x_{0}\right ) ^{3}}{3!}y^{\prime \prime \prime }\left ( x_{0}\right ) +\cdots \\ & =y_{0}+xy_{0}^{\prime }+\frac {x^{2}}{2}\left . f\right \vert _{x_{0},y_{0},y_{0}^{\prime }}+\frac {x^{3}}{3!}\left . f^{\prime }\right \vert _{x_{0},y_{0},y_{0}^{\prime }}+\cdots \\ & =y_{0}+xy_{0}^{\prime }+\sum _{n=0}^{\infty }\frac {x^{n+2}}{\left ( n+2\right ) !}\left . \frac {d^{n}f}{dx^{n}}\right \vert _{x_{0},y_{0},y_{0}^{\prime }} \end {align*}

But \begin {align} \frac {df}{dx} & =\frac {\partial f}{\partial x}\frac {dx}{dx}+\frac {\partial f}{\partial y}\frac {dy}{dx}+\frac {\partial f}{\partial y^{\prime }}\frac {dy^{\prime }}{dx}\tag {1}\\ & =\frac {\partial f}{\partial x}+\frac {\partial f}{\partial y}y^{\prime }+\frac {\partial f}{\partial y^{\prime }}y^{\prime \prime }\\ & =\frac {\partial f}{\partial x}+\frac {\partial f}{\partial y}y^{\prime }+\frac {\partial f}{\partial y^{\prime }}f\\ \frac {d^{2}f}{dx^{2}} & =\frac {d}{dx}\left ( \frac {df}{dx}\right ) \nonumber \\ & =\frac {\partial }{\partial x}\left ( \frac {df}{dx}\right ) +\frac {\partial }{\partial y}\left ( \frac {df}{dx}\right ) y^{\prime }+\frac {\partial }{\partial y^{\prime }}\left ( \frac {df}{dx}\right ) f\tag {2}\\ \frac {d^{3}f}{dx^{3}} & =\frac {d}{dx}\left ( \frac {d^{2}f}{dx^{2}}\right ) \nonumber \\ & =\frac {\partial }{\partial x}\left ( \frac {d^{2}f}{dx^{2}}\right ) +\left ( \frac {\partial }{\partial y}\frac {d^{2}f}{dx^{2}}\right ) y^{\prime }+\frac {\partial }{\partial y^{\prime }}\left ( \frac {d^{2}f}{dx^{2}}\right ) f\tag {3}\\ & \vdots \nonumber \end {align}

And so on. Hence if we name \(F_{0}=f\left ( x,y,y^{\prime }\right ) \) then the above can be written as \begin {align} F_{0} & =f\left ( x,y,y^{\prime }\right ) \tag {4}\\ F_{1} & =\frac {df}{dx}\nonumber \\ & =\frac {dF_{0}}{dx}\nonumber \\ & =\frac {\partial f}{\partial x}+\frac {\partial f}{\partial y}y^{\prime }+\frac {\partial f}{\partial y^{\prime }}y^{\prime \prime }\nonumber \\ & =\frac {\partial f}{\partial x}+\frac {\partial f}{\partial y}y^{\prime }+\frac {\partial f}{\partial y^{\prime }}f\tag {5}\\ & =\frac {\partial F_{0}}{\partial x}+\frac {\partial F_{0}}{\partial y}y^{\prime }+\frac {\partial F_{0}}{\partial y^{\prime }}F_{0}\nonumber \\ F_{2} & =\frac {d}{dx}\left ( \frac {d}{dx}f\right ) \nonumber \\ & =\frac {d}{dx}\left ( F_{1}\right ) \nonumber \\ & =\frac {\partial }{\partial x}F_{1}+\left ( \frac {\partial F_{1}}{\partial y}\right ) y^{\prime }+\left ( \frac {\partial F_{1}}{\partial y^{\prime }}\right ) y^{\prime \prime }\nonumber \\ & =\frac {\partial }{\partial x}F_{1}+\left ( \frac {\partial F_{1}}{\partial y}\right ) y^{\prime }+\left ( \frac {\partial F_{1}}{\partial y^{\prime }}\right ) F_{0}\nonumber \\ & \vdots \nonumber \\ F_{n} & =\frac {d}{dx}\left ( F_{n-1}\right ) \nonumber \\ & =\frac {\partial }{\partial x}F_{n-1}+\left ( \frac {\partial F_{n-1}}{\partial y}\right ) y^{\prime }+\left ( \frac {\partial F_{n-1}}{\partial y^{\prime }}\right ) y^{\prime \prime }\nonumber \\ & =\frac {\partial }{\partial x}F_{n-1}+\left ( \frac {\partial F_{n-1}}{\partial y}\right ) y^{\prime }+\left ( \frac {\partial F_{n-1}}{\partial y^{\prime }}\right ) F_{0} \tag {6} \end {align}

Therefore (6) can be used from now on along with \begin {equation} y\left ( x\right ) =y_{0}+xy_{0}^{\prime }+\sum _{n=0}^{\infty }\frac {x^{n+2}}{\left ( n+2\right ) !}\left . F_{n}\right \vert _{x_{0},y_{0},y_{0}^{\prime }} \tag {7} \end {equation} To find \(y\left ( x\right ) \) series solution around \(x=0\). Hence \begin {align*} F_0 &= \frac {\left (\frac {d}{d t}y \left (t \right )\right ) t +2 \frac {d}{d t}y \left (t \right )-2 y \left (t \right )}{\left (t +2\right )^{2}}\\ F_1 &= \frac {d F_0}{dt} \\ &= \frac {\partial F_{0}}{\partial t}+ \frac {\partial F_{0}}{\partial y} \frac {d}{d t}y \left (t \right )+ \frac {\partial F_{0}}{\partial \frac {d}{d t}y \left (t \right )} F_0 \\ &= \frac {\left (-2 t -4\right ) \left (\frac {d}{d t}y \left (t \right )\right )+2 y \left (t \right )}{\left (t +2\right )^{3}}\\ F_2 &= \frac {d F_1}{dt} \\ &= \frac {\partial F_{1}}{\partial t}+ \frac {\partial F_{1}}{\partial y} \frac {d}{d t}y \left (t \right )+ \frac {\partial F_{1}}{\partial \frac {d}{d t}y \left (t \right )} F_1 \\ &= \frac {\left (4 t +8\right ) \left (\frac {d}{d t}y \left (t \right )\right )-2 y \left (t \right )}{\left (t +2\right )^{4}}\\ F_3 &= \frac {d F_2}{dt} \\ &= \frac {\partial F_{2}}{\partial t}+ \frac {\partial F_{2}}{\partial y} \frac {d}{d t}y \left (t \right )+ \frac {\partial F_{2}}{\partial \frac {d}{d t}y \left (t \right )} F_2 \\ &= -\frac {10 \left (\frac {d}{d t}y \left (t \right )\right )}{\left (t +2\right )^{4}}\\ F_4 &= \frac {d F_3}{dt} \\ &= \frac {\partial F_{3}}{\partial t}+ \frac {\partial F_{3}}{\partial y} \frac {d}{d t}y \left (t \right )+ \frac {\partial F_{3}}{\partial \frac {d}{d t}y \left (t \right )} F_3 \\ &= \frac {\left (30 t +60\right ) \left (\frac {d}{d t}y \left (t \right )\right )+20 y \left (t \right )}{\left (t +2\right )^{6}} \end {align*}

And so on. Evaluating all the above at initial conditions \(t = 0\) and \(y \left (0\right ) = y \left (0\right )\) and \(y^{\prime }\left (0\right ) = y^{\prime }\left (0\right )\) gives \begin {align*} F_0 &= -\frac {y \left (0\right )}{2}+\frac {y^{\prime }\left (0\right )}{2}\\ F_1 &= \frac {y \left (0\right )}{4}-\frac {y^{\prime }\left (0\right )}{2}\\ F_2 &= -\frac {y \left (0\right )}{8}+\frac {y^{\prime }\left (0\right )}{2}\\ F_3 &= -\frac {5 y^{\prime }\left (0\right )}{8}\\ F_4 &= \frac {5 y \left (0\right )}{16}+\frac {15 y^{\prime }\left (0\right )}{16} \end {align*}

Substituting all the above in (7) and simplifying gives the solution as \[ y \left (t \right ) = \left (1-\frac {1}{4} t^{2}+\frac {1}{24} t^{3}-\frac {1}{192} t^{4}+\frac {1}{2304} t^{6}\right ) y \left (0\right )+\left (t +\frac {1}{4} t^{2}-\frac {1}{12} t^{3}+\frac {1}{48} t^{4}-\frac {1}{192} t^{5}+\frac {1}{768} t^{6}\right ) y^{\prime }\left (0\right )+O\left (t^{6}\right ) \] Since the expansion point \(t = 0\) is an ordinary, we can also solve this using standard power series The ode is normalized to be \[ \left (t^{2}+4 t +4\right ) \left (\frac {d^{2}}{d t^{2}}y \left (t \right )\right )+\left (-t -2\right ) \left (\frac {d}{d t}y \left (t \right )\right )+2 y \left (t \right ) = 0 \] Let the solution be represented as power series of the form \[ y \left (t \right ) = \moverset {\infty }{\munderset {n =0}{\sum }}a_{n} t^{n} \] Then \begin {align*} \frac {d}{d t}y \left (t \right ) &= \moverset {\infty }{\munderset {n =1}{\sum }}n a_{n} t^{n -1}\\ \frac {d^{2}}{d t^{2}}y \left (t \right ) &= \moverset {\infty }{\munderset {n =2}{\sum }}n \left (n -1\right ) a_{n} t^{n -2} \end {align*}

Substituting the above back into the ode gives \begin {align*} \left (t^{2}+4 t +4\right ) \left (\moverset {\infty }{\munderset {n =2}{\sum }}n \left (n -1\right ) a_{n} t^{n -2}\right )+\left (-t -2\right ) \left (\moverset {\infty }{\munderset {n =1}{\sum }}n a_{n} t^{n -1}\right )+2 \left (\moverset {\infty }{\munderset {n =0}{\sum }}a_{n} t^{n}\right ) = 0\tag {1} \end {align*}

Which simplifies to \begin{equation} \tag{2} \left (\moverset {\infty }{\munderset {n =2}{\sum }}t^{n} a_{n} n \left (n -1\right )\right )+\left (\moverset {\infty }{\munderset {n =2}{\sum }}4 n \,t^{n -1} a_{n} \left (n -1\right )\right )+\left (\moverset {\infty }{\munderset {n =2}{\sum }}4 n \left (n -1\right ) a_{n} t^{n -2}\right )+\moverset {\infty }{\munderset {n =1}{\sum }}\left (-n a_{n} t^{n}\right )+\moverset {\infty }{\munderset {n =1}{\sum }}\left (-2 n a_{n} t^{n -1}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}2 a_{n} t^{n}\right ) = 0 \end{equation} The next step is to make all powers of \(t\) be \(n\) in each summation term. Going over each summation term above with power of \(t\) in it which is not already \(t^{n}\) and adjusting the power and the corresponding index gives \begin{align*} \moverset {\infty }{\munderset {n =2}{\sum }}4 n \,t^{n -1} a_{n} \left (n -1\right ) &= \moverset {\infty }{\munderset {n =1}{\sum }}4 \left (n +1\right ) a_{n +1} n \,t^{n} \\ \moverset {\infty }{\munderset {n =2}{\sum }}4 n \left (n -1\right ) a_{n} t^{n -2} &= \moverset {\infty }{\munderset {n =0}{\sum }}4 \left (n +2\right ) a_{n +2} \left (n +1\right ) t^{n} \\ \moverset {\infty }{\munderset {n =1}{\sum }}\left (-2 n a_{n} t^{n -1}\right ) &= \moverset {\infty }{\munderset {n =0}{\sum }}\left (-2 \left (n +1\right ) a_{n +1} t^{n}\right ) \\ \end{align*} Substituting all the above in Eq (2) gives the following equation where now all powers of \(t\) are the same and equal to \(n\). \begin{equation} \tag{3} \left (\moverset {\infty }{\munderset {n =2}{\sum }}t^{n} a_{n} n \left (n -1\right )\right )+\left (\moverset {\infty }{\munderset {n =1}{\sum }}4 \left (n +1\right ) a_{n +1} n \,t^{n}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}4 \left (n +2\right ) a_{n +2} \left (n +1\right ) t^{n}\right )+\moverset {\infty }{\munderset {n =1}{\sum }}\left (-n a_{n} t^{n}\right )+\moverset {\infty }{\munderset {n =0}{\sum }}\left (-2 \left (n +1\right ) a_{n +1} t^{n}\right )+\left (\moverset {\infty }{\munderset {n =0}{\sum }}2 a_{n} t^{n}\right ) = 0 \end{equation} \(n=0\) gives \[ 8 a_{2}-2 a_{1}+2 a_{0}=0 \] \[ a_{2} = -\frac {a_{0}}{4}+\frac {a_{1}}{4} \] \(n=1\) gives \[ 4 a_{2}+24 a_{3}+a_{1}=0 \] Which after substituting earlier equations, simplifies to \[ a_{3} = \frac {a_{0}}{24}-\frac {a_{1}}{12} \] For \(2\le n\), the recurrence equation is \begin{equation} \tag{4} n a_{n} \left (n -1\right )+4 \left (n +1\right ) a_{n +1} n +4 \left (n +2\right ) a_{n +2} \left (n +1\right )-n a_{n}-2 \left (n +1\right ) a_{n +1}+2 a_{n} = 0 \end{equation} Solving for \(a_{n +2}\), gives \begin{align*} \tag{5} a_{n +2}&= -\frac {n^{2} a_{n}+4 n^{2} a_{n +1}-2 n a_{n}+2 n a_{n +1}+2 a_{n}-2 a_{n +1}}{4 \left (n +2\right ) \left (n +1\right )} \\ &= -\frac {\left (n^{2}-2 n +2\right ) a_{n}}{4 \left (n +2\right ) \left (n +1\right )}-\frac {\left (4 n^{2}+2 n -2\right ) a_{n +1}}{4 \left (n +2\right ) \left (n +1\right )} \\ \end{align*} For \(n = 2\) the recurrence equation gives \[ 2 a_{2}+18 a_{3}+48 a_{4} = 0 \] Which after substituting the earlier terms found becomes \[ a_{4} = -\frac {a_{0}}{192}+\frac {a_{1}}{48} \] For \(n = 3\) the recurrence equation gives \[ 5 a_{3}+40 a_{4}+80 a_{5} = 0 \] Which after substituting the earlier terms found becomes \[ a_{5} = -\frac {a_{1}}{192} \] For \(n = 4\) the recurrence equation gives \[ 10 a_{4}+70 a_{5}+120 a_{6} = 0 \] Which after substituting the earlier terms found becomes \[ a_{6} = \frac {a_{0}}{2304}+\frac {a_{1}}{768} \] For \(n = 5\) the recurrence equation gives \[ 17 a_{5}+108 a_{6}+168 a_{7} = 0 \] Which after substituting the earlier terms found becomes \[ a_{7} = -\frac {5 a_{1}}{16128}-\frac {a_{0}}{3584} \] And so on. Therefore the solution is \begin {align*} y \left (t \right ) &= \moverset {\infty }{\munderset {n =0}{\sum }}a_{n} t^{n}\\ &= a_{3} t^{3}+a_{2} t^{2}+a_{1} t +a_{0} + \dots \end {align*}

Substituting the values for \(a_{n}\) found above, the solution becomes \[ y \left (t \right ) = a_{0}+a_{1} t +\left (-\frac {a_{0}}{4}+\frac {a_{1}}{4}\right ) t^{2}+\left (\frac {a_{0}}{24}-\frac {a_{1}}{12}\right ) t^{3}+\left (-\frac {a_{0}}{192}+\frac {a_{1}}{48}\right ) t^{4}-\frac {a_{1} t^{5}}{192}+\dots \] Collecting terms, the solution becomes \begin{equation} \tag{3} y \left (t \right ) = \left (1-\frac {1}{4} t^{2}+\frac {1}{24} t^{3}-\frac {1}{192} t^{4}\right ) a_{0}+\left (t +\frac {1}{4} t^{2}-\frac {1}{12} t^{3}+\frac {1}{48} t^{4}-\frac {1}{192} t^{5}\right ) a_{1}+O\left (t^{6}\right ) \end{equation} At \(t = 0\) the solution above becomes \[ y \left (t \right ) = \left (1-\frac {1}{4} t^{2}+\frac {1}{24} t^{3}-\frac {1}{192} t^{4}\right ) c_{1} +\left (t +\frac {1}{4} t^{2}-\frac {1}{12} t^{3}+\frac {1}{48} t^{4}-\frac {1}{192} t^{5}\right ) c_{2} +O\left (t^{6}\right ) \] Replacing \(t\) in the above with the original independent variable \(xs\)using \(t = x -2\) results in \[ y = \left (1-\frac {\left (x -2\right )^{2}}{4}+\frac {\left (x -2\right )^{3}}{24}-\frac {\left (x -2\right )^{4}}{192}+\frac {\left (x -2\right )^{6}}{2304}\right ) y \left (2\right )+\left (x -2+\frac {\left (x -2\right )^{2}}{4}-\frac {\left (x -2\right )^{3}}{12}+\frac {\left (x -2\right )^{4}}{48}-\frac {\left (x -2\right )^{5}}{192}+\frac {\left (x -2\right )^{6}}{768}\right ) y^{\prime }\left (2\right )+O\left (\left (x -2\right )^{6}\right ) \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \left (1-\frac {\left (x -2\right )^{2}}{4}+\frac {\left (x -2\right )^{3}}{24}-\frac {\left (x -2\right )^{4}}{192}+\frac {\left (x -2\right )^{6}}{2304}\right ) y \left (2\right )+\left (x -2+\frac {\left (x -2\right )^{2}}{4}-\frac {\left (x -2\right )^{3}}{12}+\frac {\left (x -2\right )^{4}}{48}-\frac {\left (x -2\right )^{5}}{192}+\frac {\left (x -2\right )^{6}}{768}\right ) y^{\prime }\left (2\right )+O\left (\left (x -2\right )^{6}\right ) \\ \end{align*}

Verification of solutions

\[ y = \left (1-\frac {\left (x -2\right )^{2}}{4}+\frac {\left (x -2\right )^{3}}{24}-\frac {\left (x -2\right )^{4}}{192}+\frac {\left (x -2\right )^{6}}{2304}\right ) y \left (2\right )+\left (x -2+\frac {\left (x -2\right )^{2}}{4}-\frac {\left (x -2\right )^{3}}{12}+\frac {\left (x -2\right )^{4}}{48}-\frac {\left (x -2\right )^{5}}{192}+\frac {\left (x -2\right )^{6}}{768}\right ) y^{\prime }\left (2\right )+O\left (\left (x -2\right )^{6}\right ) \] Verified OK.

6.10.1 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x^{2} \left (\frac {d}{d x}y^{\prime }\right )-x y^{\prime }+2 y=0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 2 \\ {} & {} & \frac {d}{d x}y^{\prime } \\ \bullet & {} & \textrm {Isolate 2nd derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y^{\prime }=\frac {y^{\prime }}{x}-\frac {2 y}{x^{2}} \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linear}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y^{\prime }-\frac {y^{\prime }}{x}+\frac {2 y}{x^{2}}=0 \\ \bullet & {} & \textrm {Multiply by denominators of the ODE}\hspace {3pt} \\ {} & {} & x^{2} \left (\frac {d}{d x}y^{\prime }\right )-x y^{\prime }+2 y=0 \\ \bullet & {} & \textrm {Make a change of variables}\hspace {3pt} \\ {} & {} & t =\ln \left (x \right ) \\ \square & {} & \textrm {Substitute the change of variables back into the ODE}\hspace {3pt} \\ {} & \circ & \textrm {Calculate the}\hspace {3pt} \hspace {3pt}\textrm {1st}\hspace {3pt} \hspace {3pt}\textrm {derivative of}\hspace {3pt} \hspace {3pt}\textrm {y}\hspace {3pt} \hspace {3pt}\textrm {with respect to}\hspace {3pt} \hspace {3pt}\textrm {x}\hspace {3pt} \hspace {3pt}\textrm {, using the chain rule}\hspace {3pt} \\ {} & {} & y^{\prime }=\left (\frac {d}{d t}y \left (t \right )\right ) t^{\prime }\left (x \right ) \\ {} & \circ & \textrm {Compute derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=\frac {\frac {d}{d t}y \left (t \right )}{x} \\ {} & \circ & \textrm {Calculate the}\hspace {3pt} \hspace {3pt}\textrm {2nd}\hspace {3pt} \hspace {3pt}\textrm {derivative of}\hspace {3pt} \hspace {3pt}\textrm {y}\hspace {3pt} \hspace {3pt}\textrm {with respect to}\hspace {3pt} \hspace {3pt}\textrm {x}\hspace {3pt} \hspace {3pt}\textrm {, using the chain rule}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y^{\prime }=\left (\frac {d}{d t}\frac {d}{d t}y \left (t \right )\right ) {t^{\prime }\left (x \right )}^{2}+\left (\frac {d}{d x}t^{\prime }\left (x \right )\right ) \left (\frac {d}{d t}y \left (t \right )\right ) \\ {} & \circ & \textrm {Compute derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y^{\prime }=\frac {\frac {d}{d t}\frac {d}{d t}y \left (t \right )}{x^{2}}-\frac {\frac {d}{d t}y \left (t \right )}{x^{2}} \\ & {} & \textrm {Substitute the change of variables back into the ODE}\hspace {3pt} \\ {} & {} & x^{2} \left (\frac {\frac {d}{d t}\frac {d}{d t}y \left (t \right )}{x^{2}}-\frac {\frac {d}{d t}y \left (t \right )}{x^{2}}\right )-\frac {d}{d t}y \left (t \right )+2 y \left (t \right )=0 \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & \frac {d}{d t}\frac {d}{d t}y \left (t \right )-2 \frac {d}{d t}y \left (t \right )+2 y \left (t \right )=0 \\ \bullet & {} & \textrm {Characteristic polynomial of ODE}\hspace {3pt} \\ {} & {} & r^{2}-2 r +2=0 \\ \bullet & {} & \textrm {Use quadratic formula to solve for}\hspace {3pt} r \\ {} & {} & r =\frac {2\pm \left (\sqrt {-4}\right )}{2} \\ \bullet & {} & \textrm {Roots of the characteristic polynomial}\hspace {3pt} \\ {} & {} & r =\left (1-\mathrm {I}, 1+\mathrm {I}\right ) \\ \bullet & {} & \textrm {1st solution of the ODE}\hspace {3pt} \\ {} & {} & y_{1}\left (t \right )={\mathrm e}^{t} \cos \left (t \right ) \\ \bullet & {} & \textrm {2nd solution of the ODE}\hspace {3pt} \\ {} & {} & y_{2}\left (t \right )={\mathrm e}^{t} \sin \left (t \right ) \\ \bullet & {} & \textrm {General solution of the ODE}\hspace {3pt} \\ {} & {} & y \left (t \right )=c_{1} y_{1}\left (t \right )+c_{2} y_{2}\left (t \right ) \\ \bullet & {} & \textrm {Substitute in solutions}\hspace {3pt} \\ {} & {} & y \left (t \right )=c_{1} {\mathrm e}^{t} \cos \left (t \right )+c_{2} {\mathrm e}^{t} \sin \left (t \right ) \\ \bullet & {} & \textrm {Change variables back using}\hspace {3pt} t =\ln \left (x \right ) \\ {} & {} & y=c_{1} x \cos \left (\ln \left (x \right )\right )+c_{2} x \sin \left (\ln \left (x \right )\right ) \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y=x \left (c_{1} \cos \left (\ln \left (x \right )\right )+c_{2} \sin \left (\ln \left (x \right )\right )\right ) \end {array} \]

Maple trace

`Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
checking if the LODE has constant coefficients 
checking if the LODE is of Euler type 
<- LODE of Euler type successful`
 

Solution by Maple

Time used: 0.016 (sec). Leaf size: 49

Order:=6; 
dsolve(x^2*diff(y(x),x$2)-x*diff(y(x),x)+2*y(x)=0,y(x),type='series',x=2);
 

\[ y \left (x \right ) = \left (1-\frac {\left (-2+x \right )^{2}}{4}+\frac {\left (-2+x \right )^{3}}{24}-\frac {\left (-2+x \right )^{4}}{192}\right ) y \left (2\right )+\left (-2+x +\frac {\left (-2+x \right )^{2}}{4}-\frac {\left (-2+x \right )^{3}}{12}+\frac {\left (-2+x \right )^{4}}{48}-\frac {\left (-2+x \right )^{5}}{192}\right ) D\left (y \right )\left (2\right )+O\left (x^{6}\right ) \]

Solution by Mathematica

Time used: 0.001 (sec). Leaf size: 78

AsymptoticDSolveValue[x^2*y''[x]-x*y'[x]+2*y[x]==0,y[x],{x,2,5}]
 

\[ y(x)\to c_1 \left (-\frac {1}{192} (x-2)^4+\frac {1}{24} (x-2)^3-\frac {1}{4} (x-2)^2+1\right )+c_2 \left (-\frac {1}{192} (x-2)^5+\frac {1}{48} (x-2)^4-\frac {1}{12} (x-2)^3+\frac {1}{4} (x-2)^2+x-2\right ) \]