Extremely confusing integral

  • Thread starter Elysian
  • Start date
  • #1
33
0

Homework Statement


Find the integral of

[itex]\int\frac{cos(x)}{1+e^{x}}[/itex]

Homework Equations



Given that

[itex]\frac{1}{1+e^{x}}[/itex]-[itex]\frac{1}{2}[/itex] is an odd function

The Attempt at a Solution



I tried integration by parts, with both u = cos(x) and u = 1+e^x, and both only complicated it even more. I've not learned infinite series and sequences so I'm not sure thats the way.

I did try writing cos(x) as [itex]\frac{e^{ix}+e^{-ix}}{2}[/itex], but I'm not sure what to do after that. I can see that there'd be some hyperbolic stuff in here but again, I'm not sure where exactly to start.
 

Answers and Replies

  • #2
LCKurtz
Science Advisor
Homework Helper
Insights Author
Gold Member
9,551
761

Homework Statement


Find the integral of

[itex]\int\frac{cos(x)}{1+e^{x}}[/itex]

Homework Equations



Given that

[itex]\frac{1}{1+e^{x}}[/itex]-[itex]\frac{1}{2}[/itex] is an odd function
I don't see how that is relevant unless you are doing a definite integral on an interval like [-a,a].

The Attempt at a Solution



I tried integration by parts, with both u = cos(x) and u = 1+e^x, and both only complicated it even more. I've not learned infinite series and sequences so I'm not sure thats the way.

I did try writing cos(x) as [itex]\frac{e^{ix}+e^{-ix}}{2}[/itex], but I'm not sure what to do after that. I can see that there'd be some hyperbolic stuff in here but again, I'm not sure where exactly to start.
I don't think there is an elementary antiderivative.
 
  • #3
33
0
I don't see how that is relevant unless you are doing a definite integral on an interval like [-a,a].


I don't think there is an elementary antiderivative.
Oh jeez I forgot to put the interval. its from -pi/2 to pi/2. I'm really sorry about that
 
  • #4
LCKurtz
Science Advisor
Homework Helper
Insights Author
Gold Member
9,551
761
Oh jeez I forgot to put the interval. its from -pi/2 to pi/2. I'm really sorry about that
If ##f(x)## is odd what do you know about ##\int_{-a}^a f(x)\, dx##?
 
  • #5
SammyS
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
11,315
1,006
So, what is [itex]\displaystyle
\int_{-\pi/2}^{\pi/2}\left(\frac{1}{1+e^{x}}-\frac{1}{2}\right)\cos(x)\,dx\ ?[/itex]
 
  • #6
33
0
If ##f(x)## is odd what do you know about ##\int_{-a}^a f(x)\, dx##?
It would equal 0. So as SammyS put it, it would be [itex]\displaystyle
\int_{-\pi/2}^{\pi/2}\left(\frac{1}{1+e^{x}}-\frac{1}{2}\right)\cos(x)\,dx\ ?[/itex], where the first term would go to zero and then I'm left to evaluate the last bit which would be -[itex]\int_{-\pi/2}^{\pi/2}\frac{cos(x)}{2}[/itex]?

So, what is [itex]\displaystyle
\int_{-\pi/2}^{\pi/2}\left(\frac{1}{1+e^{x}}-\frac{1}{2}\right)\cos(x)\,dx[/itex]
Is this just the integral of the right side then? So it's just -1?
 
  • #7
LCKurtz
Science Advisor
Homework Helper
Insights Author
Gold Member
9,551
761
It would equal 0. So as SammyS put it, it would be [itex]\displaystyle
\int_{-\pi/2}^{\pi/2}\left(\frac{1}{1+e^{x}}-\frac{1}{2}\right)\cos(x)\,dx\ ?[/itex], where the first term would go to zero and then I'm left to evaluate the last bit which would be -[itex]\int_{-\pi/2}^{\pi/2}\frac{cos(x)}{2}[/itex]?
No. You don't evaluate an integral in pieces like that. You have ##\frac{1}{1+e^{x}}-\frac{1}{2}## multiplied by ##\cos x##. Is ##\cos x ## even, odd, or neither? What about its product with ##\frac{1}{1+e^{x}}-\frac{1}{2}##?
 
  • #8
SammyS
Staff Emeritus
Science Advisor
Homework Helper
Gold Member
11,315
1,006
It would equal 0. So as SammyS put it, it would be [itex]\displaystyle
\int_{-\pi/2}^{\pi/2}\left(\frac{1}{1+e^{x}}-\frac{1}{2}\right)\cos(x)\,dx\ ?[/itex], where the first term would go to zero and then I'm left to evaluate the last bit which would be -[itex]\int_{-\pi/2}^{\pi/2}\frac{cos(x)}{2}[/itex]?
Remember, the hint says that [itex]\displaystyle \frac{1}{1+e^{x}}-\frac{1}{2}\ [/itex] is odd (that entire expression).

How do you get [itex]\displaystyle \frac{1}{1+e^{x}}-\frac{1}{2}\ [/itex] from [itex]\displaystyle \frac{1}{1+e^{x}}\ ?[/itex]
 

Related Threads on Extremely confusing integral

Replies
5
Views
764
Replies
1
Views
2K
  • Last Post
Replies
3
Views
626
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
1
Views
748
  • Last Post
Replies
2
Views
1K
Replies
14
Views
974
  • Last Post
Replies
2
Views
728
  • Last Post
Replies
0
Views
1K
Top