ODE
\[ x y(x)^n+x y''(x)+2 y'(x)=0 \] ODE Classification
[_Emden, [_2nd_order, _with_linear_symmetries]]
Book solution method
TO DO
Mathematica ✗
cpu = 0.0624734 (sec), leaf count = 0 , could not solve
DSolve[x*y[x]^n + 2*Derivative[1][y][x] + x*Derivative[2][y][x] == 0, y[x], x]
Maple ✓
cpu = 1.078 (sec), leaf count = 125
\[ \left \{ y \left ( x \right ) ={\it ODESolStruc} \left ( {\it \_a}\,{{\rm e}^{\int \!{\it \_b} \left ( {\it \_a} \right ) \,{\rm d}{\it \_a}+{\it \_C1}}},[ \left \{ {\frac {\rm d}{{\rm d}{\it \_a}}}{\it \_b} \left ( {\it \_a} \right ) ={\frac { \left ( {\it \_b} \left ( {\it \_a} \right ) \left ( n-1 \right ) ^{2}{{\it \_a}}^{n}-2\,{\it \_a}\, \left ( n-3 \right ) {\it \_b} \left ( {\it \_a} \right ) -2\,n+10 \right ) \left ( {\it \_b} \left ( {\it \_a} \right ) \right ) ^{2}}{4}} \right \} , \left \{ {\it \_a}=y \left ( x \right ) {x}^{2\, \left ( n-1 \right ) ^{-1}},{\it \_b} \left ( {\it \_a} \right ) =-2\,{\frac {1}{ \left ( n-1 \right ) x{\frac {\rm d}{{\rm d}x}}y \left ( x \right ) +2\,y \left ( x \right ) } \left ( {x}^{2\, \left ( n-1 \right ) ^{-1}} \right ) ^{-1}} \right \} , \left \{ x={{\rm e}^{-{\frac { \left ( \int \!{\it \_b} \left ( {\it \_a} \right ) \,{\rm d}{\it \_a}+{\it \_C1} \right ) \left ( n-1 \right ) }{2}}}},y \left ( x \right ) ={\it \_a}\,{{\rm e}^{\int \!{\it \_b} \left ( {\it \_a} \right ) \,{\rm d}{\it \_a}+{\it \_C1}}} \right \} ] \right ) \right \} \] Mathematica raw input
DSolve[x*y[x]^n + 2*y'[x] + x*y''[x] == 0,y[x],x]
Mathematica raw output
DSolve[x*y[x]^n + 2*Derivative[1][y][x] + x*Derivative[2][y][x] == 0, y[x], x]
Maple raw input
dsolve(x*diff(diff(y(x),x),x)+2*diff(y(x),x)+x*y(x)^n = 0, y(x),'implicit')
Maple raw output
y(x) = ODESolStruc(_a*exp(Int(_b(_a),_a)+_C1),[{diff(_b(_a),_a) = 1/4*(_b(_a)*(n
-1)^2*_a^n-2*_a*(n-3)*_b(_a)-2*n+10)*_b(_a)^2}, {_a = y(x)*x^(2/(n-1)), _b(_a) =
-2/((n-1)*x*diff(y(x),x)+2*y(x))/(x^(2/(n-1)))}, {x = exp(-1/2*(Int(_b(_a),_a)+
_C1)*(n-1)), y(x) = _a*exp(Int(_b(_a),_a)+_C1)}])