# What is the second derivative of f(x)=sin(x^2) ?

Feb 14, 2016

$f ' ' \left(x\right) = 2 \cos \left({x}^{2}\right) - 4 {x}^{2} \sin \left({x}^{2}\right)$

#### Explanation:

The first derivative of the function can be found using the chain rule. The chain rule states that when differentiating a function that contains another function inside of it, you should differentiate the outside function while keeping the inside function intact and then multiply that by the derivative of the inside function.

To formalize this, this is written as $\frac{d}{\mathrm{dx}} \left[f \left(g \left(x\right)\right)\right] = f ' \left(g \left(x\right)\right) \cdot g ' \left(x\right)$.

In the case of a sine function, as we have here, the chain rule applies as follows: $\frac{d}{\mathrm{dx}} \left[\sin \left(u\right)\right] = \cos \left(u\right) \cdot u '$.

Here, since we are differentiating $\sin \left({x}^{2}\right)$, $u = {x}^{2}$. This gives us a first derivative of

$f ' \left(x\right) = \cos \left({x}^{2}\right) \cdot \frac{d}{\mathrm{dx}} \left[{x}^{2}\right] = 2 x \cos \left({x}^{2}\right)$

To find the second derivative, we will this time have to use the product rule, since we're multiplying two different functions.

The product rule states that $\frac{d}{\mathrm{dx}} \left[f \left(x\right) g \left(x\right)\right] = f ' \left(x\right) g \left(x\right) + f \left(x\right) g ' \left(x\right)$.

When we apply this to $f ' \left(x\right)$, we obtain a second derivative of

$f ' ' \left(x\right) = \cos \left({x}^{2}\right) \frac{d}{\mathrm{dx}} \left[2 x\right] + 2 x \frac{d}{\mathrm{dx}} \left[\cos \left({x}^{2}\right)\right]$

Here, we have $\frac{d}{\mathrm{dx}} \left[2 x\right] = 2$. The other derivative, however, is interesting in that we almost did the exact same derivative to find the first derivative of the function. This time, though, we have to deal with a cosine function instead of a sine function.

Since the derivative of $\cos \left(x\right)$ is $- \sin \left(x\right)$, the chain rule for cosine functions is $\frac{d}{\mathrm{dx}} \left[\cos \left(u\right)\right] = - \sin \left(u\right) \cdot u '$.

This means that $\frac{d}{\mathrm{dx}} \left[\cos \left({x}^{2}\right)\right] = - \sin \left({x}^{2}\right) \frac{d}{\mathrm{dx}} \left[{x}^{2}\right] = - 2 x \sin \left({x}^{2}\right)$.

Plug both of the derivatives back into the equation for $f ' ' \left(x\right)$ to see that the second derivative is equal to

$f ' ' \left(x\right) = 2 \cos \left({x}^{2}\right) - 4 {x}^{2} \sin \left({x}^{2}\right)$