What happens to half of the energy in a circuit with a capacitor? For a simple circuit with a battery supplying a voltage $V$ to a capacitor, let us assume that the charge on the capacitor is $Q$. Now, the work done by the battery or the energy supplied is given by the relation:
$$W=QV$$
But the energy stored in the capacitor is given by:
$$U = \tfrac12 QV$$
The value of $Q$ as well as that of $V$ should be the same in both the equations.
Now my question is, where is the other half of the energy that the battery supplied?
 A: Consider how the capacitor is charged up over time. Naively, since there's no resistance or inductance, the current in the circuit instantly becomes infinite, then instantly shuts off. This is both mathematically ill-defined and unrealistic. To understand what's actually going on, we have to account for nonideal features of the circuit, such as resistance or self-inductance. If the resistance dominates (overdamping), the capacitor charges up monotonically, as in an $RC$ circuit. If the inductance dominates (underdamping), the capacitor voltage oscillates about $\mathcal{E}$, until eventually settling down due to the resistance.
In the former case, half of the energy supplied by the battery is lost to heat in the circuit. In the latter case, the LC oscillations are eventually damped by a combination of ordinary resistance and radiation resistance, i.e. half of the energy goes into heat or electromagnetic waves.
There is some disagreement in the existing answers over which of these two pictures is correct, but actually, either can be right. It depends on how big the inductance and resistance of the circuit are.
A: Your mistake is in assuming that the capacitor has a voltage V equal to that of the battery at $t = 0$. It does not. So your equation $W = QV$ is simply wrong. Any real circuit, to which Kirchhoff's laws apply, will have a resistance. By Kirchoff's law:
$V_b = IR + Q/C$
Differentiate to obtain:
$\frac{dI}{dt} = -I/(CR)$
Solve that equation with appropriate initial condition and you will find that the current and charge on the capacitor (and hence the voltage across it) approach the equilibrium value exponentially. 
A: As pointed out in some comment, electrons are being accelerated in the process of charge. This generates electromagnetic radiation. Try doing the calculation using Poynting vector, the way Maxwell defined electromagnetic energy.
A: Half of the energy is lost to the battery's internal resistance (or other resistances in the circuit).if you try to consider an ideal battery with 0 internal resistance, the notion of charging the capacitor breaks down.since the capacitor and the battery are connected by a (0 resistance) wire, their voltages are the same the instant they are connected, no current flows from the battery to the capacitor.there is no charging. 
A: At the moment the circuit is completed, the capacitor has zero voltage, while the supply has $V$.  This voltage difference creates an electric field that accelerates charges.  This acceleration sets up a current.
As the current flows, the capacitor charges until the voltage reaches $V$ as well.  At this point there is no voltage difference.  But the accelerated charges are still moving.  So half the energy has gone into the capacitor and (discounting losses) half has gone into the current in the wire.  The current will continue to flow, charging the capacitor above $V$ until the current stops.  This is overshoot.  Then since a potential difference exists, current will flow back the other way.  The current and voltage oscillate for a period.  This oscillation behavior in the circuit is ringing.  Resistance in the circuit will eventually remove this extra energy, leaving only the charged capacitor.
This is very similar to suspending a ball from a spring and releasing it.  It can be slowly lowered to the new equilibrium point, or it can be dropped and it will oscillate above and below the new equilibrium until frictional losses remove the extra energy.
A: 
where is the other half of the energy that the battery supplied?

Half the energy supplied is dissipated in the resistance that will be present in any real circuit.
For a simple RC circuit like below, the switch will be closed at time t=0 and the cap is initially uncharged.

The time constant, τ, is RC = 0.05 seconds.  So, within 5 time constants (0.25 seconds) the transient is substantially over.  The performance equations for this circuit are shown below.
$$ i(t) = \frac{V}{R} e^{\frac{-t}{RC}} $$
$$ V_C(t) = V(1-e^{\frac{-t}{RC}})   $$
With V = 12 volts, R = 5 ohms, and C = 10,000µF we can find the energy delivered to the resistor and to the capacitor (they sum to the energy delivered by the battery) in this specific case.
The capacitor will end up asymptotically approaching 12V so it will eventually store in it's electric field the following energy:
$$U = \frac{1}{2}CV^2 = 0.72 J$$
The resistor will dissipate i-squared-r power (as R.W. Bird points out):
$$i(t)^2*R = \frac{144}{5}e^{-40t}     $$
Which when integrated will give us the total energy dissipated in the resistor:
$$U_R = \int_0^\infty \frac{144}{5}e^{-40t}dt = 0.72 J$$
Using a transient simulation tool, ATP via ATPDraw gui, we can plot these transients included the energy delivered to the resistor and to the capacitor. Notice how the resistor (red) and capacitor (green) energy traces merge out just past 5 time constants.  Showing that half the energy supplied by the source has been delivered to the resistor (which she dissipates as heat) and the other half is now safely stored in the electric field of the capacitor.

A: Let's consider a Conductor (ideal) connected between two points having potential difference V.

So, Energy dissipated by the conductor when Q Charge passes through the ideal conductor connected between a potential difference of V Volt must be equal to the Energy supplied by the battery to the conductor which is equal to QV. 
(NOTE: In case of Resistance also, the same amount of energy is dissipated. The only difference is that in a Resistance the dissipated energy appears as heat but in this case of an ideal conductor, it appears in some other form (maybe as a spark or Electromagnetic radiation, which I'm not sure)

Now let's consider the case of Charging of a Capacitor through ideal Conductor. :

Now did you figure out where Energy must be dissipated????
Yess !!! Exactly.. (VC-VB) is a non-zero quantity and hence Potential difference exists across the ideal conductor connected between the points C and B.
Using above discussion :


[ Note : The model above is an oversimplification of everything. For example, why only the right wire dissipates energy? Actually, energy is dissipated throughout the ideal conductor in form of sparks or Electromagnetic radiations. But if you need to know why energy is dissipated, it turns out that it's not required to have a knowledge of exactly how energy is dissipated. I only tried to point out that. Ignore this answer totally if you are interested in knowing how ]
A: I'm not sure where you took the $W=QV$ from. That is for a resistor, not a capacitor. For a capacitor with charge across plates changing over time, you must use the differential form:
$$
dW=dq\Delta V
$$
Considering $Q = CV$, for a uncharged capacitor with a constant voltage applied to it, it becomes:
$$
W=\frac{1}{C}\int_{0}^{Q}q \,dq = \frac{1}{2}\frac{Q^{2}}{C}
$$
that is equivalent to your $U=\frac{1}{2}QV$
A: First of all, we know that the area with $x$-axis of the graph of any function $f(x)$ from $x=a$ to $x=b$ is equal to $\int_a^b \! f(x) \, \mathrm{d}x$.
Simmilarly, the area with $x$-axis of the graph of another function $V=f(Q)$ from $Q=0$ to $Q=Q$ is equal to $\int_0^Q \! f(Q) \, \mathrm{d}Q = \int_0^Q \! V \, \mathrm{d}Q$.


In the case of a capacitor, the Voltage is $0$ at first and it rises as the following equation: $V=\frac{Q}{C}$ until it becomes equal to the voltage of the battery.The equation can be represented as $y=mx$ (the equation of a straight line intersecting the $(0,0)$ point). Here, $V=y$, $\frac{1}{C}=m$ and $Q=x$.

Let us replace $x$ and $y$ with $Q$ and $V$:

Here the graph generates a triangle with the $x$-axis. The final voltage of the capacitor is equal to the voltage of the battery, $V$.
So, we can easily find out the area of the triangle which is,
$$\frac{1}{2}(Q-0)(V-0) = \frac{1}{2}QV$$
And, it is U. Because, $\int_0^Q \! V \, \mathrm{d}Q = U$ (now you can look at the first 2 lines if you don't understand why it is equal to the Area). Thus,
$$U=\frac{1}{2}QV$$
Now, let us discuss the battery.
The voltage of the battery remains constant and thus the graph is parallel to the $x$-axis. So, it generates a rectangle with the $x$-axis. Here is the graph of a constant function:
And the area will be $\text{length}\times\text{breadth}$.
In our case, it is $(Q-0)\cdot(V-0)=QV$
And it is $W$. Thus,
$$W=QV$$
Summary of the answer: We can say that the energy of the capacitor is lower because most of the time, the voltage of the capacitor is lower than the battery (so, the upper left part of the graph is missing in the case of the Capacitor which is present in the Battery).
If you understand nothing from the above writing, look at the image below:

 But the question is, where is the rest half?The answer is, the rest half of the energy is converted to heat because of the resistance of the wire.
