23.3.224 problem 226

Internal problem ID [5938]
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 : 226
Date solved : Tuesday, September 30, 2025 at 02:06:29 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} f \left (x \right ) y+\left (2+x f \left (x \right )\right ) y^{\prime }+x y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.031 (sec). Leaf size: 33
ode:=f(x)*y(x)+(2+x*f(x))*diff(y(x),x)+x*diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_2 \int {\mathrm e}^{-\int \frac {2+x f \left (x \right )}{x}d x} x^{2}d x +c_1}{x} \]
Mathematica. Time used: 0.121 (sec). Leaf size: 37
ode=f[x]*y[x] + (2 + x*f[x])*D[y[x],x] + x*D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {c_2 \int _1^x\exp \left (-\int _1^{K[2]}f(K[1])dK[1]\right )dK[2]+c_1}{x} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), (x, 2)) + (x*f(x) + 2)*Derivative(y(x), x) + f(x)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False