# Integration of a trig function

• chwala
In summary, the conversation discusses different approaches to solving a problem involving the integral of the secant function. The first attempt uses substitution and partial fractions, while the second attempt uses the derivative of the secant function. The expert summarizer notes that there is an error in the second attempt's derivative and provides the correct formula. The conversation ends with a clarification on which post the expert's replies are referring to.

#### chwala

Gold Member
Homework Statement
##\int\frac {tan x}{1+ cos^2x}dx##
Relevant Equations
integration

This is my first attempt ...

Last edited:

my second attempt...

Last edited:

My third attempt...bingo, I got it!

Last edited:
Your method works, but I did it with ## \tan{x}=\sin{x}/\cos{x} ##, and ## \sin{x} \, dx=-d \cos{x} ##.
With ## u=\cos{x} ##, the problem then becomes an exercise in partial fractions, and it also gets the same answer as that of the above post.

chwala
chwala said:
my other approach...

This works nicely, but you have an error in differentiating.

The derivative of ##\sec x ## is ##\tan x \cdot \sec x##,

so that ##du=2\tan x \cdot \sec^2 x \ dx##.

The rest of the work will follow nicely from that.

Yeah I noticed that...thanks slight error, I left out ##dx##

chwala said:
Yeah I noticed that...thanks slight error, I left out ##dx##
You also missed squaring the secant function.

SammyS said:
You also missed squaring the secant function.
I think you are looking at the wrong page, check my post number ##3##

chwala said:
I think you are looking at the wrong page, check my post number ##3##
No. My replies are referring to Post # 2.

You have the following:

But you have an error in du.

It should be ##du=2\tan x \cdot \sec^2 x \ dx ## .

Thus your integral becomes ##\displaystyle \frac 1 2 \int \frac{du}{u} ## .

Etc.

Last edited:
SammyS said:
No. My replies are referring to Post # 2.

You have the following:
View attachment 275901
But you have an error in du.

It should be ##du=2\tan x \cdot \sec^2 x \ dx ## .

Thus your integral becomes ##\displaystyle \frac 1 2 \int \frac{du}{u} ## .

Etc.

Noted cheers...