y= 1/x find dy/dx
If $\displaystyle y=x^n$ then $\displaystyle \frac{dy}{dx} = nx^{n-1}$.
Here $\displaystyle y=\frac{1}{x}$. Keep in mind, $\displaystyle x \neq 0 $
Do you remember your index laws? One is $\displaystyle a^{-n} = \frac{1}{a^n}$.
Using this index law, we turn the function into
$\displaystyle y = x^{-1}$.
So the derivative is $\displaystyle \frac{dy}{dx} = -1 x^{-2} = -\frac{1}{x^2}$. Clearly, once again, $\displaystyle x \neq 0$.