4.9.28 \(y(x) y'(x)=a y(x)^2+b \cos (c+x)\)

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

[_Bernoulli]

Book solution method
The Bernoulli ODE

Mathematica
cpu = 0.0723789 (sec), leaf count = 106

\[\left \{\left \{y(x)\to -\frac {\sqrt {\left (4 a^2+1\right ) c_1 e^{2 a x}-4 a b \cos (c+x)+2 b \sin (c+x)}}{\sqrt {4 a^2+1}}\right \},\left \{y(x)\to \frac {\sqrt {\left (4 a^2+1\right ) c_1 e^{2 a x}-4 a b \cos (c+x)+2 b \sin (c+x)}}{\sqrt {4 a^2+1}}\right \}\right \}\]

Maple
cpu = 0.036 (sec), leaf count = 51

\[ \left \{ -4\,{{\rm e}^{2\,ax}}{\it \_C1}\,{a}^{2}+4\,{a}^{2} \left ( y \left ( x \right ) \right ) ^{2}+4\,\cos \left ( x+c \right ) ab-{{\rm e}^{2\,ax}}{\it \_C1}-2\,\sin \left ( x+c \right ) b+ \left ( y \left ( x \right ) \right ) ^{2}=0 \right \} \] Mathematica raw input

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

Mathematica raw output

{{y[x] -> -(Sqrt[(1 + 4*a^2)*E^(2*a*x)*C[1] - 4*a*b*Cos[c + x] + 2*b*Sin[c + x]]
/Sqrt[1 + 4*a^2])}, {y[x] -> Sqrt[(1 + 4*a^2)*E^(2*a*x)*C[1] - 4*a*b*Cos[c + x] 
+ 2*b*Sin[c + x]]/Sqrt[1 + 4*a^2]}}

Maple raw input

dsolve(y(x)*diff(y(x),x) = b*cos(x+c)+a*y(x)^2, y(x),'implicit')

Maple raw output

-4*exp(2*a*x)*_C1*a^2+4*a^2*y(x)^2+4*cos(x+c)*a*b-exp(2*a*x)*_C1-2*sin(x+c)*b+y(
x)^2 = 0