RICCATI EQUATION AND SUBSTITUTION METHOD
dy/dx=(2cos²(x)-sin²(x)+y²)/2cos(x).
Note that if y=sin(x), then dy/dx=2cos²(x)/2cos(x)=cos(x).
But if y=sin(x), dy/dx=cos(x), therefore y=sin(x) is a particular solution, y₁, that is:
dy₁/dx=cos(x).
To find the general solution:
Let y=y₁+1/v where v is another function of x, so:
y=sin(x)+1/v.
dy/dx=dy₁/dx-(1/v²)dv/dx.
dy/dx=dy₁/dx-(1/v²)dv/dx=(2cos²(x)-sin²(x)+y²)/2cos(x),
Substitute for y: (2cos²(x)-sin²(x)+(sin(x)+1/v)²)/2cos(x),
dy₁/dx-(1/v²)dv/dx=(2cos²(x)-sin²(x)+sin²(x)+2sin(x)/v+1/v²)/2cos(x).
cos(x)-(1/v²)dv/dx=(2cos²(x)+2sin(x)/v+1/v²)/2cos(x),
cos(x)-(1/v²)dv/dx=2cos²(x)/2cos(x)+(2sin(x)/v+1/v²)/2cos(x),
cos(x)-(1/v²)dv/dx=cos(x)+(2sin(x)/v+1/v²)/2cos(x),
-(1/v²)dv/dx=(2sin(x)/v+1/v²)/2cos(x).
Multiply through by -v²:
dv/dx=-(2vsin(x)+1)/2cos(x)=-vtan(x)-½sec(x).
dv/dx+vtan(x)=-½sec(x).
We can solve this by using a multiplication factor, eᵐ, where
m=∫tan(x)dx=∫sin(x)dx/cos(x)=-ln(cos(x))=ln(sec(x)).
eᵐ=sec(x), so, multiplying through by sec(x):
sec(x)dv/dx+vsec(x)tan(x)=-½sec²(x).
d(vsec(x))=-½sec²(x)dx.
Integrating:
vsec(x)=-½tan(x)+C.
Multiply through by cos(x):
v=-½sin(x)+Ccos(x).
Therefore, y=sin(x)+1/v=sin(x)+1/(Ccos(x)-½sin(x)).
This can be written:
y=sin(x)+2/(2Ccos(x)-sin(x)) or
y=sin(x)+2/(acos(x)-sin(x)), where a is a constant (a=2C).
This is the general solution.