TITLE: Integrate $e^{-x}\cos x$ with respect to $x$ by complexifying the integral?
QUESTION [0 upvotes]: I am supposed to find the integral by complexifying it and noticing that $e^{-x}\cos x$ is the real part of $e^{(-1+i)x}$. However I don't see how you can figure that out before knowing the expression you will get (in this case it is $e^{(-1+i)x}$).
$$\int e^{-x}\cos x \, dx = \Re \int e^{(-1+i)x} \, dx$$

REPLY [1 votes]: The simplest way is use the link between $\cos x$ and the exponential function. This link can be seen only when we deal with these function as functions of a complex variable and then we can write $\cos x = (e^{ix} + e^{-ix})/2$.
The technique of treating $\cos x$ as the real part of $e^{ix}$ looks magical because it appears to simplify the integrand into the form $e^{kx}$ where $k$ is a complex number and then we use the use $$\int e^{kx}\,dx = \frac{e^{kx}}{k} + C$$ Hidden behind this magic are the following assumptions (which no one mentions explicitly when using this technique):

Symbol $e^{z}$ can be defined for all $z \in \mathbb{C}$ by $e^{x + iy} = e^{x}(\cos y + i\sin y)$. This definition preserves the exponential property $e^{z + z'} = e^{z}e^{z'}$.
Further if $k$ is any complex number then $e^{kx}$ is a differentiable function of real variable $x$ and it satisfies $(e^{kx})' = ke^{kx}$.

So in a way it does simplify the overall integration process by avoiding the need for integration by parts, but the overall justification of this process is not entirely trivial (one should try to prove the two assumptions above to convince oneself).
{"set_name": "stack_exchange", "score": 0, "question_id": 1843616}