# Derivation of the formula for Electric Potential Energy

I just learnt the formula for calculating Electric Potential Energy

$W=\frac{1}{C}\int_0^Qqdq = \frac{1}{C}[\frac{1}{2}q^2]_0^Q=\frac{Q^2}{2C}$

I understand the methodology, but what I do not understand is how one can extract the $\frac{1}{C}$ as if it were a constant, when C itself actually depends on q and Q (as $C=\frac{Q}{V}$) and Q grows as a result of adding more q.

Can somebody help out?

Thank you!

• You almost gave the answer yourself. Look at the formula $C = \varepsilon_0\frac{A}{d}$. All these values are fundamental/geometrical units and hence the capacitance does not depend on the potential. You merely used the formula for the potential as way to find the capacitance. – NDewolf Aug 29 '18 at 17:17