Q:

Show that the power dissipated in a resistor over infinite time is equal to the energy stored in a discharging capacitor

I am learning about RC transient responses and if a charged capacitor is connected to a single resistor, its voltage will decrease exponentially. I understand this and how its equation is derived. I also understand how the energy stored in a capacitor is obtained.
So, given an infinite amount of time, all of the energy will be dissipated in the resistor. I would like to prove that the integral of p(t)dt between 0 and infinity is equal to 0.5CV₀². I've tried substituting in i²(t)R for p(t) and then equating i to -Cdv(t)/dt but I end up with something that isn't even an integral anymore, namely of the form RC²∫dv(t)/dt between 0 and infinity.
What sort of substitution should I make to allow this to be integrated? Thank you for reading.

A:

The voltage across a capacitor discharging (exponentially) through a resistor is: -
\$V = V_0\times e^{\dfrac{-t}{CR}}\$ where Vo is the voltage at t = 0
The current is the above voltage divided by R
So, power is \$\dfrac{V_0^2}{R}\times e^{\dfrac{-2t}{CR}}\$
Note that the exponential term now has a 2 in it because it became squared.
Now if you integrate power you accumulate the energy: -
\$\dfrac{V_0^2}{R}\times \dfrac{CR}{-2}\left[e^{\dfrac{-2t}{CR}}\right]_0^\infty\$
If you resolved the integral between 0 and infinity it comes to -1 hence energy taken by resistor is simply: - 
\$\dfrac{CV_0^2}{2}\$

