56.4.21 problem 21

Internal problem ID [8910]
Book : Own collection of miscellaneous problems
Section : section 4.0
Problem number : 21
Date solved : Sunday, March 30, 2025 at 01:53:08 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+\left (x -6\right ) y&=0 \end{align*}

Using series method with expansion around

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

Maple. Time used: 0.007 (sec). Leaf size: 52
Order:=6; 
ode:=diff(diff(y(x),x),x)+(x-6)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = \left (1+3 x^{2}-\frac {1}{6} x^{3}+\frac {3}{2} x^{4}-\frac {1}{5} x^{5}\right ) y \left (0\right )+\left (x +x^{3}-\frac {1}{12} x^{4}+\frac {3}{10} x^{5}\right ) y^{\prime }\left (0\right )+O\left (x^{6}\right ) \]
Mathematica. Time used: 0.001 (sec). Leaf size: 57
ode=D[y[x],{x,2}]+(x-6)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to c_2 \left (\frac {3 x^5}{10}-\frac {x^4}{12}+x^3+x\right )+c_1 \left (-\frac {x^5}{5}+\frac {3 x^4}{2}-\frac {x^3}{6}+3 x^2+1\right ) \]
Sympy. Time used: 0.768 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x - 6)*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_ordinary",x0=0,n=6)
 
\[ y{\left (x \right )} = C_{2} \left (\frac {3 x^{4}}{2} - \frac {x^{3}}{6} + 3 x^{2} + 1\right ) + C_{1} x \left (- \frac {x^{3}}{12} + x^{2} + 1\right ) + O\left (x^{6}\right ) \]