# Find the nth derivative of $\cos(x^3)$

This is a Calculus exam task:

Let $$f : \Bbb R \to \Bbb R$$ be a function defined as $$f(x) = \cos(x^3)$$. Calculate $$f^{(25)}(0)$$.

Searching for an answer online only yielded answers to questions such as $$\cos^3(x)$$ or $$\cos(3x)$$, but not my example. I've tried deriving the function twice thus getting the following differential equation:

$$y'' = -6x\sin(x^3)-9x^4y$$

While I do get only a single recursion by this method, I get stuck with a $$(n-3)^{\text{rd}}$$ derivative of $$\sin(x^3)$$ after applying the Leibniz formula:

$$y^{(n)}=-6\sum_{k=0}^{n-2}\binom{n-2}{k}x^{(k)}\left(\sin(x^3)\right)^{(n-2-k)}-9\sum_{k=0}^{n-2}\binom{n-2}{k}(x^4)^{(k)}y^{(n-2-k)}$$

$$\Rightarrow y^{(n)}(0)=-6(n-2)\left(\sin(x^3)\right)^{(n-3)} -9(n-2)(n-3)(n-4)(n-5)y^{(n-6)}(0)$$

I'm confused over the derivative operator's precedence. My question is whether it is legal math if I immediately plug $$x=0$$ as the sine's argument and then derive, thus only getting the following:

$$y^{(n)}(0)\stackrel{?}{=}-9(n-2)(n-3)(n-4)(n-5)y^{(n-6)}(0)$$

If the above is true, then the given problem is fairly easy to finish:

$$y^{(25)}(0) = (-9)^4\space\frac{23!}{19\cdot18\cdot13\cdot12\cdot7\cdot6}\space y'(0) = 0$$

However, something tells me that's not the way to go; otherwise all derivatives of anything may as well be 0, as they would be treated as constants when deriving.

I did try to derive the second derivative a few more times, but the Leibniz formula then becomes a hot mess express. When I apply the formula over $$y^{(4)}$$, which I found was the first one to have the sine function obscured under a $$y$$ variable, I get a multiple recursion by the means of $$y^{(n)}=\ldots y^{(n-4)}+\ldots y^{(n-6)}+\ldots y^{(n-7)}$$

Are there any other means of solving this task, perhaps by not using the Leibniz formula at all?

• Why derive a differential equation? why not simply perform the derivative? $$3^n \cos \left(\frac{\pi n}{2}+3 x\right)$$ Commented Aug 16, 2021 at 16:16
• I believe the derivative of $\cos(x^3)$ is $-3x^2\sin(x^3)$. The power of 3 prevents me from using the standard formula $(\cos x)^{(n)}=\cos(x+\frac{n\pi}{2})$. Commented Aug 16, 2021 at 16:24
• This question is similar to yours. Commented Aug 16, 2021 at 16:27

By Taylor's theorem$$^1$$ a function $$f(x)$$ infinitely differentiable at $$x=0$$ can be written as

$$f(x) = \sum_{k= 0}^{\infty} \frac{f^k(0)x^k}{k!}$$

We know that $$\cos(x) = \sum_{k = 0 } \frac{(-1)^k x^{2k}}{(2k)!}$$ so it can be shown that $$f(x) = \cos(x^3) = \sum_{k = 0 } \frac{(-1)^k x^{6k}}{(2k)!}$$.

Since the coefficient of $$x^{25}$$ is $$0$$ in the above series, it follows that $$f^{25}(0) = 0$$

Footnotes:

1. For precise statement look here
• Sure, or in this special case, we can see it is 0 simply due to evenness of the function Commented Aug 16, 2021 at 16:36
• @peek-a-boo is correct, of course, but this method can also be used to find $f^{(24)}(0)$, which is not zero. Commented Aug 16, 2021 at 17:54
• It is because the odd order derivative of an even function vanishes at zero. Commented Aug 16, 2021 at 18:00

For $$n\ge0$$, by the Faa di Bruno formula and some properties of the partial Bell polynomials $$B_{n,k}$$, we acquire \begin{align*} \bigl[\cos\bigl(x^3\bigr)\bigr]^{(n)} &=\sum_{k=0}^n \cos\biggl(x^3+\frac{k\pi}{2}\biggr) B_{n,k}\bigl(3x^2,6x,6,0,\dotsc,0\bigr)\\ &=\sum_{k=0}^n \cos\biggl(x^3+\frac{k\pi}{2}\biggr) x^{3k} B_{n,k}\biggl(\frac{\langle3\rangle_1}{x}, \frac{\langle3\rangle_2}{x^2}, \frac{\langle3\rangle_3}{x^3}, \frac{\langle3\rangle_4}{x^4},\dotsc, \frac{\langle3\rangle_{n-k+1}}{x^{n-k+1}}\biggr)\\ &=\sum_{k=0}^n \cos\biggl(x^3+\frac{k\pi}{2}\biggr) x^{3k-n} B_{n,k}(\langle3\rangle_1, \langle3\rangle_2, \langle3\rangle_3, \langle3\rangle_4,\dotsc, \langle3\rangle_{n-k+1})\\ &=\sum_{k=0}^n \cos\biggl(x^3+\frac{k\pi}{2}\biggr) x^{3k-n} \sum _{j=k}^n s(n,j)3^jS(j,k)\\ &\to\begin{cases} 0, & n\ne 3m\\ \displaystyle \cos\biggl(\frac{m\pi}{2}\biggr) \sum _{j=m}^{3m} s(3m,j)3^jS(j,m), & n=3m \end{cases}\\ &=\begin{cases} 0, & n\ne6\ell\\ \displaystyle (-1)^\ell \sum _{j=2\ell}^{6\ell} s(6\ell,j)3^jS(j,2\ell), & n=6\ell \end{cases} \end{align*} as $$x\to0$$ for $$\ell,m\ge0$$, where we used the formula $$$$\label{Stack-tag6-eq} B_{n,k}(\langle\alpha\rangle_1, \langle\alpha\rangle_2, \dotsc,\langle\alpha\rangle_{n-k+1}) =\sum _{j=k}^n s(n,j)\alpha^jS(j,k)$$$$ for $$n\ge k\in\mathbb{N}_0$$ and $$\alpha\in\mathbb{C}$$. Consequently, we obtain $$\begin{equation*} \lim_{x\to}\bigl[\cos\bigl(x^3\bigr)\bigr]^{(25)}=0 \end{equation*}$$ and $$\begin{equation*} \cos\bigl(x^3\bigr) =\sum_{\ell=0}^\infty(-1)^\ell \Biggl[\sum _{j=2\ell}^{6\ell} s(6\ell,j)3^jS(j,2\ell)\Biggr] \frac{x^{6\ell}}{(6\ell)!}. \end{equation*}$$ Comparing the last series expansion with $$\cos\bigl(x^3\bigr)=\sum_{\ell=0}^\infty (-1)^\ell \frac{x^{6\ell}}{(2\ell)!}$$ yields an identity $$\sum _{j=2\ell}^{6\ell} s(6\ell,j)3^jS(j,2\ell)=\frac{(6\ell)!}{(2\ell)!},\quad \ell>0.$$

References

1. Bai-Ni Guo, Dongkyu Lim, and Feng Qi, Maclaurin's series expansions for positive integer powers of inverse (hyperbolic) sine and tangent functions, closed-form formula of specific partial Bell polynomials, and series representation of generalized logsine function, Applicable Analysis and Discrete Mathematics 16 (2022), no. 2, 427--466; available online at https://doi.org/10.2298/AADM210401017G.
2. Bai-Ni Guo and Feng Qi, Viewing some ordinary differential equations from the angle of derivative polynomials, Iranian Journal of Mathematical Sciences and Informatics 16 (2021), no. 1, 77--95; available online at https://doi.org/10.29252/ijmsi.16.1.77.
3. Siqintuya Jin, Bai-Ni Guo, and Feng Qi, Partial Bell polynomials, falling and rising factorials, Stirling numbers, and combinatorial identities, Computer Modeling in Engineering & Sciences 132 (2022), no. 3, 781--799; available online at https://doi.org/10.32604/cmes.2022.019941.
4. Feng Qi, Da-Wei Niu, Dongkyu Lim, and Bai-Ni Guo, Closed formulas and identities for the Bell polynomials and falling factorials, Contributions to Discrete Mathematics 15 (2020), no. 1, 163--174; available online at https://doi.org/10.11575/cdm.v15i1.68111.
5. Feng Qi, Da-Wei Niu, Dongkyu Lim, and Yong-Hong Yao, Special values of the Bell polynomials of the second kind for some sequences and functions, Journal of Mathematical Analysis and Applications 491 (2020), no. 2, Paper No. 124382, 31 pages; available online at https://doi.org/10.1016/j.jmaa.2020.124382.