Integration of a trig function

9 replies · 2K views · last reply
chwala
Gold Member
Messages
2,854
Reaction score
436
Homework Statement
##\int\frac {tan x}{1+ cos^2x}dx##
Relevant Equations
integration
Handwritten integration by substitution: integral of tan x over 1 + cos^2 x dx, with u = 1 + cos^2 x, du/dx = -2 cos x sin x, leading to -1/2 times the integral of du/(u-1), then m = u - 1, and the result -1/2 ln|cos^2 x| + C.

This is my first attempt ...
 
Last edited:
Handwritten working titled Second Attempt integrating tan x over 1 + cos^2 x dx, rewritten via cos^2 x and sec^2 x + 1, substituting u = sec^2 x + 1, leading to one half of the integral of sqrt(u-1)/u du.

my second attempt...
 
Last edited:
Handwritten integration working: integral of tan x over 1 + cos^2 x dx, rewritten through sec^2 x substitution, ending in one half ln|tan^2 x + 2| + C.


My third attempt...bingo, I got it!
 
Last edited:
  • Like
Likes   Reactions: Charles Link and SammyS
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.
 
  • Like
Likes   Reactions: chwala
chwala said:
my other approach...
Handwritten calculus working titled Second Attempt: integral of tan x over (1 + cos^2 x) dx rewritten as tan x / cos^2 x over (sec^2 x + 1), then tan x sec^2 x over (sec^2 x + 1), with u = sec^2 x + 1 and du = 2 tan x sec x dx.
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:
Handwritten second attempt at integrating tan x over 1 + cos^2 x dx, rewritten as tan x cos^2 x over sec^2 x + 1, then tan x times sec^2 x over sec^2 x + 1, with u = sec^2 x + 1 and du = 2 tan x sec x dx.

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...