Suppose I didn't know to begin with that $y=x\tan x$ satisfies the differential equation below; how I would I go about solving this differential equation?
$$\frac{dy}{dx}=\frac{y+y^2+x^2}{x}$$ It seems very unlikely that I can use some clever manipulation to convert this into a differential equation that can be solved by separating the variables, and I also don't think that I'd be able to use the integrating factor method here.
The only thing that comes to mind as possibly useful is to use some substitution, but I cannot yet see any substitution that is useful.
Thank you for your help.
I'd use $y = xv$ to homogenize the right side (i.e. $y^2+x^2 = x^2(1+v^2))$
$$y' = v+xv' = \frac{xv+x^2v^2+x^2}{x} = v + x(1+v^2)$$
$$\implies v' = 1+v^2$$
which has the solution $v = \tan(x+C)$ by separation of variables