15.25.13 problem 12

Internal problem ID [3400]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 43, page 209
Problem number : 12
Date solved : Sunday, March 30, 2025 at 01:39:12 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

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

Maple. Time used: 0.034 (sec). Leaf size: 40
Order:=6; 
ode:=(x^2+2*x)*diff(diff(y(x),x),x)-(2+2*x)*diff(y(x),x)+2*y(x) = x^2*(x+2)^2; 
dsolve(ode,y(x),type='series',x=0);
 
\[ y = c_1 \,x^{2} \left (1+\operatorname {O}\left (x^{6}\right )\right )+c_2 \left (-2-2 x -\frac {1}{2} x^{2}+\operatorname {O}\left (x^{6}\right )\right )+x^{3} \left (\frac {2}{3}+\frac {1}{6} x +\operatorname {O}\left (x^{3}\right )\right ) \]
Mathematica. Time used: 0.31 (sec). Leaf size: 39
ode=(x^2+2*x)*D[y[x],{x,2}]-(2+2*x)*D[y[x],x]+2*y[x]==x^2*(x+2)^2; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
\[ y(x)\to -\frac {1}{3} (x+1) x^3+\left (\frac {x^2}{2}+x\right ) x^2+c_2 x^2+c_1 (x+1) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*(x + 2)**2 - (2*x + 2)*Derivative(y(x), x) + (x**2 + 2*x)*Derivative(y(x), (x, 2)) + 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
ValueError : ODE -x**2*(x + 2)**2 - (2*x + 2)*Derivative(y(x), x) + (x**2 + 2*x)*Derivative(y(x), (x, 2)) + 2*y(x) does not match hint 2nd_power_series_regular