Let f(x)=xn+axn−1+a2xn−2+⋯+an−1x+an. Here a is a constant, so each ar is a constant multiple and an is a constant term.
We use dxd(xn)=nxn−1, the derivative of a constant is 0, and the derivative of a sum or difference is the sum or difference of the derivatives.
f′(x)=nxn−1+a(n−1)xn−2+a2(n−2)xn−3+⋯+an−1⋅1+0
=nxn−1+a(n−1)xn−2+a2(n−2)xn−3+⋯+an−1
∴f′(x)=nxn−1+a(n−1)xn−2+a2(n−2)xn−3+⋯+an−1.