If a capacitor is charged by a source with constant voltage, $V$, the energy, $W$, stored by a capacitor of capacitance $C$ is given by:
$$ W = \frac{1}{2} QV = \frac{1}{2} V^{2}C = \frac{Q^{2}}{2C} $$
where $Q$ is the charge stored on the plates.
If the capacitor is now disconnected, and its capacitance is changed by increasing the distance between the plates, its energy must increase since work is being done by moving charge under the influence of an electrical field. Furthermore, since the plates are not connected to anything, it can be assumed that charge is conserved.
The method for calculating the change in energy that I have seen in textbooks and on the internet is to calculate $Q$ for the pre-separated case, calculate $C$ for both cases, then use:
$$ W = \frac{Q^{2}}{2C} $$
to give $$ \delta W = \frac{Q^{2}}{2} \left( \frac{1}{C_{2}} - \frac{1}{C_{1}} \right) $$
where $C_{2}$ is capacitance post-separation, $C_{1}$ is capacitance pre-separation and $\delta W$ is the change in energy.
This seems naive to me. That formula was for the process of charging a capacitor from a constant voltage with the $\frac{1}{2}$ arising from the potential difference that charge is raised by decreasing as more charge is deposited.
With constant $Q$, we can say that:
$$ dW = QdV $$
and integrate to give:
$$ \delta W = Q(V_{2} - V_{1}) $$
where $V_{2}$ is the post-separation voltage and $V_{1}$ is the pre-separation voltage. Substituting $Q = CV$ then gives:
$$ \delta W = Q^{2} \left( \frac{1}{C_{2}} - \frac{1}{C_{1}} \right) $$
i.e. double the textbook answer.
Am I missing something?