Why do we have to take the real part in when solving $\int_{-\infty}^{\infty}\frac{\cos(x)}{x^2 + x + 1}\ dx$ (Contour integral)

1k Views Asked by At

Here is an example from Priestley's Complex Analysis textbook ($\Gamma_R$ is arc of semi-circle sitting on real axis centered at 0):

enter image description here

She is stating that to evaluate the given integral, we must equate real and imaginary parts in the following equation:

$$ \int_{-R}^R f(x) dx + \int_{\Gamma_R} f(z) dz = 2\pi i\ \mathrm{res}(f(z); \omega)$$

However, the LHS of the equation is equal to the RHS, and as $R \to \infty$, the second integral in the LHS goes to 0. The remaining integral on the LHS is real – so shouldn't the RHS automatically be real? Why is there a need to explicitly take the real part? Where have I gone wrong?

1

There are 1 best solutions below

1
On BEST ANSWER

You need to take the real part because $\mathrm{Re}[f(x)]$, not $f(x)$, is the function you want to integrate. Remember that $f(x)$ was $\frac{e^{ix}}{x^2 + x + 1}.$