Calculate the force on a dielectric slab inserted partly into a parallel plate capacitor with plate dimensions L and w, with a length x of the dielectric lying between the plates. Assume that the plates are isolated, so the charge ±Q on the plates is constant.
Now suppose the capacitor stays connected to a battery so the potential difference V stays fixed. Calculate the force on the slab for this case, and compare to the result obtained for isolated plates.