# Complexifying an integral

1. Mar 13, 2014

### jellicorse

Watching a video on differential equations by Arthur Mattuck of MIT, I came across a method which was new to me for solving certain integrals, such as $$\int e^{-x}cos(x)dx$$ . part of the video is here:

Given that $$e^{ix}=cosx+isinx$$, this integral can be re-written as $$Re\int e^{ix}\cdot e^{-x}dx$$ = $$Re\int e^{x(-1+i)}dx$$ and integrated this way, avoiding the need for reduction formulas...

I have looked up a few examples of this and think I can understand it when cos(x) is part of the integral, but am unsure when it comes to sin(x).

There is a (now closed) thread on this forum https://www.physicsforums.com/showthread.php?t=511534&highlight=complexifying+integral which I have been attempting to follow but I can't see quite how it works. I was wondering if anyone could help me to understand this.

The following is effectively the working from that post:

$$\int e^x sin2x dx$$

=$$Re\int e^x \cdot e^{i(\frac{\pi}{2}-2x)}dx$$

I can see that since the real part of polar co-ordinates is contained in the "cos(2x)" part, they have put the Sin(2x) in terms of Cos(2x) by subtracting it from $$\frac{\pi}{2}$$.

But I don't see how the next step is reached:

$$=Re\frac{i}{1-2i}e^{(1-2i)x}$$

I'm not sure how they got to this, nor what the intermediate steps might be. If I was doing this, I would have gone along the lines of $$Re\int e^{x+i(\frac{\pi}{2}-2x)}dx$$. While I can see that that expression doesn't look very attractive to try to integrate, I can not see how the author got to $$e^{(1-2)x}$$

Last edited by a moderator: Sep 25, 2014
2. Mar 13, 2014

### pasmith

If you want sin(x), take the imaginary part of $e^{ix}$ instead of the real part.

Last edited by a moderator: Sep 25, 2014
3. Mar 13, 2014

### jellicorse

OK, thanks Pasmith...