How is $\int \frac{\frac{d y(x)}{dx}}{y(x)^2}dx = -\frac{1}{y(x)}$ I just saw wolfram-alpha making following statement...
$\int \frac{\frac{d y(x)}{dx}}{y(x)^2}dx = -\frac{1}{y(x)}$
But I am very unsure how to get there.
I always thought I can cancel out the $dx$ and call it a day. Like so:
$\int \frac{\frac{d y(x)}{dx}}{y(x)^2}dx =  \int \frac{d y(x)}{y(x)^2}=\int \frac{d 1}{y(x)}=\frac{1}{y(x)}$
I suppose that's wrong, so where does the minus come from?

I like to think of it as cancelling out the $dx$ but what is actually happening is this:
$$I=\int\frac{dy}{dx}\frac{1}{y^2}dx$$
$u=y(x)\Rightarrow du=y'dx\therefore dx=\frac{du}{y'}$
$$I=\int\frac{y'}{y'}\frac{1}{u^2}du=\int\frac{1}{u^2}du=-\frac{1}{u}+C=-\frac 1y+C$$
