<s>[INST] Can anyone explain this process of solving? (Differentiation) I'm at differentiation of algebraic functions. There's an example in the module that I couldn't quite get how it led to that.
$y=\frac {(x+1)^3}{x^2}$
It's solved by using a combination of quotient and power rules. I'll enumerate how it's solved.
$(1) y′= \frac{(x^2(3(x+1)^2))–(x+1)^32x}{x^4}$
$(2) y′= \frac{x(x+1)^2 (3x–2(x+1))}{x^4}$
$(3) y′= \frac {(x+1)^2 (3x-2x-2)}{x^3}$
$(4) y′= \frac {(x+1)^2 (x-2)}{x^3}$
How did $(2)$ came to be? Why was it done like that? I just can't wrap my head around it. It just looked like it skipped a couple steps (at least to me). Can anyone help me with this?
 [/INST] Here is one way to solve it. Use the fact that the derivative of $(ax+b)^n=n(ax+b)^{n-1}(ax+b)'$. This just follows from the chain rule.
Rewrite the equation as $y=(x+1)^3x^{-2}$. Then apply the product rule. The product rule says $(f(x)g(x))'=f(x)g'(x)+g(x)f'(x)$.
Thus, we get $((x+1)^3x^{-2})'=((x+1)^3\cdot-2x^{-3})+3(x+1)^2x^{-2}$.
Writing this out in a clean way we get: $((x+1)^3x^{-2})'=\frac {-2(x+1)^3} {x^3}+\frac {3(x+1)^2} {x^2}=\frac {-2(x+1)^3+3x(x+1)^2} {x^3}$.
Now factor out $(x+1)^2$ to get $\frac {(x+1)^2(-2(x+1)+3x)} {x^3}=\frac {(x+1)^2(-2x-2+3x)} {x^3}=\frac {(x+1)^2(x-2)} {x^3}$
</s>