# Thread: integration by complex exponentials

1. ## integration by complex exponentials

I have seen that one can use the euler's formula to complexify the integration, and integrate functions like $\displaystyle e^{nx} \cos mx dx$ easily.(The method has a wikipedia page:Integration using Euler's formula - Wikipedia, the free encyclopedia)

How can i do $\displaystyle \int \frac{dx}{13+3\cos x+4\sin x}$ using complex exponentials.

PS:I know this can be easily done with standard trig substitutions and might turn out to be longer using complex exponentials, but I want to know if and how can it be done with this method ...

2. ## Re: integration by complex exponentials

Originally Posted by earthboy
I have seen that one can use the euler's formula to complexify the integration, and integrate functions like $\displaystyle e^{nx} \cos mx dx$ easily.(The method has a wikipedia page:Integration using Euler's formula - Wikipedia, the free encyclopedia)

How can i do $\displaystyle \int \frac{dx}{13+3\cos x+4\sin x}$ using complex exponentials.

PS:I know this can be easily done with standard trig substitutions and might turn out to be longer using complex exponentials, but I want to know if and how can it be done with this method ...
$\displaystyle cos(x)= \frac{e^{ix}+ e^{-ix}}{2}$ and $\displaystyle sin(x)= \frac{e^{ix}- e^{-ix}}{2}$ so that integral, in complex exponentials, is $\displaystyle \int\frac{dx}{13+ \frac{3e^{ix}+ 3e^{-ix}}{2}+ \frac{4e^{ix}- 4e^{-ix}}{2}}$
$\displaystyle = 2\int \frac{dx}{26+ 7e^{ix}- e^{ix}}$
Multiply both numerator and denominator by $\displaystyle e^{ix}$ to get
$\displaystyle 2\int \frac{e^{ix}dx}{26e^{ix}+ 7e^{2ix}- 1}$

Now let $\displaystyle u= e^{ix}$ so that $\displaystyle du= ie^{ix}dx$, $\displaystyle -i du= e^{ix}dx$ and that integral becomes
$\displaystyle -2i\int \frac{du}{7u^2+ 26u- 1}$.

That denominator can be factored (though not easily- use the quadratic formula to find the roots). Then it will be of the form
$\displaystyle -\frac{2i}{7}\int \frac{du}{(u- a)(u- b)}du$
where a and b are the roots. That can be integrated by "partial fracations".

3. ## Re: integration by complex exponentials

Originally Posted by HallsofIvy
$\displaystyle cos(x)= \frac{e^{ix}+ e^{-ix}}{2}$ and $\displaystyle sin(x)= \frac{e^{ix}- e^{-ix}}{2}$
small doubt:
is $\displaystyle \sin x= \frac{e^{ix}- e^{-ix}}{2}$ or $\displaystyle \sin x= \frac{e^{ix}- e^{-ix}}{2i}$
both are seem to be used in books, but what is the difference?

4. ## Re: integration by complex exponentials

Originally Posted by earthboy
small doubt:
is $\displaystyle \sin x= \frac{e^{ix}- e^{-ix}}{2}$ or $\displaystyle \sin x= \frac{e^{ix}- e^{-ix}}{2i}$
both are seem to be used in books, but what is the difference?
It's \displaystyle \displaystyle \begin{align*} \sin{(x)} = \frac{e^{i\,x} - e^{-i\,x}}{2i} \end{align*}.

5. ## Re: integration by complex exponentials

Originally Posted by HallsofIvy

That denominator can be factored (though not easily- use the quadratic formula to find the roots). Then it will be of the form
$\displaystyle -\frac{2i}{7}\int \frac{du}{(u- a)(u- b)}du$
where a and b are the roots. That can be integrated by "partial fracations".
$\displaystyle -\frac{2i}{7}\int \frac{du}{(u- a)(u- b)}du = -\frac{2i}{7} \frac{\log(u-a)-\log(u-b)}{a-b}$
where $\displaystyle a=-13-4\sqrt{11}$ and $\displaystyle b= 4\sqrt{11}-13$

how do I separate the real and imaginary part here to get the answer,especially what to do with the $\displaystyle \frac{2i}{7}$ ?

6. ## Re: integration by complex exponentials

Originally Posted by earthboy
$\displaystyle -\frac{2i}{7}\int \frac{du}{(u- a)(u- b)}du = -\frac{2i}{7} \frac{\log(u-a)-\log(u-b)}{a-b}$
where $\displaystyle a=-13-4\sqrt{11}$ and $\displaystyle b= 4\sqrt{11}-13$

how do I separate the real and imaginary part here to get the answer,especially what to do with the $\displaystyle \frac{2i}{7}$ ?
Any hint on how to separate the real and the imaginary part and find the answer from here?