62.28.4 problem Ex 4

Internal problem ID [12880]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter VII, Linear differential equations with constant coefficients. Article 51. Cauchy linear equation. Page 114
Problem number : Ex 4
Date solved : Monday, March 31, 2025 at 07:23:28 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.004 (sec). Leaf size: 37
ode:=(1+x)^2*diff(diff(y(x),x),x)-(1+x)*diff(y(x),x)+6*y(x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (x +1\right ) \sin \left (\sqrt {5}\, \ln \left (x +1\right )\right ) c_2 +\left (x +1\right ) \cos \left (\sqrt {5}\, \ln \left (x +1\right )\right ) c_1 +\frac {x}{5}+\frac {1}{30} \]
Mathematica. Time used: 0.311 (sec). Leaf size: 129
ode=(x+1)^2*D[y[x],{x,2}]-(x+1)*D[y[x],x]+6*y[x]==x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to (x+1) \left (\cos \left (\sqrt {5} \log (x+1)\right ) \int _1^x-\frac {K[2] \sin \left (\sqrt {5} \log (K[2]+1)\right )}{\sqrt {5} (K[2]+1)^2}dK[2]+\sin \left (\sqrt {5} \log (x+1)\right ) \int _1^x\frac {\cos \left (\sqrt {5} \log (K[1]+1)\right ) K[1]}{\sqrt {5} (K[1]+1)^2}dK[1]+c_2 \cos \left (\sqrt {5} \log (x+1)\right )+c_1 \sin \left (\sqrt {5} \log (x+1)\right )\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + (x + 1)**2*Derivative(y(x), (x, 2)) - (x + 1)*Derivative(y(x), x) + 6*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (x**2*Derivative(y(x), (x, 2)) + 2*x*Derivative(y(x), (x, 2)) - x + 6*y(x) + Derivative(y(x), (x, 2)))/(x + 1) cannot be solved by the factorable group method