🦖 Bellaziraptor

Unit 6

Introduction to Differential Equations

A differential equation relates a function to its own derivatives. That sounds abstract until you notice that a capacitor's current is proportional to the derivative of its voltage — so every circuit containing a capacitor or an inductor is a differential equation. This unit solves the ones you will meet most, and they turn out to be RC, RL and RLC.

1 · Vocabulary

TermMeaningExample
OrderHighest derivative appearing\(y'' + 3y' = 0\) is second order
Linear\(y\) and its derivatives appear only to the first power, never multiplied together or inside a function\(y' + P(x)y = Q(x)\) ✓; \(y' = y^2\) ✗
General solutionFamily containing arbitrary constants — one per order\(y = Ce^{-t}\)
Particular solutionConstants pinned down by initial conditions\(y = 5e^{-t}\)
IVPThe equation plus enough initial conditions to fix every constant\(y' = -y,\; y(0) = 5\)
Checking a solution is free

To verify a claimed solution, substitute it and its derivatives back into the equation. This takes seconds and catches nearly every algebra slip — the same asymmetry that makes differentiating your integral worthwhile in Unit 1.

2 · Separable equations

If you can get all the \(y\)'s on one side and all the \(x\)'s on the other, integrate both sides:

\[ \frac{dy}{dx} = g(x)h(y) \implies \int\frac{dy}{h(y)} = \int g(x)\,dx \] One constant of integration is enough — fold the two into a single \(C\) on the right.

The most important instance in all of engineering is the one where the rate of change is proportional to the amount present:

\[ \frac{dy}{dt} = ky \implies y = y_0 e^{kt} \] \(k > 0\) is growth; \(k < 0\) is decay. Radioactive decay, capacitor discharge, RC settling, thermal relaxation and population growth are all this one equation.
Do not lose the equilibrium solutions

Dividing by \(h(y)\) silently assumes \(h(y) \neq 0\). Any \(y\) making \(h(y) = 0\) is also a (constant) solution, and it may be exactly the one the problem wants. Check for it before dividing.

3 · First-order linear and the integrating factor

Put the equation in standard form first — coefficient of \(y'\) equal to 1:

\[ \frac{dy}{dx} + P(x)\,y = Q(x) \]

Multiply through by the integrating factor:

\[ \mu(x) = e^{\int P(x)\,dx} \] Chosen precisely so the left side becomes the derivative of a product: \(\mu y' + \mu P y = (\mu y)'\). That is the entire idea — nothing else about \(\mu\) matters.
\[ (\mu y)' = \mu Q \implies y = \frac{1}{\mu}\int \mu(x)\,Q(x)\,dx \]
Procedure
  1. Get standard form. Divide by the leading coefficient first — skipping this gives the wrong \(P\) and therefore the wrong \(\mu\).
  2. Compute \(\mu = e^{\int P\,dx}\). No constant of integration needed here.
  3. Multiply through and recognise the left side as \((\mu y)'\).
  4. Integrate both sides — keep \(C\) this time.
  5. Solve for \(y\) and apply the initial condition.

4 · RC and RL circuits

Apply Kirchhoff's voltage law to a resistor and capacitor in series with a source \(V_s\), using \(i = C\,dv/dt\):

\[ RC\frac{dv}{dt} + v = V_s \] First-order linear — and also separable. Either method works; separation is usually faster here.

With \(v(0) = 0\) (uncharged capacitor), the solution is the step response:

\[ v(t) = V_s\left(1 - e^{-t/\tau}\right), \qquad \tau = RC \]

With no source and \(v(0) = V_0\), it is the natural response:

\[ v(t) = V_0 e^{-t/\tau} \]

The RL circuit is structurally identical, with a different time constant:

\[ L\frac{di}{dt} + Ri = V_s \implies i(t) = \frac{V_s}{R}\left(1 - e^{-t/\tau}\right), \qquad \tau = \frac{L}{R} \]
One formula covers every first-order circuit
\[ x(t) = x_\infty + \big(x_0 - x_\infty\big)e^{-t/\tau} \]

Start where you start, end where you end, and get there exponentially. Find \(x_0\) (initial value), \(x_\infty\) (final value — treat the capacitor as open or the inductor as a short), and \(\tau\), and you have written the answer without solving anything. Your circuits course will hand you this formula; it is just the general solution of the ODE above.

5 · The time constant

final 63.2% τ
One time constant is the time to cover 63.2% of the remaining gap — and that is true at any point on the curve, not just the start. The exponential has no memory of when you began measuring.
ElapsedFraction completeNote
\(1\tau\)63.2%\(1 - 1/e\)
\(2\tau\)86.5%
\(3\tau\)95.0%Often "close enough"
\(4\tau\)98.2%
\(5\tau\)99.3%The engineering convention for "settled"
Strictly the exponential never arrives. Five time constants is where everyone agrees to stop caring.
Two constants worth memorising

\(t = \tau\ln 10 \approx 2.30\tau\) to reach 90% of anything exponential, and \(t = \tau\ln 2 \approx 0.69\tau\) to reach 50%. These save real time, and they are independent of the circuit.

6 · Second-order equations

For constant-coefficient homogeneous equations:

\[ ay'' + by' + cy = 0 \]

Guess \(y = e^{rt}\). Every term picks up a factor of \(r\) per derivative, and \(e^{rt}\) divides out, leaving the characteristic equation:

\[ ar^2 + br + c = 0 \]

Everything then depends on the discriminant — three cases, no others:

RootsGeneral solutionBehaviour
Real, distinct \(r_1 \neq r_2\) \(C_1 e^{r_1 t} + C_2 e^{r_2 t}\) Two decaying exponentials — no oscillation
Real, repeated \(r\) \(\big(C_1 + C_2 t\big)e^{rt}\) The extra \(t\) is required — two constants are needed for a second-order equation
Complex \(\alpha \pm \beta i\) \(e^{\alpha t}\big(C_1\cos\beta t + C_2\sin\beta t\big)\) Oscillation at \(\beta\), envelope \(e^{\alpha t}\)

The third row is where Euler's formula earns its place: \(e^{(\alpha+\beta i)t} = e^{\alpha t}(\cos\beta t + i\sin\beta t)\). Complex roots do not mean a complex answer — they mean a real oscillating one.

7 · RLC and the three damping regimes

A series RLC circuit, written in terms of charge, is exactly a second-order equation:

\[ L\frac{d^2q}{dt^2} + R\frac{dq}{dt} + \frac{q}{C} = 0 \]

Its characteristic roots are conventionally written with two parameters:

\[ \alpha = \frac{R}{2L} \;\text{(damping)}, \qquad \omega_0 = \frac{1}{\sqrt{LC}} \;\text{(resonance)}, \qquad s = -\alpha \pm \sqrt{\alpha^2 - \omega_0^2} \]
ConditionNameRootsResponse
\(\alpha > \omega_0\)OverdampedReal, distinctSlow, sluggish, no overshoot
\(\alpha = \omega_0\)Critically dampedReal, repeatedFastest possible with no overshoot
\(\alpha < \omega_0\)UnderdampedComplex pairOvershoots and rings at \(\omega_d = \sqrt{\omega_0^2 - \alpha^2}\)
Critical damping happens when \(R = 2\sqrt{L/C}\).
final underdamped critically damped overdamped
The engineering trade-off in one picture. Underdamped gets there first but overshoots and rings; overdamped never overshoots but crawls. Critical damping is the boundary — the fastest approach with no overshoot at all, which is why it is the design target for servo positioning, meter movements and door closers.
Where you have seen this before

The three cases correspond exactly to the three partial-fraction cases from Unit 1: distinct linear factors give distinct exponentials, a repeated factor gives the \(te^{rt}\) term, and an irreducible quadratic gives a damped sinusoid. The characteristic polynomial here is the denominator you factor there. Unit 1 and Unit 6 are the same mathematics approached from opposite ends.

8 · Worked examples

1. Separable equation with an initial condition

Solve \(\dfrac{dy}{dx} = xy^2\), \(y(0) = 1\).

Separate (noting \(y = 0\) is also a solution, but not ours since \(y(0) = 1\)):

\[ \frac{dy}{y^2} = x\,dx \implies -\frac1y = \frac{x^2}{2} + C \]

Apply the condition \(y(0) = 1\): \(-1 = 0 + C\), so \(C = -1\).

\[ -\frac1y = \frac{x^2}{2} - 1 \implies y = \frac{2}{2 - x^2} \]

Check: \(y(0) = 1\) ✓. And note the solution blows up at \(x = \sqrt2\) — it only exists on \((-\sqrt2, \sqrt2)\), even though the original equation looked perfectly well behaved everywhere. Nonlinear equations do this; linear ones do not.

2. Integrating factor

Solve \(xy' + 2y = x^3\), \(x > 0\).

Standard form first — divide by \(x\):

\[ y' + \frac{2}{x}y = x^2 \implies P = \frac2x \] \[ \mu = e^{\int (2/x)dx} = e^{2\ln x} = x^2 \]

Multiply through, and recognise the left side as a product derivative:

\[ x^2 y' + 2xy = x^4 \implies (x^2 y)' = x^4 \] \[ x^2 y = \frac{x^5}{5} + C \implies y = \frac{x^3}{5} + \frac{C}{x^2} \]

Note step one. Reading \(P = 2\) off the original equation, before dividing by \(x\), would give \(\mu = e^{2x}\) and the method would collapse. Standard form is not optional.

3. RC charging — derive it, do not quote it

A 10 kΩ resistor and 100 µF capacitor are switched onto a 12 V source at \(t = 0\), capacitor uncharged. Find \(v(t)\), the time to reach 10 V, and the current at \(t = 0\).

Set up from KVL: \(V_s = iR + v\), with \(i = C\,dv/dt\):

\[ RC\frac{dv}{dt} + v = 12, \qquad \tau = RC = (10^4)(10^{-4}) = 1.0\ \text{s} \]

Solve by separation:

\[ \frac{dv}{12-v} = \frac{dt}{\tau} \implies -\ln|12-v| = \frac{t}{\tau} + C \]

With \(v(0) = 0\), \(C = -\ln 12\), and rearranging:

\[ v(t) = 12\left(1 - e^{-t}\right)\ \text{V} \]

Time to reach 10 V:

\[ 10 = 12(1 - e^{-t}) \implies e^{-t} = \frac16 \implies t = \ln 6 \approx 1.79\ \text{s} \]

Initial current: at \(t = 0\) the capacitor voltage is 0, so the full 12 V is across the resistor:

\[ i(0) = \frac{12}{10\,000} = 1.2\ \text{mA} \]

An uncharged capacitor behaves as a short circuit at the instant of switching, and as an open circuit once fully charged. Both facts fall out of the solution rather than needing separate memorisation.

4. Second-order: all three cases at once

(a) \(y'' + 5y' + 6y = 0\)

\[ r^2 + 5r + 6 = (r+2)(r+3) = 0 \implies r = -2,\,-3 \] \[ y = C_1 e^{-2t} + C_2 e^{-3t} \quad\text{— overdamped} \]

(b) \(y'' + 4y' + 4y = 0\)

\[ r^2 + 4r + 4 = (r+2)^2 = 0 \implies r = -2 \text{ (repeated)} \] \[ y = (C_1 + C_2 t)e^{-2t} \quad\text{— critically damped} \]

(c) \(y'' + 2y' + 5y = 0\)

\[ r = \frac{-2 \pm \sqrt{4-20}}{2} = -1 \pm 2i \] \[ y = e^{-t}\big(C_1\cos 2t + C_2\sin 2t\big) \quad\text{— underdamped, ringing at 2 rad/s} \]

In every case the real part of the root sets the decay rate and the imaginary part sets the oscillation frequency. All three here have negative real parts, so all three decay: the systems are stable. A root with positive real part would grow without bound.

5. Classifying an RLC circuit

A series RLC circuit has \(L = 10\) mH and \(C = 10\) µF. Classify its response for \(R = 10\,\Omega\), \(63.2\,\Omega\) and \(200\,\Omega\).

\[ \omega_0 = \frac{1}{\sqrt{LC}} = \frac{1}{\sqrt{(10^{-2})(10^{-5})}} = \frac{1}{\sqrt{10^{-7}}} = 3162\ \text{rad/s} \] \[ R_{\text{crit}} = 2\sqrt{L/C} = 2\sqrt{10^{-2}/10^{-5}} = 2\sqrt{1000} = 63.2\ \Omega \]
\(R\)\(\alpha = R/2L\)Compare to \(\omega_0\)Classification
10 Ω500\(\alpha < \omega_0\)Underdamped — rings
63.2 Ω3162\(\alpha = \omega_0\)Critically damped
200 Ω10 000\(\alpha > \omega_0\)Overdamped — sluggish

Ringing frequency in the underdamped case:

\[ \omega_d = \sqrt{\omega_0^2 - \alpha^2} = \sqrt{3162^2 - 500^2} = 3122\ \text{rad/s} \]

Only 1.3% below \(\omega_0\). Light damping barely shifts the ringing frequency — it mostly changes how fast the ringing dies. That is why a lightly damped resonator can be treated as oscillating at \(\omega_0\) for most purposes.

The design lesson: resistance does not change what frequency the circuit wants to ring at; it changes how long it rings. \(R\) is the knob for damping, \(L\) and \(C\) for frequency.

Checklist

  • I can classify an ODE by order and linearity before choosing a method.
  • I check for equilibrium solutions before dividing in a separable equation.
  • I put an equation in standard form before computing the integrating factor.
  • I know \(\tau = RC\) and \(\tau = L/R\), and the 63% / 5\(\tau\) rules.
  • I can write any first-order circuit response from \(x_0\), \(x_\infty\) and \(\tau\).
  • I know the three characteristic-root cases, including the extra \(t\) for a repeated root.
  • I can compute \(\alpha\) and \(\omega_0\) and classify an RLC circuit's damping.
  • I know real parts set decay and imaginary parts set oscillation.