##### 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 Classiﬁcation

[_Bernoulli]

Book solution method
The Bernoulli ODE

Mathematica
cpu = 0.380907 (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.077 (sec), leaf count = 120

$\left [y \left (x \right ) = \frac {\sqrt {-\left (4 a^{2}+1\right ) \left (-4 \,{\mathrm e}^{2 a x} \textit {\_C1} \,a^{2}+4 \cos \left (x +c \right ) a b -{\mathrm e}^{2 a x} \textit {\_C1} -2 \sin \left (x +c \right ) b \right )}}{4 a^{2}+1}, y \left (x \right ) = -\frac {\sqrt {-\left (4 a^{2}+1\right ) \left (-4 \,{\mathrm e}^{2 a x} \textit {\_C1} \,a^{2}+4 \cos \left (x +c \right ) a b -{\mathrm e}^{2 a x} \textit {\_C1} -2 \sin \left (x +c \right ) b \right )}}{4 a^{2}+1}\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))

Maple raw output

[y(x) = 1/(4*a^2+1)*(-(4*a^2+1)*(-4*exp(2*a*x)*_C1*a^2+4*cos(x+c)*a*b-exp(2*a*x)
*_C1-2*sin(x+c)*b))^(1/2), y(x) = -1/(4*a^2+1)*(-(4*a^2+1)*(-4*exp(2*a*x)*_C1*a^
2+4*cos(x+c)*a*b-exp(2*a*x)*_C1-2*sin(x+c)*b))^(1/2)]