1. ## Computing an integral

Hello, another question from an exam. It's a straight-forward computation, but I get stuck at the actual integration.

Compute $\displaystyle \int_{-\infty}^{\infty} e^{-x^2} \text{cos} 2kx \text{d}x$, $\displaystyle k>0$ by integrating $\displaystyle e^{-z^2}$ around the rectangle with vertices $\displaystyle \pm a$, $\displaystyle \pm a + bi$

Thanks!

2. ## Re: Computing an integral

$\displaystyle z = x + iy \Rightarrow e^{-z^2} = e^{y^2-x^2} e^{-2xyi}$

$\displaystyle \oint e^{-z^2} dz$ = Countercockwise integral along rectangle with verticies $\displaystyle \pm a, \pm a + bi$

$\displaystyle = \int_{-a}^{a} e^{-x^2} dx + \int_{0}^{b} e^{y^2-a^2} e^{-2ayi} dy - \int_{-a}^{a} e^{b^2-x^2} e^{-2bxi}dx - \int_{0}^{b} e^{y^2-a^2} e^{2ayi} dy$

...

$\displaystyle = \left( \int_{-a}^{a} e^{-x^2} dx - e^{b^2} \int_{-a}^{a} e^{-x^2} \cos(2bx) dx \right) + \ i \left( -2e^{-a^2} \int_{0}^{b} e^{y^2} \sin(2ay) dy + e^{b^2}\int_{-a}^{a} e^{-x^2} \sin(2bx) dx \right)$

That's what I got - I certainly could've messed up somewhere.

Assuming that's correct, from that, it's possible to quickly find the answer.