4.11.44 \(2 x y(x) y'(x)=a x+y(x)^2\)

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

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

Book solution method
The Bernoulli ODE

Mathematica
cpu = 0.311692 (sec), leaf count = 44

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

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

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

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

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