The derivative of a constant times a function is the constant times the derivative of the function.
Apply the power rule: goes to
So, the result is:
Now simplify:
The answer is:
2 n - 1 n *x *(n - 1) ----------------- x
2 -1 + n n *x *(-1 + n)*(-2 + n) ---------------------------- 2 x