23.3.420 problem 425

Internal problem ID [6134]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 425
Date solved : Tuesday, September 30, 2025 at 02:22:07 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} 2 y-\left (2+x \right ) y^{\prime }+\left (2+x \right )^{2} y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 23
ode:=2*y(x)-(x+2)*diff(y(x),x)+(x+2)^2*diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (2+x \right ) \left (c_1 \sin \left (\ln \left (2+x \right )\right )+c_2 \cos \left (\ln \left (2+x \right )\right )\right ) \]
Mathematica. Time used: 0.021 (sec). Leaf size: 26
ode=2*y[x] - (2 + x)*D[y[x],x] + (2 + x)^2*D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to (x+2) (c_2 \cos (\log (x+2))+c_1 \sin (\log (x+2))) \end{align*}
Sympy. Time used: 0.135 (sec). Leaf size: 7
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 2)**2*Derivative(y(x), (x, 2)) - (x + 2)*Derivative(y(x), x) + 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \left (x + 2\right ) \]