From: gjm11@cus.cam.ac.uk (G.J. McCaughan)
Newsgroups: sci.math
Subject: Re: D^k f^n ?
Keywords: differentiation, combinatorics
Date: 11 Sep 92 01:18:37 GMT
Organization: U of Cambridge, England

In article <1992Sep10.172604.6358@jarvis.csri.toronto.edu>, frank@csri.toronto.edu (Frank Kschischang) writes:

> Let f(x) denote some function of x.  Let D=d/dx denote the
> operation of differentiation with respect to x.
> 
> Question:
> Has anybody ever worked out a formula for D^k f^n, the
> k'th derivative of the n'th power of f(x) with respect to x?
> 
> Here `n' is a positive integer, and D^k f is assumed to
> exist for all positive k.

Here's a really daft solution. (The *answer* is the same as you'd get any
other way, but the way of getting it is quite strange.)
Suppose, for the moment, that we're only interested in evaluating this
at x=0, and that f has a Taylor series expansion about the origin.
Then   f(x) = f(0) + f'(0)/1!.x + f''(0)/2!.x^2 + ...
so [f(x)]^n = [f(0) + f'(0)/1!.x + f''(0)/2!.x^2 + ...]^n
            = a_0 + a_1/1!.x + a_2/2!.x^2 + ..., say
                                          (I'll calculate the a_i in a moment)
so the k'th derivative of this at 0 is just a_k.

When we've found the a_k, note that this gives us D^k f^n (0) in terms of the
f^r(0). And of course, if f has a Taylor series everywhere (say, if f is
analytic) then that gives us D^k f^n in terms of the f^r, because there's
nothing special about 0.
The identities we get from this will then be *universally* valid; there are
lots of ways to prove this; we could just prove the results we got by induction
on k, or if you prefer a more highbrow approach note that the analytic functions
are dense in the infinitely differentiable functions (indeed, the polynomials
are dense in the continuous functions!). (That's not actually quite enough;
we need to approximate a function AND some of its derivatives by an analytic
function. This can be done too.)

Right, I'd better evalate a_k then. It's just a matter of applying the
multinomial theorem, and we get
 a_k = sum over (r_0,r_1,...) where r_1 + 2r_2 + 3r_3+... = k
                                    r_0 + r_1 + r_2 + ... = n of:

         n!             k!          r_0     r_1      r_2    (s)   r_s
    -----------  -------------  f(0)   f'(0)   f''(0)   ...f  (0)     
    r_0!r_1!...    r_0  r_1
                 0!   1!   ...

... I suggest you write that down for yourself; it'll be much clearer.
If you're happy with multinomial coefficients, what this says is: the
coefficient of [sum of (D^i f)^r_i] is the product of
   n choose r_0, r_1, r_2,...   and
   k choose 0 [r_0 times], 1 [r_1 times], 2 [r_2 times], ...

So a typical case is n=3,k=4 (we want D^4 f^3). The tuples of r's that
we want are: 20001
             1101
             102
             021
and these give coefficients of 3, 24, 18, 36 respectively. (You'll need
pencil and paper to check this.)
In other words, 
  / 3\''''         2                               2        2
  \f /     = 3 f f'''' + 24 f f' f''' + 18 f f''  + 36 f' f''

and this agrees with what I get on doing the differentiation by hand.
It's pretty nasty however you do it, though!

-- 
Gareth McCaughan     Dept. of Pure Mathematics & Mathematical Statistics,
gjm11@cus.cam.ac.uk  Cambridge University, England.    [Research student]