I have this here ODE:
$$xy'' = y' + x((y')^2 + x^2)$$
Naturally, I'd try this substitution first: $$y' = p, p=p(x)$$
The equation then transforms into $$xp' = p+x(p^2+x^2)$$ Dividing it by $x$, I get
$$p' = \frac{p}{x} + p^2 + x^2$$
Which is a Riccati equation with the solution: $$p = x \cdot \tan{(\frac{x^2}{2}+C_1)}$$
The thing is, if I substitute back $y'=p$, the integral on the right side is not an easy one to solve, and even if I do solve it with WolframAlpha the solutions are not the same as if I plug in the second-order equation directly. It makes me wonder if I should have tried another substitution/method.
Any help will be appreciated!