# How do you differentiate f(x)=tan(e^(1/x))  using the chain rule?

Nov 6, 2016

$\frac{d}{\mathrm{dx}} \left[f \left(g \left(x\right)\right)\right] = f ' \left(g \left(x\right)\right) g ' \left(x\right)$

#### Explanation:

The chain rule allows us to take the derivative of a composition of two or more functions. For two functions:

$\frac{d}{\mathrm{dx}} \left[f \left(g \left(x\right)\right)\right] = f ' \left(g \left(x\right)\right) g ' \left(x\right)$

We can see that the function $f \left(x\right)$ is composed of three functions, each nestled inside the last.

By the chain rule, we first need to take the derivative of the outermost function and work our way in. It's like taking the function apart layer by layer until we get all the way through.

First, we take the derivative of the tangent function, which is ${\sec}^{2}$. This gives us:

${\sec}^{2} \left({e}^{\frac{1}{x}}\right)$

Next, we take the derivative of the $e$ term. This, as always, is just itself. We multiply this by the first portion of the derivative as we determined above. Thus, we have so far:

${\sec}^{2} \left({e}^{\frac{1}{x}}\right) \cdot {e}^{\frac{1}{x}}$

Lastly, we take the derivative of $\frac{1}{x}$. Recognizing that this is equivalent to ${x}^{-} 1$, we have $- {x}^{- 2}$. And so, our final answer becomes:

$- {\sec}^{2} \left({e}^{\frac{1}{x}}\right) {e}^{\frac{1}{x}} {x}^{-} 2$

This can also be written as:

$\frac{- {\sec}^{2} \left({e}^{\frac{1}{x}}\right) {e}^{\frac{1}{x}}}{x} ^ 2$