# integrate the following: inte^x[tanx+sec^2x] ?

Mar 11, 2018

$I = {e}^{x} \tan \left(x\right) + C$

#### Explanation:

We want to solve

$I = \int {e}^{x} \left(\tan \left(x\right) + {\sec}^{2} \left(x\right)\right) \mathrm{dx}$

Split into two integrals

$I = \int {e}^{x} \tan \left(x\right) \mathrm{dx} + \int {e}^{x} {\sec}^{2} \left(x\right) \mathrm{dx}$

Use integration by parts (first integral)

$\int u \mathrm{dv} = u v - \int v \mathrm{du}$

Let $u = \tan \left(x\right) \implies \mathrm{du} = {\sec}^{2} \left(x\right) \mathrm{dx}$

And $\mathrm{dv} = {e}^{x} \mathrm{dx} \implies v = {e}^{x}$

$I = {e}^{x} \tan \left(x\right) - \int {e}^{x} {\sec}^{2} \left(x\right) \mathrm{dx} + \int {e}^{x} {\sec}^{2} \left(x\right) \mathrm{dx}$

A fortunate cancellation

$I = {e}^{x} \tan \left(x\right) + C$

Mar 11, 2018

${e}^{x} \cdot \tan x + c$

#### Explanation:

$I = \int {e}^{x} \left[\tan x + {\sec}^{2} x\right] \mathrm{dx}$
color(red)(I=inte^x[f(x)+f^'(x)]dx=e^xf(x)+c
Here, $f \left(x\right) = \tan x \implies {f}^{'} \left(x\right) = {\sec}^{2} x$
So, $I = \int {e}^{x} \left[\tan x + {\sec}^{2} x\right] \mathrm{dx} = {e}^{x} \cdot \tan x + c$