want to check a question and solution.

differentiate with respect to x

$\displaystyle y= (x^3+4)/x$

= $\displaystyle x^2+4x^-{^1}$

( this is the line im confused about why does the x^3 become x^2 and not 3x) or is it wrong.

$\displaystyle dy/dx = 2x-4x^{-2}$

many thanks