Klein-Gordon equation multiple Green's functions I am trying to understand Green's functions for a Klein-Gordon equation:
$ (\frac{\partial^2}{\partial t^2} - \nabla^2 +m^2) \phi(\vec{x},t) = 0$
and 
$ (\frac{\partial^2}{\partial t^2} - \nabla^2 +m^2) G(\vec{x},t;\vec{y},t_0) = -i \delta^3(\vec{x}-\vec{y})\delta(t-t_0)$
By taking the fourier transform in both $\vec{x}$ and $t$ which I define as:
$f(\vec{x};\vec{y}) = \int \frac{d^3p}{(2\pi)^3} e^{-i\vec{p}\cdot(\vec{x}-\vec{y})}f(\vec{p})$
and
$f(t;t_0) = \int_{-\infty}^{+\infty} \frac{d3E}{2\pi} e^{-iE\cdot(t-t_0)}f(E)$
Rearranging the equation for $G(\vec{x},y;\vec{y},t_0)$ we can get the following form:
$G(\vec{p},E) = -\frac{1}{E^2-(|\vec{p}|^2+m^2)}$
Now plugging this back into Fourier's transform we get the following equation:
$G(\vec{x},t;\vec{y},t_0) = -\int \frac{d^3\vec{p}}{(2\pi)^3} e^{i\vec{p}\cdot(\vec{x}-\vec{y})} \int_{-\infty}^{+\infty} \frac{dE}{2\pi} e^{-iE(t-t_0)}\cdot\frac{1}{E^2-(|\vec{p}|^2+m^2)}$
Now, my confusion arises when it comes to solving the time integral. In the Tong's notes, I am working through, the value of this integral depends on the complex contour we wish to examine.
For example, if we consider this contour:

It gives rise to a Feynman propagator, or more precisely:
$G(x;y) = \Delta_F(x-y)$
Where $(x=(t,\vec{x})$ and $y=(t_0,\vec{y})$)
On the other hand, there are two more contour choices:

These two, give totally different result for the solution to the integral. 
My question is how is it possible, that the definite integral (with parameters), such as:
$\int_{-\infty}^{+\infty} \frac{dE}{2\pi} e^{-iE(t-t_0)}\cdot\frac{1}{E^2-(|\vec{p}|^2+m^2)}$
has different values based on a contour that we wish to examine.
Clearly, this is a definite integral and thus, just a number (not really in this case, but still by fixing the values of $x$ and $y$, we really do get just a number). That makes me believe that it should have unique value and that all different contours should give the same answer. This is more of a mathematical question. However, I guess people here will be more familiar with the issue than mathematicians. 
 A: Here's a completely analogous question: finding the value of 
$$I = \int_{-\infty}^\infty \frac{dx}{x}.$$
Mathematically, the value of this integral isn't even defined because the integrand blows up at $x = 0$. It's not just "some number". If you evaluate it with a calculator, for example, then the calculator will either tell you it's undefined (if it's a good one) or spit out some random number (if it's a bad one). 
You need to modify the integral so that it is defined, but there are different ways of modifying it that give different answers. For example, there's the symmetric prescription,
$$I_s \equiv \lim_{a \to 0} \left( \int_{-\infty}^{-a} \frac{dx}{x} + \int_a^\infty \frac{dx}{x} \right) = 0.$$
Or you could add an imaginary part to the denominator so it doesn't blow up,
$$I_+ \equiv \int_{-\infty}^\infty \frac{dx}{x+i\epsilon} = - i \pi.$$
Or you could have done the same thing with the opposite sign,
$$I_- \equiv \int_{-\infty}^\infty \frac{dx}{x-i\epsilon} = i \pi.$$
In some cases, these choices of regularization can be linked to a choice of integration contour on the original, unregularized function. That's what Tong is doing here. 
A: The different contours result in Green functions that differ from one another by solutions of the source-free K-G equation. The ones with the countours below or above both poles will be zero for $t<0$ or for $t>0$ (i.e advanced or retarded Green functions). The ones that go above one pole  and below the other will have other (Feynman) boundary conditions.   
