Solving a Riccati equation - doesn't fit into any category I tried until now

I have this ODE:

$$p = xp' - x(p^2 + x^2)$$

after dividing by $$x \neq 0$$ we get

$$p' = \frac{p}{x} + p^2 + x^2$$

Which I recognized as a Riccati equation, and also confirmed this on WolframAlpha.

However, here's the problem. We always dealt with three subtypes of the Riccati equation:

a) For any Riccati equation $$y' = P(x)y^2 + Q(x)y + R(x)$$, if P(x), Q(x) and R(x) are constants, then it is a separable equation

b) If $$y' = Ay^2 + \frac{B}{x}y + \frac{C}{x^2}$$, A,B,C are constants, we let $$z=yx, z=z(x)$$

c) If a particular solution $$y_1$$ is known, we let $$y(x) = y_1(x) + \frac{1}{z(x)}$$

However, my equation does not fall into any of the three categories I mentioned and I don't know how to proceed. Any help would be appreciated!

Start with the change of variables $$p=x q$$, giving $$q+xq'=q+x^2(1+q^2).$$ Can you take it from here?
• so I managed to get that $q=\tan{(x+c)}$, and plug it in your equation to give me $p=x*\tan{(x+c)}$. I'm not sure whether I need to find the derivative of $p$ and then plug it into the original equation (because if I do I would only be left with a non-differential equation consisting of the variable $x$. Maybe I just need to plug the value $p$ into the original equation and then solve for $p'$? May 17, 2021 at 13:47
• Sorry, I made a haphazard mistake in calculation and also failed to realize that I just need to plug the solution in $p=xq$. May 17, 2021 at 14:13
$$p = xp' - x(p^2 + x^2)$$ $$xp' -p = x(p^2 + x^2)$$ $$\dfrac {xp' -p}{x^2} = x\left(\dfrac {p^2}{x^2} + 1\right)$$ $$\left(\dfrac {p}{x} \right)' = x\left(\dfrac {p^2}{x^2} + 1\right)$$ This is a separable DE. $$\arctan \left (\dfrac px \right)=\dfrac {x^2}{2}+C$$ $$p=x\tan \left (\dfrac {x^2}{2}+C\right)$$
• Why does $$\dfrac {xp' -p}{x^2} = \left(\dfrac {p}{x} \right)'$$? It looks to me like you dropped a (p/x²) term there. May 17, 2021 at 22:43
• Try to differentiate $f/g$ here $f=p$ and $g=x$ @Brilliand May 17, 2021 at 22:48
• It's the rule. When you differentiate a quotient of functions such as $f/g$ you get : $$\dfrac {f'g-fg'}{g^2}$$ @Brilliand Take a look here for the qotient rule web.iit.edu/sites/web/files/departments/academic-affairs/… May 17, 2021 at 22:54