# Math Help - integral sin(x)exp(nx)

1. ## integral sin(x)exp(nx)

$\int sin(x)exp(-inx)$, where i is the imaginary unit and n is an entire.
Regards.

2. Compute $\int e^{ix}e^{-inx}dx$ and take the imaginary part.

3. Originally Posted by girdav
Compute $\int e^{ix}e^{-inx}dx$ and take the imaginary part.
$sin(x)e^{-inx} = sin(x)(cos(nx)-isin(nx))$ has a real part and a imaginary part, while if i take the imaginary part of $e^{ix}e^{-inx}$ i'll have no real part. Is that correct?

4. Originally Posted by girdav
Compute $\int e^{ix}e^{-inx}dx$ and take the imaginary part.
Actually this doesn't work. Consider briefly that it will return a real answer, which is obviously not correct.

I'd do it by parts. Here's the first step:
$\int sin(x)e^{-inx}dx = \frac{1}{-in}sin(x)e^{-inx} - \int \frac{1}{-in}cos(x)e^{-inx}dx$

Do the second integral by parts and you will have the form:
$\int sin(x)e^{-inx}dx = ~...~ + \frac{1}{n^2} \int sin(x)e^{-inx}dx$

from which you can solve for $\int sin(x)e^{-inx}dx$.

-Dan

5. Unless I am misreading something I dont think this is purely real.

$\int e^{ix}e^{-inx}dx$

$\int e^{-(n-1)ix}dx=\frac{i}{(n-1)}e^{-(n-1)ix}$

You could also use

$\sin(x)=\frac{e^{ix}-e^{-ix}}{2i}$

6. Originally Posted by girdav
Compute $\int e^{ix}e^{-inx}dx$ and take the imaginary part.
The title of the original question is misleading. The above method works for $\int \sin(x) e^{-nx} \, dx$, but not for the posted question, viz. $\int \sin(x) e^{-inx} \, dx$.

7. If we don't want to do it by parts, we can write $e^{-inx}$ as $\cos (nx)-i\sin (nx)$. Now we have to compute $\int \sin x \cos(nx) dx$ and $\int \sin x\sin(nx)dx$.
For the first we use $\sin x \cos(nx) =\frac{\sin((n+1))x-\sin((n-1)x)}2$ and for the second $\sin x\sin (nx)=\frac{\cos((n-1)x)-\cos ((n+1)x)}2$.