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.
 A: $$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'$$
A: It's true that:
$$\dfrac {dy^2}{\color {red}{dy}}=2y$$
But when you differentiate $y^2/2$ with respect to the variable $x$ you get:
$$\dfrac 12\dfrac {dy^2}{\color {red}{dx}}=\dfrac 12\dfrac {dy^2}{dy}\dfrac{dy}{dx}=y\dfrac {dy}{dx}=yy'$$
And you have also:
$$ \int yy'dx=\int y\dfrac {dy}{dx}dx=\int ydy= \dfrac {y^2}2+C$$
A: You have to take some care when you are dealing with multiple variables which may be dependent on each other. Here $y'=\frac {dy}{dx}$ is a derivative with respect to $x$ and you are taking the antiderivative with respect to the variable $x$ and not the variable $y$.
You need to take the same antiderivative on both sides of your equation. There are a number of ways of saying this, and a number of ways of using different notations for the same thing, so it is easy to get confused. But with any equation "do the same to both sides" is the basic rule (and even then there are some operations - eg taking square roots - which require care). Here the key is identifying what is "the same thing" that you are doing.
If you differentiate $y^2$ with respect to $x$ you will find that you get $2yy'$, while if you differentiate with respect to $y$ you get $2y$. Likewise taking the antiderivative is different in the two cases.
A: 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}$$
