56.4.17 problem 17

Internal problem ID [8906]
Book : Own collection of miscellaneous problems
Section : section 4.0
Problem number : 17
Date solved : Sunday, March 30, 2025 at 01:53:01 PM
CAS classification : [_Lienard]

\begin{align*} x y^{\prime \prime }+2 y^{\prime }+x y&=0 \end{align*}

Using series method with expansion around

\begin{align*} 0 \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=1\\ y^{\prime }\left (0\right )&=0 \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 14
Order:=6; 
ode:=x*diff(diff(y(x),x),x)+2*diff(y(x),x)+x*y(x) = 0; 
ic:=y(0) = 1, D(y)(0) = 0; 
dsolve([ode,ic],y(x),type='series',x=0);
 
\[ y = 1-\frac {1}{6} x^{2}+\frac {1}{120} x^{4}+\operatorname {O}\left (x^{6}\right ) \]
Mathematica. Time used: 0.204 (sec). Leaf size: 19
ode=x*D[y[x],{x,2}]+2*D[y[x],x]+x*y[x]==0; 
ic={y[0]==1,Derivative[1][y][0] ==0}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to \frac {x^4}{120}-\frac {x^2}{6}+1 \]
Sympy. Time used: 0.857 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x) + x*Derivative(y(x), (x, 2)) + 2*Derivative(y(x), x),0) 
ics = {y(0): 1, Subs(Derivative(y(x), x), x, 0): 0} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
\[ y{\left (x \right )} = C_{2} \left (\frac {x^{4}}{120} - \frac {x^{2}}{6} + 1\right ) + \frac {C_{1} \left (- \frac {x^{6}}{720} + \frac {x^{4}}{24} - \frac {x^{2}}{2} + 1\right )}{x} + O\left (x^{6}\right ) \]