Energy loss in Capacitors We have this formula in our textbook for loss of energy when two capacitors are connected together. They mention that it is due to heat dissipation. However, we have not considered any such term in our equation ( anything corresponding to heat loss, self inductance, nothing) during derivation. How does the formula work? 
$$ \text{Energy loss} = \frac {1}{2} \frac{C_1 C_2}{(C_1+C_2)}(V_1-V_2)^2$$
 A: The missing piece in the puzzle is dynamics.
The system can only settle in the stationary end configuration if some sort of damping, i.e., loss of energy, forces it to.
Without damping, the charge would actually oscillate forever between the capacitors; or, in Samuel's example, the water would keep slushing from one fish tank to the other, with energy being converted between kinetic and potential periodically, as in a pendulum.
A: "My question is how are we getting the energy loss without taking into consideration any terms that cause it at all? Or have we taken it and I missed it?"
You know, I was also puzzled by the very same question when I was presented with the fact that there is an energy loss in going from a single charged capacitor configuration to a configuration where the the same change is distributed among two capacitors. The basic fact is that if you assume that (1) charge is conserved and (2) the voltages across each of the two capacitors in the two-capacitor configuration are equal to each other, then the total energy of the one-capacitor configuration MUST be greater than the total energy of the two-capacitor configuration by the amount shown by the equation you presented. The only way to get the energies of the two different capacitor configurations to equal each other is to do something like add some charge to the two-capacitor configuration to raise its energy up a bit to the same energy value as the one-capacitor configuration.
It is interesting that we don't have to consider any particular energy loss mechanisms to arrive at this conclusion that some energy must be lost to heat, vibrations, sound, etc., but there are other examples that are similar to this. For example, suppose that you have two rectangular 50-gallon fish tanks, one of which is full of water and the other empty. There is a small pipe connection between the two fish tanks at near the their bottoms and a valve so that you can open this pipe connection and allow water to flow between them. You open the valve and watch as the water from the completely full fish tank quietly flows into the other fish tank until the water in the two tanks are level with each other and the flow stops. 
You might think that, in principle, it's possible that no energy was lost in making the water transfer, but if you actually calculate the total gravitational potential energy of associated with the initial fish tank configuration (i.e., all the water in one fish tank) with the total gravitational potential energy of associated with the final fish tank configuration, you will find that there is an energy difference: Some amount of energy MUST have been necessarily lost to heat, sound, etc.. in transferring water from one fish tank to another in this way.
A: If you find the energy of the two configurations and subtract them you will see they are unequal.
Firstly this makes sense, because if you brought two capacitors together you wouldn't expect all the charge to go to one capacitor, so that configuration with all the charge on one must have higher energy.
Later, when you introduce resistors you will will see the rate you lose power to heat in a resistor is different for two different resistors, but the total energy dissipated inside the resistor would be the same. 
Any real connection would have a little bit of resistance, and if you tried to connect them with a superconductor, the capacitors themselves would have to be a superconductor or else there is resistance ad the charge moves from one oar of the capacitor to another to get it to the superconductor.
And there can still be losses due to radiation even if everything were a superconductor.
