Answer
See below
Work Step by Step
Given: $y'+2x^{-1}y-y^2=-2x^2$
a) If $y(x)=ax^r$ is the solution to this equation, we obtain:
$y'(x)=arx^{r-1}$
Substitute this into the given equation:
$arx^{r-1}+2x^{-1}ax^r-(ax^r)^2=-2x^2\\
\Leftrightarrow arx^{r-1}+2ax^{r-1}-a^2x^{2r}=-2x^{-2}$
Hence, we can know that $r=-1$
Substitute back: $-a+2a-a^2=-2\\
\Leftrightarrow a^2-a-2=0$
The solutions to this are: $a_1=2 \land a_2=-1$
The solutions to the equation are:
$y_1(x)=-x^{-1}\\
y_2(x)=2x^{-1}$
b) If we substitute $y=2x^{-1}$ and the result of the previous problem into the given equation, we get:
$-2x^{-2}-v^{-2}v'+2x^{-1}(2x^{-1}+v^{-1})-(2x^{-1}+v^{-1})^2=-2x^{-2}\\
\rightarrow -2x^{-2}-v^{-2}v'+4x^{-2}+2x^{-1}v^{-1}-4x^{-2}-4x^{-1}v^{-1}-v^{-2}=-2x^{-2}\\
\rightarrow -v^{-2}v'-2x^{-1}v^{-1}-v^{-2}=0\\
\rightarrow v'+2vx^{-1}+1=0$
Integrating factor is: $I(x)=e^{2\int x^{-1}}=e^2\ln x=x^2$
We have: $\frac{d}{dx}(x^2v)=-x^2\\\rightarrow x^2v=-\frac{x^3}{3}+c\\\rightarrow v(x)=-\frac{x^2}{3}(x^3-c)$
Therefore, the general solution to the Riccati equation is:
$y(x)=2x^{-1}+\frac{x^{-2}}{3}(c-x^{-3})$