Let $g(x) = f(x) + ih(x)$. Here, $x$ is real, so the function takes a real number and spits out a complex number.
A book I am reading says that if $\int_{-\infty}^\infty e^{-ix} g(x) dx$ is a real number, then $f(x)$ is even, and $h(x)$ is odd.
Why is this true?
The book further says that this can be used to write$$\int_{-\infty}^\infty e^{-ix} g(x) dx = 2\int_0^\infty e^{-ix}g(x) dx$$
Why is this true?