Does the energy inside a capacitor has a variable dependency of the capacity? While studying energy inside capacitors, I came up with something:
If we can calculate the energy inside it as:
$$U=\frac{1}{2}QV=\frac{1}{2}CV^2=\frac{1}{2}\frac{Q^2}{C}$$
Then, why in some cases it appears that the energy depends directly or inversely proportional to the capacity mathematically (second and third form of the equation)
I know it have to do with the dependency of the energy about the charge Q, the potential V and the capacity C, but how could I understand it in a formal way?
 A: $C$ is a property of the system. It connects the Voltage across the capacitor $V$ and the charge $Q$ stored in it. You can do the same thing with a spring using the system equivalence between a capacitor and a spring. The conclusion to draw from your relations is this. 
1.)  Suppose you have a lot of capacitors with different $C$ and you apply the same potential across all of them. Then if you measure the energy stored in these capacitors you will find that the energy increases linearly with the capacitance.
2.) Now suppose you take these capacitors and adjust the potential across each of them so that all of them end up with the same amount of charge $Q$. Then if you measure the  energy stored in them you will find that the energy varies inversely with $C$
In short the concept of proportionality holds only when the other parameters in the equation doesn't vary. So one relation holds when $Q$ is constant and the other holds when $V$ is constant.
A: The 2nd and 3rd forms of the equation comes from the following relation
$$\boxed{\boldsymbol {C= \frac {Q}{V}}} $$
Where $\boldsymbol {C}$ is the capacitance, $\boldsymbol {Q}$ is the charge and $\boldsymbol {V}$ is the potential.

The formula for Energy stored in the the capacitor is
$$\boxed{U=\frac{1}{2}QV} $$

*

*Replacing $Q$ with $CV$, from the first relation we get,


$\frac{1}{2}CV²$



*Now replacing $V$ with $Q/C$, from the first relation we have,


$\frac{1}{2}Q^2/C$


Does the energy inside a capacitor has a variable dependency of the capacity?
Yes. The energy stored in the capacitor does depend upon its capacitance. The three different forms of equations are equivalent because of the relation between $C,Q$ and $V$ as mentioned above.
