Relation between electric potential and Electric field I'm unable to understand why the integration of $\mathbf E$ is done in two different ways for constant $\mathbf E$ and varying $\mathbf E$, as in case of parallel plate capacitor and spherical capacitor. More specifically, why do we get $\Delta V=Ed$ for the constant field?
Also, if somehow I understand the idea of integration described above, it doesn't seem to work for calculating the potential energy $U$ for the varying force.
 A: In general, the difference in electric potential between position $\mathbf a$ and $\mathbf b$ is given by
$$\Delta V=V(\mathbf b)-V(\mathbf a)=-\int_{\mathbf a}^{\mathbf b}\mathbf E\cdot\text d\mathbf r$$
where the integral is a line integral following any path from $\mathbf a$ to $\mathbf b$. This definition is true for any static electric field, constant or not.
However, if the field is constant along the integration path, then we are allowed to take the $\mathbf E$ term outside of the integral:
$$\Delta V=V(\mathbf b)-V(\mathbf a)=-\mathbf E\cdot\int_{\mathbf a}^{\mathbf b}\text d\mathbf r$$
Now, the line integral of $\text d\mathbf r$ is just the vector that points from the start to the end of the path, i.e.
$$\int_{\mathbf a}^{\mathbf b}\text d\mathbf r=\mathbf b-\mathbf a$$
Therefore, for a constant electric field,
$$\Delta V=-\mathbf E\cdot(\mathbf b-\mathbf a)$$
Now, if you are only interested in the magnitude of the potential difference, and if the field points in the same direction as the displacement, we can simplify to
$$|\Delta V|=|\mathbf E|d$$
Where $d$ is the magnitude of $\mathbf b-\mathbf a$.

This same idea is true for electric potential energy and forces as well, because potential and field are just the energy and force respectively per unit charge, i.e. $\Delta V=\Delta U/q$ and $\mathbf E=\mathbf F/q$. So if you take the above section and divide everything by $q$ then you are good to get
$$\Delta V/q=V(\mathbf b)/q-V(\mathbf a/q)=-\int_{\mathbf a}^{\mathbf b}\mathbf E/q\cdot\text d\mathbf r$$
$$\Delta U=U(\mathbf b)-U(\mathbf a)=-\int_{\mathbf a}^{\mathbf b}\mathbf F\cdot\text d\mathbf r$$
