# Differential Equation Of Capacitor Energy In RC and RL Circuits?

I'm having a hard time finding the differential equation for enregy in a capacitor for an RC basic circuit which contains a resistor and a capacitor + the source .

I have to start using the Kirchhoff’s voltage law.

I know that :

$$E_c = \frac{1}{2}CU_c^2$$

Where $E_c$ is the energy stored in a capcitor and $U_c$ is the voltage across the capacitroe .

I tried to find the same equation for an RL circuits but I couldn't so how should I approach it ?

• Is the problem that you don't know the equation for energy stored in an inductor, or that you don't know how to move from the energy equation to the differential form? – Dave Coffman Jan 24 '17 at 20:47
• @DaveCoffman I don't know how to move from th energy equation to a differential equation for the Energy Function . – Anis Souames Jan 24 '17 at 20:48
• I'm afraid that it's been a few years since I've done this sort of problem, so I probably can't provide much help. One thing to try, though, is finding the equation for charge on the capacitor as a function of current, and then using the charge equation to find $U_c$, and thus $E_c$. – Dave Coffman Jan 24 '17 at 20:54
• -1. There is a lot of material available on the internet on AC theory and LRC circuits. Why aren't you making use of it? Or are you working from a textbook? – sammy gerbil Jan 25 '17 at 2:21
• Possible duplicate of Deriving ODE for voltage across capacitor-RC circuit or RC circuit energy. – sammy gerbil Jan 25 '17 at 2:22

Since you're asking for a ode of the energy across a capacitor, lets proceed as follows:

We know that : $V = R.q' + \frac{q}{C}$ ($q' = \frac{dq}{dt}$)

Solving for q, we have:

$q = CV - R.C.q'$

Or $\frac{q^2}{2C} = \frac{CV^2}{2} + \frac{CR^2.q'^2}{2} - RCV.q'$

This is the required differential eqn. Since the lhs gives energy across a cpacitor with charge q.

• I need to solve it for E (energy) not Q or U . – Anis Souames Jan 25 '17 at 11:01
• Q^2/2C gives the capacitors energy at any instant – Lelouch Jan 25 '17 at 12:02