# How to integrate $\cos(x)e^{ix}dx$

How to integrate

$$\int \cos(t)e^{it}dt$$

I tried integrating by parts twice, but it doesn't work because an i shows up in the end and one gets $0=….$

-
Have you used the fact that $e^{it}=\cos(t)+i\sin(t)$ (assuming, of course that $t$ is real-valued)? – user5137 Nov 15 '11 at 20:02
What are your limits of integration? – Potato Nov 15 '11 at 20:11
Write $cos(t)=\frac{e^{it}+e^{-it}}2$, and it should be easy. – Thomas Andrews Nov 15 '11 at 20:16

Making this an answer. Write $\cos(t)=\frac{e^{it}+e^{-it}}2$ and it should be easy.

-

One way would begin by changing $\cos t$ to $\dfrac{e^{it}+e^{-it}}{2}$. When you multiply that by $e^{it}$ you get $\dfrac{e^{2it}+1}{2}$.

Let's try integrating by parts: $$\int (\cos t) e^{it} \; dt = \int u\;dv = uv - \int v\;du$$ where $u=\cos t$ and $dv=e^{it}\;dt$, so $du=-\sin t\;dt$ and $v=e^{it}/i= -ie^{it}$. Then $$uv - \int v\;du = -i(\cos t) e^{it} - \int (\sin t) e^{it}\;dt = -i(\cos t) e^{it} - \int w\;dv$$ some details above may need work. To be continued....with $w= \sin t$ and $v$ as above. This becomes $$-i(\cos t) e^{it} - \left( wv - \int v\; dw \right) = -i(\cos t) e^{it} - \left( -(\sin t)e^{it} - \int -(\cos t)e^{it} \;dt \right)$$ $$=-i(\cos t) e^{it} + (\sin t)e^{it} - \int (\cos t)e^{it} \;dt.$$

So we have $$I = -i(\cos t) e^{it} + (\sin t)e^{it} - I.$$ Solving that for $I$ can probably be left as an excercise. (Remember that when you move $I$ to the other side, "${}+C$" will appear on the right side.)

-
Not sure your integration by parts works, because, using your first method, there should be a value $t/2$ in the result - the integral should not result in a periodic function. – Thomas Andrews Nov 15 '11 at 21:04
OK, I'll look it over again. I should probably write things like this on paper first....... – Michael Hardy Nov 16 '11 at 2:28