Stuck in Integrating e^(i*x)cos(x)

  • #1
34
0

Main Question or Discussion Point

I'am trying to prove

[tex]\int e^{ix}cos(x) dx= \frac{1}{2}x-\frac{1}{4}ie^{2ix}[/tex]

Wolfram tells so http://integrals.wolfram.com/index.jsp?expr=e^(i*x)cos(x)&random=false

But I am stuck in obtaining the first term:

My step typically involved integration by parts:

let [itex]u=e^{ix}cos(x)[/itex] and [itex]dv=dx[/itex]

so:

[tex]du=-e^{ix}sin(x)dx+icos(x)e^{ix}[/tex][tex]du=ie^{ix}(sin(x)+cos(x))dx[/tex][tex]du=ie^{2ix}dx[/tex]

the other one is just: [itex]v=x[/itex]

then:
[tex]\int e^{ix}cos(x) dx=xe^{ix}cos(x)-i\int xe^{2ix}dx[/tex]

We will again do another integration by parts for the second term, so we let [itex]u=x[/itex] and [itex]dv=e^{2ix}dx[/itex] then solving further, we obtain:
[tex]\int xe^{2ix}dx=\frac{-i}{2}xe^{2ix}+\frac{1}{4}e^{2ix}[/tex]
plugging it back to the original problem, then doing simple distribution, we will obtain:
[tex]\int e^{ix}cos(x) dx=xe^{ix}cos(x)-i\left ( \frac{-i}{2}xe^{2ix}+\frac{1}{4}e^{2ix}\right )[/tex]
[tex]\int e^{ix}cos(x) dx=xe^{ix}cos(x)- \frac{1}{2}xe^{2ix}-\frac{1}{4}ie^{2ix}[/tex]
notice that we have proved the 2nd term, but the other half is badly away from what the Integration Table and Tools says:
[tex]\int e^{ix}cos(x) dx= \frac{1}{2}x-\frac{1}{4}ie^{2ix}[/tex]

What have I gone wrong?
 

Answers and Replies

  • #2
SteamKing
Staff Emeritus
Science Advisor
Homework Helper
12,796
1,667
I'am trying to prove

[tex]\int e^{ix}cos(x) dx= \frac{1}{2}x-\frac{1}{4}ie^{2ix}[/tex]

Wolfram tells so http://integrals.wolfram.com/index.jsp?expr=e^(i*x)cos(x)&random=false

But I am stuck in obtaining the first term:

My step typically involved integration by parts:

let [itex]u=e^{ix}cos(x)[/itex] and [itex]dv=dx[/itex]

so:

[tex]du=-e^{ix}sin(x)dx+icos(x)e^{ix}[/tex][tex]du=ie^{ix}(sin(x)+cos(x))dx[/tex][tex]du=ie^{2ix}dx[/tex]

the other one is just: [itex]v=x[/itex]

then:
[tex]\int e^{ix}cos(x) dx=xe^{ix}cos(x)-i\int xe^{2ix}dx[/tex]

We will again do another integration by parts for the second term, so we let [itex]u=x[/itex] and [itex]dv=e^{2ix}dx[/itex] then solving further, we obtain:
[tex]\int xe^{2ix}dx=\frac{-i}{2}xe^{2ix}+\frac{1}{4}e^{2ix}[/tex]
plugging it back to the original problem, then doing simple distribution, we will obtain:
[tex]\int e^{ix}cos(x) dx=xe^{ix}cos(x)-i\left ( \frac{-i}{2}xe^{2ix}+\frac{1}{4}e^{2ix}\right )[/tex]
[tex]\int e^{ix}cos(x) dx=xe^{ix}cos(x)- \frac{1}{2}xe^{2ix}-\frac{1}{4}ie^{2ix}[/tex]
notice that we have proved the 2nd term, but the other half is badly away from what the Integration Table and Tools says:
[tex]\int e^{ix}cos(x) dx= \frac{1}{2}x-\frac{1}{4}ie^{2ix}[/tex]

What have I gone wrong?
You can side step a lot of the work above if you remember:

$$cos\, x = \frac{e^{ix}+e^{-ix}}{2}$$
 
  • Like
Likes flux!
  • #3
142
64
I'm sorry, I couldn't follow your answer. But the integral is quite easy. Try using Euler's formula for e^x. Once you do ( and use a simple trigonometric identity) it's an easy
integration.
.
.
Edit: Or you can use the way in the post above mine, your convenience.
 
Last edited:
  • Like
Likes flux!
  • #4
33,722
5,418
I'am trying to prove

[tex]\int e^{ix}cos(x) dx= \frac{1}{2}x-\frac{1}{4}ie^{2ix}[/tex]
All you really need to do is to show that ##\frac d{dx}[\frac x 2 - \frac 1 4 ie^{2ix}] = e^{ix}\cos(x)##. This isn't that hard to do.
 
  • Like
Likes flux!
  • #5
mathman
Science Advisor
7,839
439
Use streamking's approach [itex]cos(x)=\frac{e^{ix}+e^{-ix}}{2}[/itex]. It is now a trivial problem.
 
  • Like
Likes flux!
  • #6
34
0
Darn! Applied steamking's approached, solved in 2 lines only. -_-

Thanks everyone!
 

Related Threads on Stuck in Integrating e^(i*x)cos(x)

  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
7
Views
2K
  • Last Post
Replies
13
Views
2K
  • Last Post
Replies
5
Views
2K
Replies
3
Views
3K
Replies
2
Views
1K
Replies
8
Views
2K
  • Last Post
Replies
6
Views
14K
  • Last Post
Replies
3
Views
9K
  • Last Post
Replies
3
Views
1K
Top