Is there any method to compute $\frac{d^{n}}{d x^{n}}\left(\cos ^{k} x\right)$ other than complex numbers?

146 Views Asked by At

In this couple of days, I need to know the high derivatives of $cos^kx$ whose power $k$ make the differentiation much harder. Then I attempt to use the identity $$ \cos x=\frac{1}{2}\left(e^{x i}+e^{-x i}\right), $$

to expand it with Binomial expansion $$ \begin{aligned} \cos ^{k} x &=\frac{1}{2 ^k} \sum_{j=0}^{k}\binom{k}{j}e^{x(k-j) i} e^{-x i j} =\frac{1}{2^{k}} \sum_{j=0}^{k}\binom{k}{j} e^{x(k-2 j) i} \end{aligned} $$

Differentiating it by $n$ times yields $$ \begin{aligned} \frac{d^{n}}{d x^{n}}\left(\cos ^{k} x\right) &=\frac{1}{2^k} \sum_{j=0}^{k}\binom{k}{j}[(k-2 j) i]^{n} e^{x(k-2 j) i} \\ &=\frac{i^{n}}{2 ^k} \sum_{j=0}^{k}\binom{k}{j}(k-2 j)^{n} e^{x(k-2 j) i} \\ &=\frac{i^{n}}{2^{k}} \sum_{j=0}^{k}\binom{k}{j}(k-2 j)^{n}[\cos ((k-2 j) x)+i \sin ((k-2 j) x)] \end{aligned} $$

If $x$ is real, then comparing the imaginary and real parts on both sides yields \begin{equation} \displaystyle \frac{d^{n}}{d x^{n}}\left(\cos ^{k} x\right)=\left\{\begin{array}{ll} \displaystyle \frac{(-1)^{\frac{n}{2}}}{2^{k-1}} \sum_{j=0}^{\left\lfloor\frac{k}{2}\right\rfloor}\binom{k}{j}(k-2 j)^{n}\cos((k-2j)x) \quad \textrm{ if n is even.}\\\displaystyle \frac{(-1)^{\frac{n+1}{2}}}{2^{k-1}} \sum_{j=0}^{\left\lfloor\frac{k}{2}\right\rfloor}\binom{k}{j}(k-2 j)^{n} \sin((k-2j)x) \quad \textrm{ if n is odd.} \end{array}\right. \end{equation}



For examples,

  1. When $n$ is even,

$$ \left.\frac{d^{n}}{d x^{n}}\left(\cos ^{k} x\right)\right|_{x=0}=\frac{(-1)^{\frac{n}{2}}}{2^{k-1}} \sum_{j=0}^{\left\lfloor\frac{k}{2}\right\rfloor}\binom{k}{j}(k-2 j)^{n} $$

In particular, $$ \begin{aligned} \left.\frac{d^{6}}{d x^{6}}\left(\cos ^{5} x\right)\right|_{x=0}&=\frac{(-1)^{3}}{2^{4}} \sum_{j=0}^{2}\binom{5}{j}(5-2 j)^{6} \\ &=\frac{1}{16}\left[5^{6}+5 \cdot 3^{6}+10 \cdot 1^{6}\right] \\ &=1205 \end{aligned} $$

  1. When $n$ is odd,$$ \left.\frac{d^{n}}{d x^{n}}\left(\cos ^{k} x\right)\right|_{x=0}=0; $$ $$\left.\frac{d^{n}}{d x^{n}}\left(\cos ^{k} x\right) \right|_{x=\frac{\pi}{4} }= \frac{(-1)^{\frac{n+1}{2}}}{2^{k-1}} \sum_{j=0}^{\left\lfloor\frac{k}{2}\right\rfloor}\binom{k}{j}(k-2 j)^{n} \sin \frac{(k-2 j) \pi}{4} $$

Can we find its closed form without using the complex numbers?

2

There are 2 best solutions below

5
On

Although essentially equivalent, you can say

$$\cos^k(x)=\frac1{2^k}\sum_{j=0}^k{k\choose j}\cos(k-2j)x,$$ which can be proved by induction on $k$, together with the sum formula. Now, differentiating is fairly straightforward, based on casework on $n\pmod 4$.

1
On

You could use Faà di Bruno's formula, with $g(x)=\cos(x)$ and $f(x)=x^k$.

Just for an example, with $\frac{d^3}{dx^3}\cos^4(x)$ you need to sum over $(m_1,m_2,m_3)$ such that $m_1+2m_2+3m_3=3$, with each $m_i\geq0$. Such tuples are: $(3,0,0)$, $(1,1,0)$, and $(0,0,1)$. So $$ \begin{align} \frac{d^3}{dx^3}\cos^4(x) &=\frac{3!}{3!}f^{(3)}(\cos(x))\left(\cos^{(1)}(x)\right)^3 +\frac{3!}{2!}f^{(2)}(\cos(x))\cos^{(1)}(x)\cos^{(2)}(x) +\frac{3!}{3!}f^{(1)}(\cos(x))\cos^{(3)}(x)\\ &=24\cos(x)\left(-\sin^3(x)\right)+3(12)\cos^2(x)\left(-\sin(x)\right)\left(-\cos(x)\right)+4\cos^3(x)\sin(x)\\ &=-24\sin^3(x)\cos(x)+40\sin(x)\cos^3(x) \end{align} $$