64.14.17 problem 17

Internal problem ID [13505]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 6, Series solutions of linear differential equations. Section 6.1. Exercises page 232
Problem number : 17
Date solved : Monday, March 31, 2025 at 07:59:51 AM
CAS classification : [[_Emden, _Fowler]]

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

Using series method with expansion around

\begin{align*} 1 \end{align*}

With initial conditions

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

Maple. Time used: 0.005 (sec). Leaf size: 20
Order:=6; 
ode:=x*diff(diff(y(x),x),x)+diff(y(x),x)+2*y(x) = 0; 
ic:=y(1) = 2, D(y)(1) = 4; 
dsolve([ode,ic],y(x),type='series',x=1);
 
\[ y = 2+4 \left (-1+x \right )-4 \left (-1+x \right )^{2}+\frac {4}{3} \left (-1+x \right )^{3}-\frac {1}{3} \left (-1+x \right )^{4}+\frac {2}{15} \left (-1+x \right )^{5}+\operatorname {O}\left (\left (-1+x \right )^{6}\right ) \]
Mathematica. Time used: 0.002 (sec). Leaf size: 44
ode=x*D[y[x],{x,2}]+D[y[x],x]+2*y[x]==0; 
ic={y[1]==2,Derivative[1][y][1]==4}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,1,5}]
 
\[ y(x)\to \frac {2}{15} (x-1)^5-\frac {1}{3} (x-1)^4+\frac {4}{3} (x-1)^3-4 (x-1)^2+4 (x-1)+2 \]
Sympy. Time used: 0.739 (sec). Leaf size: 48
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), (x, 2)) + 2*y(x) + Derivative(y(x), x),0) 
ics = {y(1): 2, Subs(Derivative(y(x), x), x, 1): 4} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_ordinary",x0=1,n=6)
 
\[ y{\left (x \right )} = C_{2} \left (- \frac {\left (x - 1\right )^{4}}{3} + \frac {2 \left (x - 1\right )^{3}}{3} - \left (x - 1\right )^{2} + 1\right ) + C_{1} \left (x + \frac {\left (x - 1\right )^{4}}{12} - \frac {\left (x - 1\right )^{2}}{2} - 1\right ) + O\left (x^{6}\right ) \]