4.28.50 \((x f(x)+2) y'(x)+f(x) y(x)+x y''(x)=0\)

ODE
\[ (x f(x)+2) y'(x)+f(x) y(x)+x y''(x)=0 \] ODE Classification

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 0.17477 (sec), leaf count = 37

\[\left \{\left \{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}\right \}\right \}\]

Maple
cpu = 0.792 (sec), leaf count = 35

\[\left [y \left (x \right ) = \frac {\textit {\_C1}}{x}+\frac {\textit {\_C2} \left (\int {\mathrm e}^{\int \frac {-2-x f \left (x \right )}{x}d x} x^{2}d x \right )}{x}\right ]\] Mathematica raw input

DSolve[f[x]*y[x] + (2 + x*f[x])*y'[x] + x*y''[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> (C[1] + C[2]*Inactive[Integrate][E^(-Inactive[Integrate][f[K[1]], {K[1
], 1, K[2]}]), {K[2], 1, x}])/x}}

Maple raw input

dsolve(x*diff(diff(y(x),x),x)+(2+x*f(x))*diff(y(x),x)+f(x)*y(x) = 0, y(x))

Maple raw output

[y(x) = 1/x*_C1+_C2/x*Int(exp(Int((-2-x*f(x))/x,x))*x^2,x)]