## Sunday, November 8, 2009

### Integral

Evaluate $\int e^x \sec x \tan^2x dx$

#### Solution

Let $A = \int e^x \sec^3x dx$ and $B = \int e^x \sec x dx$, and since $\tan^2x = \sec^2x-1$, the desired integral is $A-B$.

$A = \int e^x \sec^3x dx$

Here we evaluate it using integration by parts, with

$u = e^x \sec x, du = e^x \sec x (\tan x + 1) dx$

$dv = \sec^2x dx, v = \tan x$

So

$A = uv - \int v du = e^x \sec x \tan x - \int e^x \sec x \tan^2 xdx - \int e^x \sec x \tan x dx$

$= e^x \sec x \tan x - (A-B) - \int e^x \sec x \tan x dx$

Save this equation. Now we evaluate $\int e^x \sec x \tan x dx$ using integration by parts again,

$u = e^x, du = e^x dx$

$dv = \sec x \tan x dx, v =\sec x$

So $\int e^x \sec x \tan x dx = e^x \sec x - \int e^x \sec x dx = e^x \sec x - B$

Plug this back into the saved equation:

$A = e^x \sec x \tan x - (A-B) - \int e^x \sec x \tan x dx$

$= e^x \sec x \tan x - (A-B) - (e^x \sec x - B)$

So $2A-2B = e^x \sec x \tan x - e^x \sec x$

Thus $A-B = (e^x \sec x \tan x - e^x \sec x) / 2$