How to solve the differential equation $yy' =-x$? I just started learning about Differential Equations and there's this equation that I had problems with:
$$yy' =-x$$
I know that it's a separable ODE and that I can integrate both sides. The right side is then going to be $-\frac{x^2}{2}+c$ but I'm not sure how to go about the left side. I know that the solution is $\frac{y^2}{2} = -\frac{x^2}{2}+c$ but why is the left side equal to that? Usually $\frac{y^2}{2}$ is the anti-derivative of $y$ and not $yy'$. What am I missing here ?
Thanks.
$$y y' = -x$$
$$y \frac{dy}{dx} = -x$$
$$y dy = -x dx$$
This is what it means to separate it. Now only terms involving $y$ are on the left, and terms involving $x$ are on the right. So integrate...
$$y^2/2 + C_1 = - x^2/2 + C_2$$
$$y^2 = -x^2 + C$$
$$y = \pm \sqrt{C-x^2}$$
As another user pointed out, you can also just recognize that $$(y^2)' = 2y y'$$
hint
You can easily check that The antiderivative of
$\sin(x)$ is not $\frac{\sin^2(x)}{2}$
But, you can be sure that the antiderivative of
$\sin(x)\cos(x) $ is $\frac{\sin^2(x)}{2} $.
do not forget to add a constant $ C$.
$$\int x.1.dx =\frac{x^2}{2}$$
and by the same
$$\int y(x).y'(x)dx=\frac{y^2(x)}{2}$$