4.11.9 \(x y(x) y'(x)=y(x)^2+x\)

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

[[_homogeneous, `class D`], _rational, _Bernoulli]

Book solution method
Exact equation, integrating factor

Mathematica
cpu = 0.257779 (sec), leaf count = 42

\[\left \{\left \{y(x)\to -\sqrt {x} \sqrt {-2+c_1 x}\right \},\left \{y(x)\to \sqrt {x} \sqrt {-2+c_1 x}\right \}\right \}\]

Maple
cpu = 0.019 (sec), leaf count = 31

\[\left [y \left (x \right ) = \sqrt {x^{2} \textit {\_C1} -2 x}, y \left (x \right ) = -\sqrt {x^{2} \textit {\_C1} -2 x}\right ]\] Mathematica raw input

DSolve[x*y[x]*y'[x] == x + y[x]^2,y[x],x]

Mathematica raw output

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

Maple raw input

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

Maple raw output

[y(x) = (_C1*x^2-2*x)^(1/2), y(x) = -(_C1*x^2-2*x)^(1/2)]