# How do you evaluate the integral int xsec^2x?

Jan 14, 2017

$\int x {\sec}^{2} \left(x\right) \mathrm{dx} = x \tan \left(x\right) + \ln \left(\left\mid \cos \right\mid \left(x\right)\right) + C$

#### Explanation:

This is a prime candidate for integration by parts, which takes the form $\int u \mathrm{dv} = u v - \int v \mathrm{du}$.

For the given integral $\int x {\sec}^{2} \left(x\right) \mathrm{dx}$, we want to choose a value of $u$ that gets simpler when we differentiate it and a value of $\mathrm{dv}$ that is easily integrated.

So, let:

$\left\{\begin{matrix}u = x \text{ "=>" "du=dx \\ dv=sec^2(x)dx" "=>" } v = \tan \left(x\right)\end{matrix}\right.$

We then have:

$\int x {\sec}^{2} \left(x\right) \mathrm{dx} = u v - \int v \mathrm{du}$

$\textcolor{w h i t e}{\int x {\sec}^{2} \left(x\right) \mathrm{dx}} = x \tan \left(x\right) - \int \tan \left(x\right) \mathrm{dx}$

You may have the integral of $\tan \left(x\right)$ memorized. If not, it's easy to find:

$\textcolor{w h i t e}{\int x {\sec}^{2} \left(x\right) \mathrm{dx}} = x \tan \left(x\right) - \int \sin \frac{x}{\cos} \left(x\right) \mathrm{dx}$

Let $t = \cos \left(x\right)$, implying that $\mathrm{dt} = - \sin \left(x\right) \mathrm{dx}$:

$\textcolor{w h i t e}{\int x {\sec}^{2} \left(x\right) \mathrm{dx}} = x \tan \left(x\right) + \int \frac{- \sin \left(x\right)}{\cos} \left(x\right) \mathrm{dx}$

$\textcolor{w h i t e}{\int x {\sec}^{2} \left(x\right) \mathrm{dx}} = x \tan \left(x\right) + \int \frac{1}{t} \mathrm{dt}$

This is a common integral:

$\textcolor{w h i t e}{\int x {\sec}^{2} \left(x\right) \mathrm{dx}} = x \tan \left(x\right) + \ln \left(\left\mid t \right\mid\right) + C$

Working back from $t = \cos \left(x\right)$:

$\textcolor{w h i t e}{\int x {\sec}^{2} \left(x\right) \mathrm{dx}} = x \tan \left(x\right) + \ln \left(\left\mid \cos \right\mid \left(x\right)\right) + C$