Answer
$\dfrac{1}{2}CV^2$
Work Step by Step
The total energy stored in a capacitor is given by:
$W=\int_0^{\infty} P(t) \ dt \\=\int_0^{\infty} \dfrac{v^2}{R} (e^{-t/RC}-e^{-2t/RC}) \ dt \\=\dfrac{v^2}{R}(-RCe^{-t/RC} +\dfrac{RC}{2} e^{-2t/RC})|_0^{\infty}\\=\dfrac{V^2}{R} (\dfrac{RC}{2})\\=\dfrac{1}{2}CV^2$