Originally Posted by

**dhiab** 1) Solve :

$\displaystyle y' = \cos (x) - y\sin (x) + y^2

$

Know : $\displaystyle y = \sin (x)$ is the solution.

If we know a particular solution $\displaystyle y_p$ to the Riccati equation:

$\displaystyle y'+Q(x)y+R(x)y^2=P(x)$

then we can obtain the general solution by making the substitution:

$\displaystyle y=\frac{1}{u}+y_p$

and obtain an easier first order equation:

$\displaystyle u'-(2Ry_p+Q)u=R$

Now, when I do that for the first one, I obtain the general solution for this equation:

$\displaystyle y(x)=\sin(x)+\left(c_1 e^{\cos(x)}-e^{\cos(x)}\int e^{-\cos(x)}\right)^{-1}$.

Now, the interesting part I think, is back-substituting that solution into the original Riccati and verifying that it satisfies it. Forgive me if I'm a little lazy and just used Mathematica:

Code:

In[61]:=
y[x_] := Sin[x] + 1/(c1*Exp[Cos[x]] -
Exp[Cos[x]]*Integrate[Exp[-Cos[x]],
x]);
FullSimplify[D[y[x], x] + Sin[x]*y[x] -
y[x]^2]
Out[62]= Cos[x]

I'm sure you could do the second one now.