Changing the argument for a higher order derivative I start with the following:
$$\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?
 A: 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.
A: 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.
