50.18.14 problem 8

Internal problem ID [8108]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 4. Power Series Solutions and Special Functions. Section 4.3. Second-Order Linear Equations: Ordinary Points. Page 169
Problem number : 8
Date solved : Sunday, March 30, 2025 at 12:45:34 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

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

Maple. Time used: 0.007 (sec). Leaf size: 85
Order:=8; 
ode:=diff(diff(y(x),x),x)-2*x*diff(y(x),x)+2*p*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = \left (1-p \,x^{2}+\frac {p \left (p -2\right ) x^{4}}{6}-\frac {p \left (p -2\right ) \left (p -4\right ) x^{6}}{90}\right ) y \left (0\right )+\left (x -\frac {\left (p -1\right ) x^{3}}{3}+\frac {\left (p^{2}-4 p +3\right ) x^{5}}{30}-\frac {\left (p^{3}-9 p^{2}+23 p -15\right ) x^{7}}{630}\right ) y^{\prime }\left (0\right )+O\left (x^{8}\right ) \]
Mathematica. Time used: 0.002 (sec). Leaf size: 141
ode=D[y[x],{x,2}]-2*x*D[y[x],x]+2*p*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,7}]
 
\[ y(x)\to c_2 \left (-\frac {1}{630} p^3 x^7+\frac {p^2 x^7}{70}+\frac {p^2 x^5}{30}-\frac {23 p x^7}{630}-\frac {2 p x^5}{15}-\frac {p x^3}{3}+\frac {x^7}{42}+\frac {x^5}{10}+\frac {x^3}{3}+x\right )+c_1 \left (-\frac {1}{90} p^3 x^6+\frac {p^2 x^6}{15}+\frac {p^2 x^4}{6}-\frac {4 p x^6}{45}-\frac {p x^4}{3}-p x^2+1\right ) \]
Sympy. Time used: 0.964 (sec). Leaf size: 94
from sympy import * 
x = symbols("x") 
p = symbols("p") 
y = Function("y") 
ode = Eq(2*p*y(x) - 2*x*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_ordinary",x0=0,n=8)
 
\[ y{\left (x \right )} = C_{2} \left (- \frac {p^{3} x^{6}}{90} + \frac {p^{2} x^{6}}{15} + \frac {p^{2} x^{4}}{6} - \frac {4 p x^{6}}{45} - \frac {p x^{4}}{3} - p x^{2} + 1\right ) + C_{1} x \left (\frac {p^{2} x^{4}}{30} - \frac {2 p x^{4}}{15} - \frac {p x^{2}}{3} + \frac {x^{4}}{10} + \frac {x^{2}}{3} + 1\right ) + O\left (x^{8}\right ) \]