# What is the integral of int tan^4x dx?

Mar 28, 2016

$\frac{{\tan}^{3} x}{3} - \tan x + x + C$

#### Explanation:

Solving trig antiderivatives usually involves breaking the integral down to apply Pythagorean Identities, and them using a $u$-substitution. That's exactly what we'll do here.

Begin by rewriting $\int {\tan}^{4} x \mathrm{dx}$ as $\int {\tan}^{2} x {\tan}^{2} x \mathrm{dx}$. Now we can apply the Pythagorean Identity ${\tan}^{2} x + 1 = {\sec}^{2} x$, or ${\tan}^{2} x = {\sec}^{2} x - 1$:
$\int {\tan}^{2} x {\tan}^{2} x \mathrm{dx} = \int \left({\sec}^{2} x - 1\right) {\tan}^{2} x \mathrm{dx}$
Distributing the ${\tan}^{2} x$:
$\textcolor{w h i t e}{X X} = \int {\sec}^{2} x {\tan}^{2} x - {\tan}^{2} x \mathrm{dx}$
Applying the sum rule:
$\textcolor{w h i t e}{X X} = \int {\sec}^{2} x {\tan}^{2} x \mathrm{dx} - \int {\tan}^{2} x \mathrm{dx}$

We'll evaluate these integrals one by one.

First Integral
This one is solved using a $u$-substitution:
Let $u = \tan x$
$\frac{\mathrm{du}}{\mathrm{dx}} = {\sec}^{2} x$
$\mathrm{du} = {\sec}^{2} x \mathrm{dx}$
Applying the substitution,
$\textcolor{w h i t e}{X X} \int {\sec}^{2} x {\tan}^{2} x \mathrm{dx} = \int {u}^{2} \mathrm{du}$
$\textcolor{w h i t e}{X X} = {u}^{3} / 3 + C$
Because $u = \tan x$,
$\int {\sec}^{2} x {\tan}^{2} x \mathrm{dx} = \frac{{\tan}^{3} x}{3} + C$

Second Integral
Since we don't really know what $\int {\tan}^{2} x \mathrm{dx}$ is by just looking at it, try applying the ${\tan}^{2} = {\sec}^{2} x - 1$ identity again:
$\int {\tan}^{2} x \mathrm{dx} = \int \left({\sec}^{2} x - 1\right) \mathrm{dx}$
Using the sum rule, the integral boils down to:
$\int {\sec}^{2} x \mathrm{dx} - \int 1 \mathrm{dx}$
The first of these, $\int {\sec}^{2} x \mathrm{dx}$, is just $\tan x + C$. The second one, the so-called "perfect integral", is simply $x + C$. Putting it all together, we can say:
$\int {\tan}^{2} x \mathrm{dx} = \tan x + C - x + C$
And because $C + C$ is just another arbitrary constant, we can combine it into a general constant $C$:
$\int {\tan}^{2} x \mathrm{dx} = \tan x - x + C$

Combining the two results, we have:
$\int {\tan}^{4} x \mathrm{dx} = \int {\sec}^{2} x {\tan}^{2} x \mathrm{dx} - \int {\tan}^{2} x \mathrm{dx} = \left(\frac{{\tan}^{3} x}{3} + C\right) - \left(\tan x - x + C\right) = \frac{{\tan}^{3} x}{3} - \tan x + x + C$

Again, because $C + C$ is a constant, we can join them into one $C$.