I am a Mathematics student.Currently I am doing exercises of complex analysis from Stein Shakarchi's book.In the second chapter,there is a problem which is as follows:
Evaluate $\int_0^\infty e^{-ax}\cos(bx)dx$ and $\int_0^\infty e^{-ax}\sin(bx)dx$ for $a>0$ by integrating $e^{-Az}$ ,$A=\sqrt{a^2+b^2}$ over an appropriate sector with angle $\omega$ given by $\cos(\omega)=a/A$.
I am unable to solve this problem.It is clear that I have to apply Cauchy's theorem to the prescribed contour.Can someone provide some clue so that I can do this problem,for example the first few steps or a sketch of all steps.
The integrals are the real and imaginary parts of $\int_0^{+\infty} e^{(-a+ib) x} \text dx$. Let $\theta\in (-\pi/2,\pi/2)$ such that $a-ib = \sqrt{a^2 + b^2} e^{i\theta}$.
Now, let $R>0$ and consider a contour $\Gamma$, consisting of the line segment $\Gamma_1$ joining $0$ and $R \in (0,+\infty)$, the line segment $\Gamma_2$ joining $0$ to $Re^{-i\theta}$ and the portion of a circle $\Gamma_3$ centered at zero and joining $R$ and $Re^{-i\theta}$.
Then, Cauchy's theorem implies that : $$\int_{\Gamma} e^{(-a+ib)z}\text dz = \int_{\Gamma_1} e^{(-a+ib)z}\text dz+\int_{\Gamma_2} e^{(-a+ib)z}\text dz+\int_{\Gamma_3} e^{(-a+ib)z}\text dz= 0$$
The integral over $\Gamma_1$ gives $\int_0^R e^{(-a+ib)x}\text dx$, the integral over $\Gamma_2$ gives $-\int_0^R e^{-\sqrt{a^2+b^2}x}e^{-i\theta}\text dx$ and the integral over $\Gamma_3$ is bounded by $Re^{-\cos(\theta) R}$. Because this last piece goes to zero, we can take the limit $R\to +\infty$ to get : $$\int_0^{+\infty}e^{(-a+ib)x}\text dx = e^{-i\theta}\int_0^{+\infty} e^{\sqrt{a^2+b^2}x}\text dx = \frac{e^{-i\theta}}{\sqrt{a^2+b^2}} = \frac{1}{a-ib} \tag{1}$$
Taking the real and imaginary part, we get : \begin{align} \int_0^{+\infty}e^{-ax}\cos(bx)\text dx &= \frac{a}{a^2+b^2} \\ \int_0^{+\infty} e^{-ax}\sin(bx) \text dx &= \frac{b}{a^2+b^2} \end{align}
NB Note that here the contour integral is overkill since we can get $(1)$ by computing the anti-derivative explicitely.