If $y_1 =2$ is a solution of the Riccati equation $y'+y-y^2=-2$, find another solution $y_2$ such that $y_2(0)=3$ Let $y=u^{-1}$. The associated homogeneous equation can be written as
$$-\frac{u'}{u^2} + \frac{1}{u} - \frac{1}{u^2} = 0 \iff \\ u' -u=-1 \iff \\ u=Ce^x +1$$
However, 
$$\begin{cases} y_2= 2+ (Ce^x + 1)^{-1} \\y_2(0)=3  \end{cases}$$
implies $y_2\equiv 3$, which is not a solution of the original equation. I'm guessing the substitution $y=u^{-1}$ got us into trouble when $e^x = -C^{-1}$. 
What's the proper way to approach this exercise?
 A: The differential equation you're solving is not linear, so other methods have to be used. The method you used applies to linear equations. You can solve it as a separable differential equation. Write
$$y'=y^2-y-2$$
When $y$ is a constant which makes the right-hand side $0$, we get $y\equiv 2$ and $y\equiv -1$, which don't satisfy our initial condition. So
$$\frac{y'}{y^2-y-2}=1 $$
and then integrate and use partial fractions for the integral:
$$\int \frac{\mathrm{d}y}{y^2-y-2}=\int\mathrm{d}x $$
$$\int\left(\frac{\frac13}{y-2}+\frac{\frac{-1}{3}}{y+1}\right)\,\mathrm{d}y=\int\mathrm{d}x $$
You'll get
$$\frac{y-2}{y+1}=ke^{3x}\Rightarrow y=\frac{2+ke^{3x}}{1-ke^{3x}} $$
Finally, plug in $y(0)=3$ to find the constant and simplify your result. The answer is
$$y=\frac{8+e^{3x}}{4-e^{3x}}$$
A: You used the correct substitution in constructing $y_2$, but not in deriving the differential equation for $u$. You also have to use in the beginning the substitution 
$$
y=2+u^{-1}.
$$
Then the associated equation is
$$
-u^{-2}u'+2+u^{-1}-4-4u^{-1}-u^{-2}=-2
\\
u'+3u+1=0\implies u=Ce^{3x}-\frac13.
$$
For $y(0)=3$ you need $u(0)=1$ which gives $C=\frac43$.
