##### 4.1.50 $$y'(x)=y(x) (y(x)+\sin (2 x))+\cos (2 x)$$

ODE
$y'(x)=y(x) (y(x)+\sin (2 x))+\cos (2 x)$ ODE Classiﬁcation

[_Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 0.669 (sec), leaf count = 105

$\left \{\left \{y(x)\to \frac {\sec (x) \left (\sin (x) \int _1^{\cos (x)}\frac {e^{-K[1]^2}}{K[1]^2 \sqrt {K[1]^2-1}}dK[1]+c_1 \sin (x)+\frac {e^{-\cos ^2(x)} \tan (x)}{\sqrt {-\sin ^2(x)}}\right )}{\int _1^{\cos (x)}\frac {e^{-K[1]^2}}{K[1]^2 \sqrt {K[1]^2-1}}dK[1]+c_1}\right \}\right \}$

Maple
cpu = 0.45 (sec), leaf count = 198

$\left [y \left (x \right ) = \left (\frac {2 \HeunCPrime \left (1, \frac {1}{2}, -\frac {1}{2}, -1, \frac {7}{8}, \frac {\cos \left (2 x \right )}{2}+\frac {1}{2}\right ) \textit {\_C1} \cos \left (2 x \right )}{\sqrt {2 \cos \left (2 x \right )+2}\, \left (\textit {\_C1} \HeunC \left (1, \frac {1}{2}, -\frac {1}{2}, -1, \frac {7}{8}, \frac {\cos \left (2 x \right )}{2}+\frac {1}{2}\right ) \sqrt {2 \cos \left (2 x \right )+2}+\HeunC \left (1, -\frac {1}{2}, -\frac {1}{2}, -1, \frac {7}{8}, \frac {\cos \left (2 x \right )}{2}+\frac {1}{2}\right )\right )}+\frac {\HeunCPrime \left (1, -\frac {1}{2}, -\frac {1}{2}, -1, \frac {7}{8}, \frac {\cos \left (2 x \right )}{2}+\frac {1}{2}\right ) \sqrt {2 \cos \left (2 x \right )+2}+2 \HeunCPrime \left (1, \frac {1}{2}, -\frac {1}{2}, -1, \frac {7}{8}, \frac {\cos \left (2 x \right )}{2}+\frac {1}{2}\right ) \textit {\_C1} +2 \HeunC \left (1, \frac {1}{2}, -\frac {1}{2}, -1, \frac {7}{8}, \frac {\cos \left (2 x \right )}{2}+\frac {1}{2}\right ) \textit {\_C1}}{\sqrt {2 \cos \left (2 x \right )+2}\, \left (\textit {\_C1} \HeunC \left (1, \frac {1}{2}, -\frac {1}{2}, -1, \frac {7}{8}, \frac {\cos \left (2 x \right )}{2}+\frac {1}{2}\right ) \sqrt {2 \cos \left (2 x \right )+2}+\HeunC \left (1, -\frac {1}{2}, -\frac {1}{2}, -1, \frac {7}{8}, \frac {\cos \left (2 x \right )}{2}+\frac {1}{2}\right )\right )}\right ) \sin \left (2 x \right )\right ]$ Mathematica raw input

DSolve[y'[x] == Cos[2*x] + y[x]*(Sin[2*x] + y[x]),y[x],x]

Mathematica raw output

{{y[x] -> (Sec[x]*(C[1]*Sin[x] + Tan[x]/(E^Cos[x]^2*Sqrt[-Sin[x]^2]) + Sin[x]*In
active[Integrate][1/(E^K[1]^2*K[1]^2*Sqrt[-1 + K[1]^2]), {K[1], 1, Cos[x]}]))/(C
[1] + Inactive[Integrate][1/(E^K[1]^2*K[1]^2*Sqrt[-1 + K[1]^2]), {K[1], 1, Cos[x
]}])}}

Maple raw input

dsolve(diff(y(x),x) = cos(2*x)+(sin(2*x)+y(x))*y(x), y(x))

Maple raw output

[y(x) = (2*HeunCPrime(1,1/2,-1/2,-1,7/8,1/2*cos(2*x)+1/2)*_C1/(2*cos(2*x)+2)^(1/
2)/(_C1*HeunC(1,1/2,-1/2,-1,7/8,1/2*cos(2*x)+1/2)*(2*cos(2*x)+2)^(1/2)+HeunC(1,-
1/2,-1/2,-1,7/8,1/2*cos(2*x)+1/2))*cos(2*x)+(HeunCPrime(1,-1/2,-1/2,-1,7/8,1/2*c
os(2*x)+1/2)*(2*cos(2*x)+2)^(1/2)+2*HeunCPrime(1,1/2,-1/2,-1,7/8,1/2*cos(2*x)+1/
2)*_C1+2*HeunC(1,1/2,-1/2,-1,7/8,1/2*cos(2*x)+1/2)*_C1)/(2*cos(2*x)+2)^(1/2)/(_C
1*HeunC(1,1/2,-1/2,-1,7/8,1/2*cos(2*x)+1/2)*(2*cos(2*x)+2)^(1/2)+HeunC(1,-1/2,-1
/2,-1,7/8,1/2*cos(2*x)+1/2)))*sin(2*x)]