Differential EquationsModeling with First-Order Equations6 of 6
Modeling with First-Order Equations · 6
RC and RL Circuits
When a circuit includes a capacitor or an inductor, voltage and current don't jump to their final values the instant you flip a switch, so we use differential equations to find how they change over time t.
1
Discharging an RC Circuit and the Time Constant
We first want to find how the charge Q(t) and voltage VC(t) on an already-charged capacitor drain over time when it is connected in a simple loop with a resistor R.
Discharging an RC Circuit and the Time Constant
Text solution
Match the voltages around the loopWith no battery in the circuit, the capacitor's voltage VC=CQ pushes current through the resistor, matching the resistor's voltage drop VR=I⋅R:
VC⟹CQ=VR=I⋅R
Write the resistor current as the rate charge leaves the platesBecause the charge Q on the capacitor is decreasing (dtdQ<0), the positive current I flowing out through the resistor needs a minus sign, I=−dtdQ:
CQ⟹dtdQ=−dtdQ⋅R=−RC1Q
Separate variables and integrate from the starting charge Q0Dividing Q to the left and multiplying dt to the right lets us integrate from Q0 at t=0 to Q at time t:
Dividing both sides by C gives the exact same decay curve for the capacitor's voltage from its starting voltage V0=CQ0:
VC(t)=V0e−t/τ,τ=RC
In the exponent, Ω⋅F=s, so τ=RC measures time in seconds: at t=τ,e−1≈0.37 of the initial charge remains (63% has drained), and by t=5τ,e−5<0.01, so less than 1% is left.
2
Charging an RC Circuit
Now we put a constant battery Vb into the loop with the resistor R and an initially empty capacitor C, and we want to find how the capacitor voltage VC(t) builds up from 0 toward Vb.
Just like an object warming or cooling toward room temperature Tm in Newton's Law of Cooling, dtdT=k(Tm−T), the capacitor's voltage changes at a rate proportional to the remaining voltage gap Vb−VC between the battery and the capacitor.
Charging an RC Circuit
Text solution
Find the leftover voltage pushing current through the resistorThe battery voltage Vb splits between the resistor and the capacitor, leaving the gap Vb−VC across the resistor:
Vb⟹VR⟹I⋅R=VR+VC=Vb−VC=Vb−VC
Rewrite the current in terms of capacitor voltageSince Q=C⋅VC and incoming current adds charge to the plates, I=dtdQ=CdtdVC with a positive sign:
RCdtdVC⟹dtdVC=Vb−VC=RC1(Vb−VC)
Separate variables to see the voltage gap decayDividing by Vb−VC and integrating from VC(0)=0 shows that the remaining voltage gap shrinks by the same factor e−t/RC as a discharging capacitor:
Next, we replace the capacitor with an inductor L in series with the resistor R and battery Vb, and we want to find how the current I(t) grows from 0 after the switch closes.
While a capacitor resists changes in voltage, an inductor is a coil whose magnetic field resists changes in current with a voltage drop VL=LdtdI. As current builds up, the resistor's voltage drop I⋅R grows against the battery voltage Vb, just like air drag kv grows against gravity mg for a falling skydiver in mdtdv=mg−kv.
Inductors and RL Circuits
Text solution
Split the battery voltage around the RL loopAdding the resistor drop I⋅R and the inductor drop LdtdI gives the differential equation for I(t):
Vb⟹LdtdI=VR+VL=I⋅R+LdtdI=Vb−I⋅R
Divide by R to match the charging equationThe current rises toward the value where the resistor uses all the battery voltage (I⋅R=Vb), the terminal current ceiling:
time constant τRLdtdI=terminal currentImaxRVb−I
Write the current curve directly from the charging solutionBecause this equation has the exact same form as the charging capacitor with Imax in place of Vb and τ=RL in place of RC, and the current starts at I(0)=0 just as VC(0)=0, its solution is:
I(t)Imax=Imax(1−e−t/τ),=RVb,τ=RL
At t=0+, when I=0, the starting slope dtdI=LVb is the same for every resistance R, while increasing R lowers the ceiling Imax=RVb, so the time constant τ=RL is shorter.
More resistance doesn't change how fast the current starts climbing, it just lowers the ceiling so the current levels off sooner.
4
The Start, Target, and Time Constant Shortcut
Whenever a circuit is driven by a constant source (a steady DC battery Vb, or no battery at all), we can write down any voltage or current directly from its starting value at t=0+ and its final target as t→∞ without solving the integral again.
The Start, Target, and Time Constant Shortcut
Every voltage or current in a constant-source RC or RL circuit starts at its initial value and closes the gap to its fixed target at the rate e−t/τ:
Value(t)τ=Target+(Start−Target)e−t/τ,=RC or τ=RL
To read Start at t=0+ and Target as t→∞ directly from the circuit diagram, use how the capacitor and inductor behave at t=0+ and as t→∞:
Now let's use Start, Target, and τ on two cases: finding the resistor current while a 10 V battery charges an empty capacitor, and finding the voltage when the capacitor starts with 3 V already on its plates.
Text solution
Find the charging current I(t) for an initially empty capacitor on a 10 V batteryAt t=0+, the empty capacitor has VC(0+)=0 V so all 10 V sits across the resistor, while as t→∞ the full capacitor blocks current completely:
Find the voltage VC(t) when a capacitor starting at 3 V is connected to a 10 V batteryThe capacitor voltage stays at 3 V at the instant t=0+ and approaches the 10 V battery as t→∞:
So the current decays to zero even while the capacitor charges, and a partially charged capacitor closes the remaining 7 V gap along the same exponential curve.
Whether VC(0) starts below the battery voltage (charging up) or above it (draining back into the battery and reversing the resistor current), Value(t)=Target+(Start−Target)e−t/τ always closes 63% of the initial gap Start−Target in one time constant τ.
No matter where the voltage starts, the capacitor always closes 63% of the gap to the battery in one time constant.
5
Time-Varying Sources: Transient and Steady-State Response
When the constant battery is replaced by a time-varying voltage source Vs(t), such as an alternating source Vs(t)=V0cos(ωt), the target keeps moving. The Start-Target shortcut and separation of variables no longer work, so we solve the full differential equation to find how the circuit responds.
Instead, we put the loop equation in standard linear form and use an integrating factor.
Time-Varying Sources: Transient and Steady-State Response
Text solution
Move VC (or I) to the left for standard linear formBecause Vs(t) changes with time t, we cannot divide by Vs(t)−VC to separate variables, so we group VC on the left with τ=RC (or group I on the left with τ=RL for an RL circuit):
dtdVC+τ1VC(or dtdI+τ1I=τ1Vs(t)=L1Vs(t) for RL)
Multiply by the integrating factor μ(t)=e∫(1/τ)dt=et/τMultiplying every term by et/τ turns the left side into the derivative of a product:
Integrate both sides and divide by et/τIntegrating adds the constant K, and multiplying through by e−t/τ separates the Ke−t/τ term from the source integral:
VC⋅et/τVC(t)=∫τ1et/τVs(t)dt+K=dies outKe−t/τ+driven by the sourcee−t/τ∫τ1et/τVs(t)dt
Evaluate for the alternating source Vs(t)=V0cos(ωt)Integrating et/τcos(ωt) gives et/τ times a combination of cos(ωt) and sin(ωt), so e−t/τ⋅et/τ=1 cancels out on the right:
So the response splits into a transient part Ke−t/τ set by the starting state that fades below 1% after 5τ, and a steady-state oscillation at the source frequency ω that continues forever.
Always write down the full solution before plugging in t=0 to find K: because cos(0)=1, the steady-state part already contributes A at t=0, giving VC(0)=K+A rather than K=VC(0). And if the source is another function of time (such as a decaying exponential Vs(t)=10e−t), compute the integral directly rather than using the cosine formulas for A and B.
Changing the starting voltage VC(0) changes only the initial transient term Ke−t/τ, so every voltage curve VC(t) settles into the exact same steady-state wave Acos(ωt)+Bsin(ωt) within 5τ.
Every starting voltage on the capacitor produces a transient that shrinks below 1% of its starting size within five time constants, leaving the exact same steady-state wave.
Key concepts
Every RC or RL problem starts by matching the voltages around the loop (VR=I⋅R,VC=CQ, and VL=LdtdI), using I=CdtdVC when a source pushes current into a capacitor or I=−dtdQ when a capacitor drains on its own (Q is decreasing, giving dtdQ=−RC1Q). What you do next depends on one question: is the voltage source constant, or does it change with time t?
Constant source (DC battery Vb, or 0 V when discharging): shrink the gap to a fixed target
Do not set up an integrating factor or integrate again when the source is constant. Because the target is fixed, every voltage and current follows the shrinking-gap shortcut:
Value(t)τ=Target+(Start−Target)e−t/τ,=RC or τ=RL
At t=0+ (Start): Capacitor voltage VC and inductor current IL cannot jump the instant the switch flips (an empty capacitor acts like a short wire with VC=0; an inductor with no current acts like an open break with IL=0).
As t→∞ (Target): After 5τ (less than 1% of the gap left), a full capacitor blocks current like an open circuit (I=0), and an inductor with steady current acts like a plain wire (VL=0, so Imax=RVb).
Example: A capacitor at 3 V connected to a 10 V battery has Start=3 V and Target=10 V, giving VC(t)=10+(3−10)e−t/RC=10−7e−t/RC V right away.
Time-varying source Vs(t): move VC or I to the left and multiply by et/τ
Do not use the Start-Target shortcut or try to separate variables when Vs(t) depends on t, because there is no fixed target. Write the equation in standard linear form:
dtdVC+τ1VCordtdI+τ1I=τ1Vs(t)=L1Vs(t)
Multiplying by the integrating factor μ(t)=et/τ turns the left side into dtd[VC⋅et/τ] (or dtd[I⋅et/τ]). Integrating and dividing by et/τ splits the answer into a transient part Ke−t/τ set by the starting value that is below 1% of its starting size after 5τ, plus a steady-state part driven by the source.
Example: With Vs(t)=10cos(4t) V and τ=0.5 s (so ωτ=2), A=1+2210=2 and B=2(2)=4, giving VC(t)=Ke−2t+2cos(4t)+4sin(4t) V, where K is found by plugging t=0 into the full equation.
6
Practice
1
A capacitor with capacitance C=2 mF holds an initial charge of Q0=6 mC and discharges through a resistor of R=500Ω starting at t=0. Write the differential equation for Q(t), find Q(t) and the current I(t), and find the time when 10% of the initial charge remains.
As the capacitor drains, is Q(t) increasing or decreasing, and what sign does that require in front of dtdQ when you write the positive resistor current I?
First find the time constant from R=500Ω and C=2 mF=2×10−3 F:
τ=RC=500⋅(2×10−3)=1 s
Match the capacitor and resistor voltages around the loop with I=−dtdQ (leaving off the minus sign gives dtdQ=+Q, which would make the charge grow forever, or gives a negative current −6e−t mA):
CQCQdtdQ=I⋅R=−dtdQ⋅R=−RC1Q=−Q
With initial charge Q0=6 mC and τ=1 s, the charge and current decay exponentially:
Q(t)I(t)=Q0e−t/τ=6e−t mC=−dtdQ=6e−t mA
Set Q(t)=0.10Q0 to find when 10% of the initial charge remains (setting Q0Q(t)=0.90 finds when 10% is lost, giving t=−ln(0.90)≈0.105 s):
e−t−tt=0.10=101=−ln(10)=ln(10)≈2.30 s
2
An inductor with L=4 H and a resistor with R=8Ω are connected in series at t=0 to a constant 24 V battery, with zero initial current. Write the differential equation for I(t), and find the time constant τ, the terminal current Imax, the current I(t), and the initial rate of change dtdI at t=0+.
Around the loop, the 24 V battery splits between I⋅R and LdtdI. At t=0+, how much current flows through the resistor, and as t→∞, what happens to dtdI?
Splitting the 24 V battery between the 8Ω resistor and the 4 H inductor gives the differential equation:
24⟹4dtdI=8I+4dtdI=24−8I
Find the time constant τ=RL and the terminal current ceiling Imax=RVb (flipping the fraction to LR=2 gives the wrong answer I(t)=3(1−e−0.5t) A, and multiplying R⋅L=32 gives 3(1−e−t/32) A):
τImax=RL=84=0.5 s,=RVb=824=3 A
Since the current rises from I(0)=0 A toward Imax=3 A with τ1=2 s−1:
I(t)=Imax(1−e−t/τ)=3(1−e−2t) A
At t=0+, the inductor current is still I(0+)=0 A, so all 24 V sits across the inductor (dividing 24 V by R=8Ω instead of L=4 H gives 3 A/s):
4dtdI⟹dtdI=24−8(0)=424=6 A/s
3
A 0.1 F capacitor already charged to 3 V is connected at t=0 in series with a 20Ω resistor and a 15 V battery. Using Start, Target, and the time constant, find the capacitor voltage VC(t) and the current I(t) for t>0.
The capacitor stays at 3 V at the instant t=0+. How much of the battery's 15 V is left across the 20Ω resistor at that first instant, and how much current flows once the capacitor is full?
First compute the time constant:
τ=RC=20⋅0.1=2 s
For the capacitor voltage VC(t),Start=3 V at t=0+ and Target=15 V as t→∞ (treating the capacitor as initially empty gives 15−15e−t/2 V, and reversing Start−Target gives 15+12e−t/2 V):
For the current I(t), at t=0+ the resistor has the remaining voltage gap 15−3=12 V across it (using the full 15 V battery voltage ignores the 3 V already on the capacitor and gives 2015e−t/2=0.75e−t/2 A), and as t→∞ the full capacitor blocks current so Target=0 A:
An RL circuit with L=2 H,R=6Ω, and initial current I(0)=0 A is driven by a decaying voltage source Vs(t)=10e−t V. Write the differential equation in standard linear form and use an integrating factor to solve for I(t).
After writing 2dtdI+6I=10e−t, divide every term by L=2 before finding the integrating factor μ(t). What happens to the exponents on the right side when you multiply through by μ(t)?
Write the loop equation and divide every term by L=2 to put it in standard linear form (forgetting to divide by 2 first uses R=6 to give the wrong integrating factor e6t, or leaves 10e−t on the right):
2dtdI+6I⟹dtdI+3I=10e−t=5e−t
Multiply through by the integrating factor μ(t)=e∫3dt=e3t and write the left side as the derivative of a product:
e3tdtdI+3e3tIdtd[I⋅e3t]=5e3te−t=5e2t=5e2t
Integrate both sides with respect to t and divide by e3t (forgetting to divide by the 2 in the exponent when integrating 5e2t gives 5e−t instead of 2.5e−t):
I⋅e3tI(t)=∫5e2tdt=2.5e2t+K=Ke−3t+2.5e−t
Plug in I(0)=0 to solve for K (assuming I(0)=0 means K=0 drops the transient term and leaves the wrong answer 2.5e−t A):
0I(t)=Ke0+2.5e0⟹K=−2.5=2.5(e−t−e−3t) A
5
An RC circuit with time constant τ=RC=0.5 s and initial capacitor voltage VC(0)=8 V is driven for t≥0 by an AC source Vs(t)=10cos(4t) V. Find VC(t), identify its transient and steady-state parts, and state how long it takes for the transient part to shrink below 1% of its starting value.
Find the steady-state amplitudes A and B using ωτ first. When you plug t=0 into the total voltage VC(t) to find K, what does the cosine term equal at t=0?
From Vs(t)=10cos(4t) V and τ=0.5 s, we have V0=10 V,ω=4 rad/s, and ωτ=4(0.5)=2, which gives the steady-state amplitudes:
AB=1+ω2τ2V0=1+2210=2 V,=ωτA=2(2)=4 V
With τ1=2 s−1, the general solution is:
VC(t)=Ke−2t+2cos(4t)+4sin(4t)
Plug in t=0 and VC(0)=8 V to find K (setting K=VC(0)=8 V directly forgets that 2cos(0)=2 V is already present at t=0, giving 8e−2t+2cos(4t)+4sin(4t) V):