Solve $y^{\prime}+y^2-2y \sin(x) = \cos (x)-\sin^2(x)$ Solve the following DE $$y^{\prime}+y^2-2y \sin(x) = \cos (x)-\sin^2(x)$$
Clearly the DE is not separable, linear , bernoulli, exact and homogeneous. But I just learn these five types of DE. Can anyone guide me on this?
 A: Since the questioner has solved this particular ODE, it's time to provide some extra information.
As hinted in the comment,
$$\sin(x)' = \cos(x)\quad\text{ and }\quad y(x)^2 - 2 y(x) \sin(x) + \sin(x)^2 = (y- \sin(x))^2$$
If one define $z(x) = y(x) - \sin(x)$, the ODE can be rewritten / simplified as
$$\begin{align}
&z'(x) + z(x)^2 = 0 \\
\implies & z(x) = \frac{\lambda}{\lambda\,x + 1}\\
\implies & y(x) = \frac{\lambda}{\lambda\,x + 1} + \sin(x) = \frac{\lambda (1 + x\sin(x))  + \sin(x)}{\lambda\,x + 1}\tag{*1}
\end{align}$$
where $\lambda$ is some arbitrary constant. ODE of the form:
$$y'(x) = a(x) y^2(x) + b(x) y(x) + c(x)\tag{*2}$$
is called a Ricatti equation. Its general
solution always has the form similar to $(*1)$:
$$y(x) = \frac{\lambda f_1(x) + f_2(x)}{\lambda f_3(x) + f_4(x)}$$
for arbitrary constant $\lambda$ and suitably chosen functions $f_i(x)$. 
Ricatti equation has some basic properties:


*

*If one solution of $(*2)$ is known, the general solution can be obtained by two quadratures (i.e. simple integration).

*If two solutions are known, the general solution can be obtained by one 
quadrature.

*If three solutions $y_1, y_2, y_3$ are known, then for any other solution
$y$ of $(*2)$, one have:
$$\frac{y - y_1}{y - y_2} \Big/ \frac{y_3 - y_1}{y_3 - y_2} = c, \text{ a constant! }$$
This means once you have found 3 particular solutions, you have all the solutions.


To learn this stuff, the wiki page of Ricatti equation is a possible start.
In particular, look at the section Obtaining solutions by quadrature there.
