# What happens when a dielectric is inserted in a capacitor connected to a battery?

The voltage across the capacitor has to stay the same since it is connected to a fixed voltage supply, which means that the potential before insertion and after insertion is equal. That would mean that the electric field within the capacitor is also equal before and after (since E = -dV/dR).

However, when a dielectric is inserted, it reduces the field since the molecules of the dielectric align themselves in such a way that the moment is opposite to the external electric field, which is also supported by:
K = Eexternal/Ereduced
where K is the dielectric constant.

So when it is connected to the battery, why does the electric field remain the same? What happens within the capacitor and dielectric?

As you correctly observed, the electric field stays the same in the capacitor after insertion of the dielectric because the applied voltage is constant. This is accomplished by the increase in positive and negative areal charge on the plates of the capacitor which is provided by the battery. Before the insertion there is a vacuum between the plates $K=1$ and the areal charge density on the plates is $$Q=\epsilon_0 E=\epsilon_0 V/d$$ After the insertion of a dielectric with $K>1$ the areal charge density on the plates will be $$Q=\epsilon_0 K E=\epsilon_0 K V/d$$ where $V$ is the applied voltage and $d$ is the distance of the plates of the (parallel plate) capacitor. The electric field has to stay the same because the potential difference between the planes stays the same as well as the plate distance $d$. The polarization of the dielectric tries to reduce the electric field in the space between the plates but this is prevented by the increase of charge on the plates delivered by the battery to hold the potential difference $V$ constant.