# Derivative iteration and factorials.

I'm in year 11 at high school and have just learn about calculus and the derivative of a function. I found that if I iterated the function $f(x) = x^n$ through the derivative process $k$ number of times where $k \leq n$ and $f(x)$ is $k=1$, $f'(x)$ is $k=2$ I would get: $[n(n-1)(n-2)...(n-(k-2))]x^{n-k}$. i.e.:

\begin{align} &k = 1: f(x) = x^n\\ &k = 2: f(x) = nx^{n-1}\\ &k = 3: f(x) = n(n-1)x^{n-2} \end{align}

The interesting stuff starts to happen at $k=3$, if I expand out the n terms in front of $x$ I get $n^2 - n$. Now If I take the derivative of this I get $2n-1$ and ignoring constants I get $2n$ and if I sub the value for $k$ in (3), I get 6 for both of them as $3^2 - 3 = 9-3 = 6$ and $2*3 = 6$. This is also interesting as this is the factorial for 3. The same thing happens at $k=4$ and onwards, all the derivatives are equal for the value of the $(k-1)$th derivative of $x^n$ and the product of these derivatives are the factorial value for $k$.

My question is: What have I discovered and, if it is interesting or new.

-
Not sure if I follow what you're doing, where that $n^2-n$ comes from. Assuming n's a constant, you shouldn't be differentiating anything with respect to $n$. On the other hand, there is something somewhat related to what you're doing. You may want to look up about Taylor series. –  Mike Jul 27 '12 at 7:33

Yes, there is actually a nice general formula (which you should be able to prove by induction):

$$\frac{\mathrm d^k}{\mathrm dx^k}x^n=\frac{n!}{(n-k)!}x^{n-k}=k!\binom{n}{k}x^{n-k}$$

-
I think I understand now, but I'm not sure how to use it, or where it would be useful. –  Jordan Brown Jul 27 '12 at 8:02
@Jordan Brown: One place this is useful is in coming up with the Maclaurin series for a (sufficiently nice) function. I don't have time now to write up a specific example (what would probably be much more understandable to you at this point), but this handout goes through the method in full generality. –  Dave L. Renfro Jul 27 '12 at 19:34

A few applications of this, in no particular order:

Later in calculus you'll learn about something called a Taylor Series[1] (or More generally Laurent series[2] if you follow math deep enough in university or independent study). These allow you to represent any function which is infinitely differentiable as a polynomial expression. As a result in order to know what the derivative of a function is you only need to know it is infinitely differentiable, and you can find the Taylor (Laurent) expansion of the function, and get the derivative. This becomes a critically useful technique in numerically approximating solutions for certain models, and also solving differential equations[3] (a subject which you might want to look into as well). This might not seem obvious for first order differentials but if you need to know, say, the force acting on a particle with a particularly nasty position function (but you know the function is continuous and sufficiently smooth, or has an analog with those properties that's "close enough" for your purposes) you can get the series, apply the rule, and figure it out from there.

This formula also allows you to prove (using the method mentioned above with series representations) the results of the other differentiation formulas you likely learned about, by computing the function's series, then applying that general form.

This also leads to another useful result that you'll find later in your study of the subject. Since you have a rule that gives you the nth derivative of any polynomial, if you were given a polynomial and told "this is the 4th derivative of a polynomial" you can immediately write the original polynomial that it came from (there will be a set of undetermined coefficients but you can get an expression to solve algebraically), implying that the derivative is invertible on some functions.

And if you really want to go deep down the rabbit hole there's the Gamma function[4] (you'll need some understanding of integration to understand this bit). With that you can replace your factorials and get the expression: $${{d^q}\over{dt^q}}t^r = {{\Gamma (q+1)}\over{\Gamma(r-q+1)}}t^{r-q}$$

Note that now neither the power of the variable, nor the order of differentiation need to be integer values for the formula to work. This relates to a whole bunch of other things that you're likely to encounter on your own if you try to understand why the expression above can make sense, and I think you'll get more out of looking for it than having it explained clearly (and it's a field that really steps into "curiosity" for ambitious undergraduates, and "really powerful tool" for a great deal of professional work (diffusion theory, solar physics, and continuous probability to name a scant few).

References (they're all Wikipedia links but the articles are a good overview):