# Finding the $n$-th derivative of $a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0$

Let $f(x)= a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0$. I am trying to find $f^n(x)$.

By applying the power rule $n$ times, I get this $$f^n(x)=a_{n}(n\cdot n)x^{n-n}+\cdots+ a_1$$ which I think can be simplified to $$f^n(x)=a_{n}n^2+\cdots+ a_1$$

However, I don't think I have the correct answer, as my exercise book is telling me the answer is. $$a_n\,n\cdot(n-1)\cdot\,\cdots\,\cdot 1$$

What did I do wrong? I'm under the impression I have done multiple mistakes.

• Start with $\,\left(x^n\right)' = n x^{n-1}\,$, $\,\left(x^n\right)'' = n(n-1) x^{n-2}\,$, $\,\left(x^n\right)''' = n(n-1)(n-2) x^{n-3} \,\ldots\,$ – dxiv Jul 30 '18 at 0:34
• Hint: $(x^n)' = n x^{n-1}$, but $(nx^{n-1})' = n(n-1) x^{n-2}$, and so on. Repeated application of the power rule give a falling factorial coefficient. – Xander Henderson Jul 30 '18 at 0:35
• The exercise book should say the answer is $a_nn(n-1)...1$. – 高田航 Jul 30 '18 at 0:39
• You are right, that is the answer in the book. I badly transcribed it, I modified my question. Thank you – Cedric Martens Jul 30 '18 at 0:41

Recall that the power rule for differentiation states:

Let $f(x)=x^n$ for some $n\in\mathbb{R}\backslash\lbrace 0\rbrace$. Then, $$\frac{d}{dx}f(x)=nx^{n-1}$$

Also recall that differentiation is linear in the sense that $$\frac{d}{dx}[f_1(x)+f_2(x)+\cdots+f_k(x)]=\frac{d}{dx}f_1(x)+\frac{d}{dx}f_2(x)+\cdots+\frac{d}{dx}f_k(x)$$ Now consider your function $f(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0$. Differentiating and applying linearity, we obtain $$\frac{d}{dx}f(x)=\frac{d}{dx}a_nx^n+\frac{d}{dx}a_{n-1}x^{n-1}+\cdots+\frac{d}{dx}a_1x+\frac{d}{dx}a_0$$ The constant term at the end becomes $0$, since the derivative of a constant is always $0$. The second to last term, $\frac{d}{dx}a_1x$ is simply $a_1$, since the derivative of a line is always its slope. As for the other terms, we simply apply the power rule. After completing the first round of differentiation, we should have something like this: $$f^1(x)=a_nnx^{n-1}+a_{n-1}x^{n-2}+\cdots+a_2x+a_1$$ If we keep repeating the differentiation process, you will see that there is always a constant term $a_m$ at the end which just becomes $0$. Since $f(x)$ has $n+1$ terms (each $a_ix^i$ from $i=0$ up to $i=n$), after $n$ rounds of differentiation, you should have eliminated all the terms except for the very first one: $a_nx^n$. Applying the power rule to just that term, we get: \begin{align} \frac{d}{dx}a_nx_n &=a_nnx^{n-1}\\ \frac{d}{dx}a_nnx^{n-1} & = a_nn(n-1)x^{n-2}\\ \frac{d}{dx}a_nn(n-1)x^{n-2}& =a_nn(n-1)(n-2)x^{n-3} \\ &\vdots \\ \frac{d}{dx}a_nn(n-1)(n-2)\cdots(3)x^2& =a_nn(n-1)(n-2)\cdots(3)(2)x \\ \frac{d}{dx}a_nn(n-1)(n-2)\cdots(3)(2)x&=a_nn(n-1)(n-2)\cdots(3)(2)(1) \\ & = a_n\cdot n! \end{align}

First, you should convince yourself that all the terms on the right after the first do not contribute because you eventually take the derivative of a constant, which is zero.

Then do it by hand for $n=3$. We want the third derivative of $a_3x^3$. The first derivative is $3a_3x^2$, the second is $3\cdot 2 a_3x$, the third is $3\cdot 2 \cdot 1a_3=3!a_3$

Now convince yourself that this is general and $f^n(x)=a_nn!$

Your proposed answer has two problems: the exponent decreases by $1$ each time you take a derivative so the second one should be $n-1$ and there are $n$ derivatives, not $2$. The numbers you bring down are multiplied, not added.