# How do I integrate $\frac{1}{x}\frac{d}{dx}\left(x\frac{dy}{dx}+\frac{yx^2}{2}\right)=0$? [closed]

I need to integrate an ODE of the form $$\frac{1}{x}\frac{d}{dx}\left(x\frac{dy}{dx}+\frac{yx^2}{2}\right)=0.$$ I know I need to integrate w.r.t $$x$$ to create a first order ODE but I'm not sure how as the $$dx$$ is in the denominator.

• You have that $\left(x\frac{dy}{dx}+\frac{yx^2}{2}\right)=C$ May 23, 2020 at 16:41

This is a bit of a "hack" solution, but we can multiply both sides by $$x$$ to find $$\frac{\mathrm{d}}{\mathrm{d}x}\left(x\frac{\mathrm{d}y}{\mathrm{d}x}+\frac{yx^2}{2}\right)=0$$ Which tells us that $$\text{deg}\left(x\frac{\mathrm{d}y}{\mathrm{d}x}+\frac{yx^2}{2}\right)=0$$, i.e, it is a constant. So now our equation is $$x\frac{\mathrm{d}y}{\mathrm{d}x}+\frac{yx^2}{2}=C$$ $$y'+\frac{x}{2}y=\frac{C}{x}$$ This is a first order linear ordinary differential equation, so we can find solutions via the method of Integrating Factors.
$$\frac{1}{x}\frac{d}{dx}\left(x\frac{dy}{dx}+\frac{yx^2}{2}\right)=0$$ Integration gives us: $$xy'+\frac{yx^2}{2}=C$$ It's a first order linear DE.
Whenever you see this $$\dfrac {df}{dx}=0$$ You can deduce that $$f=c$$ Because the only function that gives zero once you differentiate it is the constant function.