# How do you differentiate f(x)=2secx+(2e^x)(tanx)?

Jul 29, 2015

You use the sum rule and the product rule.

#### Explanation:

Take a look at your function

$f \left(x\right) = 2 \sec x + 2 {e}^{x} \cdot \tan x$

Notice that you can write this function as a sum of two other functions, let's say $g \left(x\right)$ and $h \left(x\right)$, so that you have

$f \left(x\right) = g \left(x\right) + h \left(x\right)$

This will allow you to use the sum rule, which basically tells you that the derivative of a sum of two functions is equal to the sum of the derivatives of those two functions.

color(blue)(d/dx(f(x)) = d/dx(g(x)) + d/dx(h(x))

You also need to know that

$\frac{d}{\mathrm{dx}} \left(\tan x\right) = {\sec}^{2} x$

and that

$\frac{d}{\mathrm{dx}} \left(\sec x\right) = \sec x \cdot \tan x$

So, your function can be differentiate like this

$\frac{d}{\mathrm{dx}} \left(f \left(x\right)\right) = \frac{d}{\mathrm{dx}} \left(2 \sec x\right) + \frac{d}{\mathrm{dx}} \left(2 {e}^{x} \cdot \tan x\right)$

$\frac{d}{\mathrm{dx}} \left(f \left(x\right)\right) = 2 \frac{d}{\mathrm{dx}} \left(\sec x\right) + \frac{d}{\mathrm{dx}} \left(2 {e}^{x} \cdot \tan x\right)$

For the derivative of $h \left(x\right)$ you need to use the product rule, which tells you that the derivative of a product of two functions is equal to

$\textcolor{b l u e}{\frac{d}{\mathrm{dx}} \left[a \left(x\right) \cdot b \left(x\right)\right] = {a}^{'} \left(x\right) b \left(x\right) + a \left(x\right) \cdot {b}^{'} \left(x\right)}$

In your case, you have

$\frac{d}{\mathrm{dx}} \left(2 {e}^{x} \cdot \tan x\right) = \frac{d}{\mathrm{dx}} \left(2 \cdot {e}^{x}\right) \cdot \tan x + \left(2 {e}^{x}\right) \cdot \frac{d}{\mathrm{dx}} \left(\tan x\right)$

$\frac{d}{\mathrm{dx}} \left(2 {e}^{x} \cdot \tan x\right) = 2 {e}^{x} \cdot \tan x + 2 {e}^{x} \cdot {\sec}^{2} x$

Your original derivative will now be

$\frac{d}{\mathrm{dx}} \left(f \left(x\right)\right) = 2 \cdot \sec x \cdot \tan x + 2 {e}^{x} \tan x + 2 {e}^{x} {\sec}^{2} x$

$\frac{d}{\mathrm{dx}} \left(f \left(x\right)\right) = \textcolor{g r e e n}{2 \cdot \left[\sec x \cdot \tan x + {e}^{x} \left(\tan x + {\sec}^{2} x\right)\right]}$