Force on dielectric when inserted in charged capacitor When we insert dielectric in a charged capacitor then, dielectric is attracted by the capacitor which makes dielectric being "sucked up" by the capacitor. Now, in order to derive the formula for force on dielectric, we apply energy conservation which I feel to be wrong as heat will be lost and hence energy conservation should not be applied, furthermore I feel that the energy term in the derivation corresponding to work done by force is actually heat released in the process.Where am I going wrong, also see [ Heat produced when dielectric inserted in a capacitor ] for more clarification of the doubt. Thanks
 A: This problem is equivalent to releasing a mass which is at the end of an unextended vertical spring.  
The mass loses gravitational potential energy whilst at the same time gains elastic potential energy and kinetic energy.  
When the mass reaches the static equilibrium position it has kinetic energy and so overshoots that static equilibrium position to eventually stop when the loss of gravitational potential energy is equal to the gain in elastic potential energy.  
At that maximum downward excursion there is a net upward force on the mass so it starts to move upwards losing elastic potential energy whilst at the same time gaining gravitational potential energy and kinetic energy.  
The mass passes through the static equilibrium position and carries on until it reaches its initial position with the spring unextended and the mass at rest.
The process repeats itself the the mass oscillates about the static equilibrium position.
In the real world friction is present and so the mass undergoes damped harmonic motion eventually stopping at the static equilibrium position.  
The spring-mass system now has less mechanical energy than it started with (it is actually half as much) because of the negative work done on the sysyem by the frictional forces - heat is generated.  
Now with your capacitor and dielectric a very similar thing happens.
Start with the dielectric (same size as one of the plates of the capacitor) just outside the capacitor and release the dielectric.
There is a force on the dielectric which pulls it into the capacitor and electric potential energy is converted into kinetic energy of the dielectric.
When the dielectric reaches the static equilibrium position it has kinetic energy and will overshoot the static equilibrium position and eventually end up at rest jest outside the capacitor on the other side from where it started.
Although at rest there is a force on the dielectric pulling it into the capacitor and so the dielectric now starts moving in the opposite direction finishing up at rest at its starting point.  
If one does not ignore dissipative process then the dielectric will undergo a motion which will result in it finally being at rest in the capacitor - the static equilibrium position.
Overall the dielectric-capacitor (and possibly battery) would have lost electrical energy and generated heat.  
When you work out the force on a dielectric you can do it by ignoring dissipative processes and allow the dielectric to move from its current position a small distance .$dx$.
What you do next depends on whether the capacitor is isolated (constant charge $Q$ or connected to a battery (constant potential difference $V$).  
If the capacitor has a constant charge then the change in energy stored $dU$ in the capacitor $C$ when the dielectric is moved a distance $dx$ in a direction parallel to the sides of the plates is  $dU = -F\,dx$ where $F$ is the force on the dielectric.
So $F = -\frac{dU}{dx} $ with $U= \frac 1 2 \frac {Q^2}{C}$ which gives $ F =  \frac 1 2 \frac {Q^2}{C^2}\frac{dC}{dx}$.
Knowing an expression for $C$ in terms of $x$ the force $F$ can be found.  
Conservation of energy has been used in the absence of any dissipative processes, there are no frictional forces and no losses within the dielectric when its polarisation changes. 
