Why do many people say that virtual particles do not conserve energy? I've seen this claim made all over the Internet.  It's on Wikipedia.  It's in John Baez's FAQ on virtual particles, it's in many popular books. I've even seen it mentioned offhand in academic papers.  So I assume there must be some truth to it.  And yet, whenever I have looked at textbooks describing how the math of Feynman diagrams works, I just can't see how this could be true.  Am I missing something?  I've spent years searching the internet for an explanation of in what sense energy conservation is violated and yet, I've never seen anything other than vague statements like "because they exist for a short period of time, they can borrow energy from the vacuum".
The rules of Feynman diagrams, as I am familiar with them, guarantee that energy and momentum are conserved at every vertex in the diagram.  As I understand it, this is not just true for external vertices, but for all internal vertices as well, no matter how many loops deep inside you are.  It's true, you integrate the loops over all possible energies and momenta independently, but there is always a delta function in momentum space that forces the sum of the energies of the virtual particles in the loops to add up to exactly the total energy of the incoming or outgoing particles.  So for example, in a photon propagator at 1-loop, you have an electron and a positron in the loop, and both can have any energy, but the sum of their energies must add up to the energy of the photon.  Right??  Or am I missing something?
I have a couple guesses as to what people might mean when they say they think energy is not conserved by virtual particles...
My first guess is that they are ignoring the actual energy of the particle and instead calculating what effective energy it would have if you looked at the mass and momentum of the particle, and then imposed the classical equations of motion on it.  But this is not the energy it has, right?  Because the particle is off-shell!  It's mass is irrelevant, because there is no mass-conservation rule, only an energy-conservation rule.
My second guess is that perhaps they are talking only about vacuum energy diagrams, where you add together loops of virtual particles which have no incoming or outgoing particles at all.  Here there is no delta function that makes the total energy of the virtual particles match the total energy of any incoming or outgoing particles.  But then what do they mean by energy conservation if not "total energy in intermediate states matches total energy in incoming and outgoing states"?
My third guess is that maybe they're talking about configuration-space Feynman diagrams instead of momentum-space diagrams.  Because now the states we're talking about are not energy-eigenstates, you are effectively adding together a sum of diagrams each with a different total energy.  But first, the expected value of energy is conserved at all times.  As is guaranteed by quantum mechanics.  It's only because you're asking about the energy of part of the superposition instead of the whole thing that you get an impartial answer (that's not summed up yet).  And second... isn't the whole idea of a particle (whether real or virtual) a plane wave (or wave packet) that's an energy and momentum eigenstate?  So in what sense is this a sensible way to think about the question at all?
Because I've seen this claim repeated so many times, I am very curious if there is something real behind it, and I'm sure there must be.  But somehow, I have never seen an explanation of where this idea comes from. 
 A: What are virtual particles? They appear in Feynman diagrams representing a propagator function in the integral For example integrating  this electron-electron first order scattering diagram

will give the probability distribution of the scattered electrons.
The internal line is a propagator with the mass of the exchanged particle in the denominator, and that is why the line is identified with a particle. Since it is within an integral, it is off mass shell, i.e. E^2-p^2  is different than the mass of the particle and variable over the integration. The particle is off mass shell. One can choose what gives, the energy or the momentum rule for the dxdydzdt increment under the integral, if one considers the line as a particle. If one conserves the momentum and calls it a particle with the mass of its name, then energy is not conserved, since the mass is off mass shell. I believe that is where the mix up starts: in considering it a particle. Thus the statement "energy is not conserved" is isomorphic to "it is off mass shell".
In a final analysis as other answers have said it would be best not to call it a particle but accept it as a mathematical function carrying the quantum numbers of the named particle. 
A: They do conserve energy-momentum, absolutly, at each instant, anywhere, anywhen.  However, they don't respect the usual relation that defines the energy :
$$\tag{1}
E_{\text{real}}(p) = \sqrt{p^2 \, c^2 + m_0^2 \, c^4}.
$$
Instead of this, they obey some "off-shell" relations.  For example, they may have this energy-momentum relation instead :
$$\tag{2}
E_{\text{virtual}}(p) = \sqrt{p^2 \, c^2 + a_1 \, p^4 + m_0^2 \, c^4} + a_2 \, p^2 + a_3 \, p^4,
$$
or any other fantasy !
Energy-momentum conservation is always strictly respected.  It's just the energy-momentum relation which may be weird.
Now, the amount of "violation" that they do can be defined as this :
$$\tag{3}
\Delta E = |\, E_{\text{virtual}} - E_{\text{real}} |,
$$
and you could write (note the "reversed" inequality) :
$$\tag{4}
\Delta E \, \Delta t < \frac{\hbar}{2},
$$
where $\Delta t$ is the duration of the violation.
A: The short answer to your question is that the statements that "virtual particles need not conserve energy" and "intermediate components of Feynman diagrams need not be on the mass shell" are equivalent statements, but from two different historical perspectives.  
The concept of a virtual particle was introduced into physics in the mid-1920s while the formalism of quantum mechanics was still being developed.  The famous historical paper by Bohr, Kramers, and Slater is the best source (although Slater had addressed the idea in an earlier work). The general ideas of the paper proved to be incorrect but the paper helped stimulate Heisenberg's theory (and his uncertainty principle).  Nevertheless the concept of a virtual particle persisted. It is now used primarily in elementary descriptions of quantum field theory as a crutch for avoiding the more technical aspects of Feynman diagrams. 
I was aware of this because I took courses from Slater in Graduate School, but I must admit that I had difficulty finding information about the history of the concept of virtual particles without including Slater, Bohr, and Kramers as keywords so I understand your frustration.. 
A: I'm neither an expert on QFT, nor do I have a very deep knowledge of how the ideas developed - so this is at best a partial answer.
I always thought that your first guess is what they actually meant: A virtual particle is an "off-shell"-particle, which means that it does not obey the usual energy-momentum equation. Now people tend to interpret this as the virtual particles having a different kind of mass (and energy is conserved), but you could also say that the particles have the usual mass and then adjust energy and/or momentum to make the equations right - or you look at the equations of motion, etc.
I believe that this is very popular, because it is very tempting to think of virtual particles as "particles". This gives you a nice (albeit wrong) way to convey quantum field theory to the layman. You say (and I've read similar accounts and know some experimentalists who think about this in this fashion, because they never needed or wanted to know the real way): "See, you have these things called elementary particles and they have a mass and so forth. They also obey the equations of special relativity and you can write down equations of motion. Now let's have an experiment where we collide two electrons. You can visualise what happens in these diagrams: The particles get close and then they exchange a photon, which is called a "virtual photon". In reality, it could also happen that this photon creates an electron-anti-electron-pair which annihilates itself. Therefore, you have all those other diagrams - but in principle, all that happens is this photon exchange." Now the trouble is that you talk about the virtual particles as if they were real particles. When you started out with usual equations of motion, you are now in a conundrum. The old way out is by using energy-time uncertainty relations, the new way out is by using off-shell equations and the correct way out is by remembering that you aren't talking about physical quantities and you are doing perturbation theory.
However, it might be that there is another side to the story. I found this quote by John Baez from here:

[...]There's an old lousy form of perturbation
theory in which virtual particles violate conservation of
energy-momentum - that may be what you're thinking about.
But this only survives in popularizations of physics, not
what quantum field theorists usually do these days.  At least
since Feynman came along, most of use a form of perturbation
theory in which virtual particles obey conservation of energy-momentum.
Instead, what virtual particles get to do that real particles don't
is "lie off-shell".  This means they don't need to satisfy
$E^2 - \mathbf{p}^2 = m^2$
where m is the mass of the particle in question (in units where c = 1).
In any event, regardless of which form of perturbation theory
you use, in actual reality it appears that energy-momentum is
conserved even over short durations and short distances.
(Here I'm neglecting issues related to general relativity,
which aren't so important here.)

This would imply that the true origin of why people talk about virtual particles violating conservation of energy is something that dates back to before the invention of Feynman diagrams. This would explain why we only find vague allusions to the concept and no maths that supposedly tell us that this is the case: The reason is that this is not the way QFT is taught today and we don't really read the historical debates.
In a way, this would be similar to popular science telling us that the Robertson-Schrödinger uncertainty relation is about how measurement disturbs a state and how it is not possible to measure momentum and position simultaneously. This is not what that equation says and it is not reflected by today's mathematical expression, but it is how Heisenberg thought about the matter, when he formulated the first instance of this relation. You still hear it, because it gets iterated over and over again by anybody (and this is almost everybody) who doesn't have the time to properly think about this but only refers to how they learned it.
A: It's just a semantic issue of how you define the word "energy." If you define it to mean "the zero component of the four-momentum," or $m c^2\, dt/d\tau$, or "the Noether current generating the time translational symmetry," or "the spatial integral of the $T_{00}$ component of the stress-energy tensor," then it is conserved by virtual particles. If you define it to mean $\sqrt{m^2 c^4 + p^2 c^2}$, where ${\bf p}$ is the momentum three-vector, then it isn't. These definitions coincide in the classical case but not in the quantum case. The former definitions are more theoretically natural, but the latter is sometimes (though not always) easier to measure experimentally.
