4.40.31 \(x y(x) y''(x)=2 x y'(x)^2-(y(x)+1) y'(x)\)

ODE
\[ x y(x) y''(x)=2 x y'(x)^2-(y(x)+1) y'(x) \] ODE Classification

[[_2nd_order, _with_linear_symmetries], [_2nd_order, _reducible, _mu_x_y1], [_2nd_order, _reducible, _mu_xy]]

Book solution method
TO DO

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

\[\left \{\left \{y(x)\to \frac {\tan \left (\frac {\sqrt {c_1} (\log (x)-c_2)}{\sqrt {2}}\right )}{\sqrt {2} \sqrt {c_1}}\right \}\right \}\]

Maple
cpu = 0.508 (sec), leaf count = 18

\[\left [y \left (x \right ) = \textit {\_C1} \tanh \left (\frac {\ln \left (x \right )-\textit {\_C2}}{2 \textit {\_C1}}\right )\right ]\] Mathematica raw input

DSolve[x*y[x]*y''[x] == -((1 + y[x])*y'[x]) + 2*x*y'[x]^2,y[x],x]

Mathematica raw output

{{y[x] -> Tan[(Sqrt[C[1]]*(-C[2] + Log[x]))/Sqrt[2]]/(Sqrt[2]*Sqrt[C[1]])}}

Maple raw input

dsolve(x*y(x)*diff(diff(y(x),x),x) = 2*x*diff(y(x),x)^2-(1+y(x))*diff(y(x),x), y(x))

Maple raw output

[y(x) = _C1*tanh(1/2*(ln(x)-_C2)/_C1)]