# Changing the argument for a higher order derivative

$$\frac{d^n}{dx^n} \left[(1-x^2)^{n+\alpha-1/2}\right]$$

Which is part of the Rodrigues definition of a Gegenbauer polynomial. Gegenbauer polynomials are also useful in terms of trigonometric functions so I want to use the substitution $x = \cos\theta$, which is the usual way of doing it. However, I'm stuck as to how this works for the Rodrigues definition, because it gives me a derivative with respect to $\cos\theta$ instead of a derivative with respect to $\theta$:

$$\frac{d^n}{d(\cos\theta)^n} \left[(\sin^2\theta)^{n+\alpha-1/2}\right]$$

QUESTION: Is there a way to write this as $\dfrac{d^n}{d\theta^n}[\text{something}]$?

I have read some about Faa di Bruno's formula for the $n$-th order derivative of a composition of functions but it doesn't seem to do what I want to do.

Also, for n=1 there is the identity, from the chain rule, $\dfrac{d}{d(\cos\theta)} \left[(\sin^2\theta)^{n+\alpha-1/2}\right]=\frac{\frac{d}{d\theta} \left[(\sin^2\theta)^{n+\alpha-1/2}\right]}{\frac{d}{d\theta} \left[\cos\theta\right]}$, but this doesn't hold for higher order derivatives. Any ideas?

-
@all: sorry I had a typo in the original formula, I fixed it now so that the function (in terms of x) that I started with is $(1-x^2)^{n-\alpha-1/2}$ instead of $(1-x)^{n-\alpha-1/2}$, this would seem to affect Nikhil's response? – okj Jan 10 '12 at 21:31

I could be mistaken, but here goes nothing. So you're looking at making the substitution $x = \cos\theta$. When you do this, you will need to change $\frac{d}{dx}$ into $\frac{d}{d\theta}$ via chain rule. Let's let $f(x(\theta))$ be our function we wish to differentiate. From chain rule, $\frac{df}{d\theta} = \frac{df}{dx}\frac{dx}{d\theta}$. You know what $\frac{dx}{d\theta}$ is from your definition of $x$, so you can compute this. This comes out to be $(-\sin(\theta))$. Rewriting our expression, we see that $\frac{df}{dx} = \frac{1}{\frac{dx}{d\theta}} \frac{df}{d\theta}$, or if we drop the function $f$: $\frac{d}{dx} = \frac{1}{\frac{dx}{d\theta}} \frac{d}{d\theta}$. Now we'll make the appropriate substitution to get $\frac{d}{dx} = -\frac{1}{\sin(\theta)}\frac{d}{d\theta}$.

From this, $\left(\frac{d}{dx}\right)^n = (-1)^n \left(\frac{1}{\sin(\theta)} \frac{d}{d\theta}\right)^n$. I'm not sure if a nice expression exists in general for this, but it's pretty easy to compute.

-
This is the same thing as the chain rule thing I suggested, it only works for n = 0,1. It does not work for n > 1, unfortunately. – okj Jan 10 '12 at 21:36
Okay. I had to redo my comment (which took quite some finagling). I'll break it into two parts. The above method should work, but you might be misinterpreting the differential operator $(-1)^n\left(\frac{1}{\sin\theta} \frac{d}{d\theta}\right)^n$. Suppose you wanted to compute $\frac{d^2f}{dx^2}$, but $f$ is actually a function of $\theta$, well we would then use our above formula, but you have to be careful when performing this operation because in general for operators $A$ and $B$, $(AB)^2 \neq A^2B^2$. An easy way to see this is to consider matrices. $(AB)^2 = (AB)(AB) = ABAB \neq A^2B^2$. – Cameron Williams Jan 11 '12 at 3:52
So with that in mind, we'll be careful and operate in steps. $\frac{d^2f}{dx^2} = \left(\frac{1}{\sin\theta}\frac{d}{d\theta}\right)^2 f = \left(\frac{1}{\sin\theta} \frac{d}{d\theta}\right) \left(\frac{1}{\sin\theta}\frac{d}{d\theta}\right)f = \left(\frac{1}{\sin\theta} \frac{d}{d\theta}\right) \left(\frac{1}{\sin\theta}\frac{df}{d\theta}\right)$. Now, we'll use product rule and get: $\frac{1}{\sin\theta}\left(-\frac{\cos\theta}{\sin^2\theta}\frac{df}{d\theta} + \frac{1}{\sin\theta}\frac{d^2f}{d\theta^2}\right)$. You can multiply through by $\frac{1}{\sin\theta}$ if you'd like, but I won't. – Cameron Williams Jan 11 '12 at 3:55
Thanks a lot, you were right, I misinterpreted what you meant by $(\frac{d}{dx})^n=(-1)^n(\frac{1}{\sin\theta}\frac{d}{d\theta})^n$. – okj Jan 11 '12 at 19:48
You're very welcome! – Cameron Williams Jan 12 '12 at 3:40

Instead of Faa di bruno's formula, you can try generalizing the formula for $n^{th}$ derivative of inverse function.

Let $f,g$ be functions of $x$ and inverses of each other. We know that $\displaystyle f'=\frac{1}{g'}$ i.e. $f'g'=1$. Using Leibniz' rule, we get

$\displaystyle (f'g')^{(n)}(\theta)=\sum_{k=0}^n \binom{n}{k} f^{(n-k+1)} g^{(k+1)}(\theta)=0 \cdots (1)$

Using this equation recursively with $x=cos^{2}\theta$, so that $f(\theta)=cos^{2}\theta$ and $f'(\theta)=-2sin\theta cos\theta$, one can find the required values. Thus, we have: $\displaystyle\frac{d}{d(cos^2\theta)}[(sin^2\theta)^{n+\alpha-1/2}\mathbf{]}=\frac{1}{\frac{d}{d(\theta)}[(sin^2\theta)^{n+\alpha-1/2}\mathbf{]}}=\frac{1}{2{sin\theta}^{2n+2\alpha-1}cos\theta}$. Then, using $(1)$, we can determine $\displaystyle{\frac{d^n}{d\theta^n}[(sin^2\theta)^{n+\alpha-1/2}\mathbf{]}}$ for $n>1$ as well.

-
Thanks for your response. I fixed my typo so I think it is ok to use $x=\cos\theta$ now, but I'm still a bit confused about how you got from the first step to the second step? Also, what is your $g'$ from your example? – okj Jan 10 '12 at 21:41