# Thread: Integration of tan(x) * sec^2(x) dx

1. ## Integration of tan(x) * sec^2(x) dx

Hi,

I'm having real trouble with the following integration. I've tried it by parts but that's not going well for me.

$\displaystyle \int{ \tan{}x\sec{}^2x } dx$

The given answer I have is $\displaystyle \frac{\sec{}^2x}{2} + C$ but I unfortunately can't seem to arrive at it (or any other answer.)

Can anyone help? Thanks!

2. This one is actually very easy.

Let $\displaystyle u=sec(x), \;\ du=sec(x)tan(x)dx$

$\displaystyle \int u du$

3. Let $\displaystyle u=\tan{x}$; then $\displaystyle du=\sec^2{x}\,dx$.

4. Ah-ah! I knew I was missing something! Thanks.

However, there's something I'm unclear about here. Using galactus's suggestion of letting $\displaystyle u = \sec{}x$, we get $\displaystyle du = \sec{}x\tan{}x dx$, and so

$\displaystyle \int{\tan{}x\sec{}^2x dx} = \int{u du} = \frac{u^2}{2} = \frac{\sec{}^2x}{2} + C$

That's fine, until I attempt JaneBennet's alternative suggestion: let $\displaystyle u = \tan{}x$, so $\displaystyle du = \sec{}^2x dx$, and so

$\displaystyle \int{\tan{}x\sec{}^2x dx} = \int{u du} = \frac{u^2}{2} = \frac{\tan{}^2x}{2} + C$

But I think $\displaystyle \frac{\sec{}^2x}{2}$ and $\displaystyle \frac{\tan{}^2x}{2}$ aren't equivalent, are they? What have I done wrong there? (Or is it that both are correct but the constants would have different values?)

5. Hello
Originally Posted by Wonkihead
But I think $\displaystyle \frac{\sec{}^2x}{2}$ and $\displaystyle \frac{\tan{}^2x}{2}$ aren't equivalent, are they? What have I done wrong there?
Nothing is wrong in your work except that you forgot to add a constant to each anti-derivative. Using $\displaystyle \tan^2x+1=\sec^2x$, one can show that the two answers you've found are in fact similar :

$\displaystyle \int{\tan{}x\sec{}^2x \,\mathrm{d}x}= \frac{\tan{}^2x}{2}+C=\frac{\sec^2x}{2}-\underbrace{\frac12+C}_{\text{constant}}=\frac{\se c^2x}{2}+C'$

6. Hello, Wonkihead!

You left out the "plus C" . . .

There's something I'm unclear about here.
Using galactus' suggestion of letting $\displaystyle u = \sec x$, we get $\displaystyle du = \sec x\tan x\,dx$

. . and so: .$\displaystyle \int \tan x\sec^2\!x\,dx \:= \:\int u\,du \:=\:\frac{u^2}{2}\:=\:\frac{1}{2}\sec^2\!x$

That's fine, until I attempt JaneBennet's alternative suggestion:
let $\displaystyle u = \tan x$, so $\displaystyle du = \sec^2\!x\,dx$,

. . and so: .$\displaystyle \int \tan x\sec^2\!x\,dx \:=\: \int u\,du \:= \:\frac{1}{2}u^2\:=\:\frac{1}{2}\tan^2\!x$

But I think $\displaystyle \frac{1}{2}\sec^2\!x$ and $\displaystyle \frac{1}{2}\tan^2\!x$ aren't equivalent, are they? . . . . Yes, they are

What have I done wrong there?

Recall the Identity: .$\displaystyle \sec^2\!\theta \:=\:\tan^2\!\theta + 1$

You should have had: .$\displaystyle \begin{array}{c}\frac{1}{2}\sec^2\!x \:{\color{blue}+ C_1} \\ \\[-3mm] \frac{1}{2}\tan^2\!x \:{\color{blue}+ C_2} \end{array}$

If these are equivalent: .$\displaystyle \frac{1}{2}\sec^2\!x + C_1 \;=\;\frac{1}{2}\tan^2\!x + C_2$

Multiply by 2: .$\displaystyle \sec^2\!x + 2C_1 \:=\:\tan^2\!x + 2C_2 \quad\Rightarrow\quad \sec^2\!x \:=\:\tan^2\!x + 2C_2-2C_1$

$\displaystyle \text{We have: }\;\sec^2\!x \;=\;\tan^2\!x + \underbrace{2(C_2-C_1)}_{\text{a constant}}$

If that constant is 1, we have the Identity.
. .The expressions are equivalent!

Edit: flyingsquirrel beat me to me . . . *sigh*
.

7. Thanks all!

I realized I had made that classic schoolboy error and added the constants in an edit before you could both hit Submit

Thanks to everyone's kind help, it makes sense and all is right with the world again.

Thanks again.