Can an integral made up completely of real numbers have an imaginary answer? The question is in the title, but I'll repeat it again: Can an integral made up completely of real numbers have an imaginary value? I understand what an integral is, so my natural inclination would be to say no, but I have no proof of this. If the answer is yes, then why? Also, if the answer is no, could you provide a proof or explanation of why this is or at least an explanation? To clarify, I mean can an integral of the form $\int_{x}^{y} f(x)dx$ be equal to an imaginary or complex number, when $f(x)$ is defined using only real numbers and a variable.
 A: An integral of a real function over a portion of the real line must yield a real result.  The easiest way to see this (glossing over some inessential subtleties in the specifics of what functions are integrable) is to go back to the definition of the Riemann integral, and in particular the partition formulation: $\int_x^y f(t)dt = \lim\limits_{n\to\infty}\left[\frac{1}{n}\sum_{t=0}^{n-1}f\bigl(x+\frac{t}{n}(y-x)\bigr)\right]$ (when the limit exists).  Since each of the values being summed on the RHS is real, then the sum is real, the product of the sum with $\frac1n$ is real, and finally the limit, being a limit of real values, is itself real.
While more complicated notions of integration don't have quite such a clean 'partition' formula, the principle is the same: the value of the integral is a limit of a sum; the sum is of real values, and so must be real; and the limit of a sequence of real values, if it exists, must likewise be real.
A: Let's consider a function $f:[a,b]\rightarrow \mathbb{R}$ and the integral 
$$\int_a^b f(x)dx.$$
If $f$ is Riemann integrable, then the value is the limit of the upper and lower sums, which are real-valued, and thus real-valued itself.
If $f$ is Lebesgue integrable, this means that the positive part $f_+$ of $f$ and the negative part $f_-$ of $f$ are both Lebesgue integrable and both integrals have a finite, nonnegative value, and $\int_a^b f(x)dx= \int_a^b f_+(x)dx - \int_a^b f_-(x)dx$ is real.
However, if $f$ is not integrable in the sense of Riemann or Lebesgue, it's possible to consider continuations of $f$ to the whole complex plane and calculate this integral in a generalized sense involving the residue theorem. I haven't found a concrete example of such a generalization, but I think I should be able to find something with some research. 
