# How do you differentiate f(x)=cos(sqrt(3+e^(x^2))) using the chain rule?

Nov 10, 2015

$- \frac{x \setminus {e}^{{x}^{2}} \setminus \sin \left(\sqrt{3 + {e}^{{x}^{2}}}\right)}{\sqrt{3 + {e}^{{x}^{2}}}}$

#### Explanation:

The chain rule tells you that to differentiate a composite function, you derive the outer function only, and then multiply for the derivative of what's inside, iterating the process if necessary.

So, we have the cosine of a square root of an exponential. This means that we will derive the outer cosine and multiply by the derivative of the root.
Again, the derivative of the root will be the derivative of the outer root multiplied by the derivative of the exponential.
Finally, the derivative of the exponential will be the derivative of the outer exponential, multiplied by the derivative of the exponent.

In formulas, we have

d/dx f(g(h(a(x))) =

 f'(g(h(a(x))) * g'(h(a(x))) * h'(a(x)) * a'(x)

where in your case $f \left(x\right) = \cos \left(x\right)$, $g \left(x\right) = \sqrt{x}$, $h \left(x\right) = 3 + {e}^{x}$, $a \left(x\right) = {x}^{2}$

• So, since $\frac{d}{\mathrm{dx}} \cos \left(x\right) = - \sin \left(x\right)$, the first derivative will be $- \sin \left(\sqrt{3 + {e}^{{x}^{2}}}\right)$, and this is f'(g(h(a(x)))

Let's multiply for the derivative of what's inside:

• Since d/dx sqrt(x)=1/(2sqrt(x)), we have

$\frac{1}{2 \sqrt{3 + {e}^{{x}^{2}}}}$, and this is $g ' \left(h \left(a \left(x\right)\right)\right)$

Let's multiply for the derivative of what's inside:

• Since d/dx 3+e^x=e^x, we have

${e}^{{x}^{2}}$, and this is $h ' \left(a \left(x\right)\right)$

Let's multiply for the derivative of what's inside:

• Since d/dx x^2=2x, we have $a ' \left(x\right) = 2 x$.

Now multiply all the pieces to get

$- \sin \left(\sqrt{3 + {e}^{{x}^{2}}}\right) \cdot \frac{1}{\cancel{2} \sqrt{3 + {e}^{{x}^{2}}}} \cdot {e}^{{x}^{2}} \cdot \cancel{2} x$