MA1101ContentsClose ×CH 17

Part VI · Differential Equations for Dynamic Systems

17

Chapter 17 — First-Order Linear ODEs and RC Transients

Why This Matters

An algebraic equation relates quantities at one instant. A differential equation relates a quantity to how it changes. That is the natural language of a capacitor, whose current depends on the time rate of change of voltage, and of any system with memory.

17.1 What an ODE is

An ordinary differential equation (ODE) contains an unknown function of one variable and one or more derivatives. Its order is the highest derivative present. For example,

\[\frac{dy}{dt}+ky=q(t)\]

is first order. A solution is a function \(y(t)\) that makes the equation true on the interval of interest.

An initial condition such as \(y(0)=y_0\) selects one physical response from a family of mathematical solutions. Without enough initial conditions, an ODE usually has arbitrary constants and therefore does not yet describe one unique trajectory.

An ODE constrains a whole curve. An algebraic equation selects numbers; a differential equation relates a value to its permitted local rate of change. An initial condition chooses one curve from the family that satisfies the same rate law, which is why circuit state matters at the switching instant.

17.2 Linear first-order equations and integrating factors

The standard linear form is

\[y'(t)+P(t)y(t)=Q(t).\]

Define the integrating factor

\[\mu(t)=e^{\int P(t)\,dt}.\]

Because \(\mu'=P\mu\),

\[\frac d{dt}[\mu(t)y(t)]=\mu(t)y'(t)+\mu(t)P(t)y(t)=\mu(t)Q(t).\]

Integrating gives

\[\mu y=\int\mu Q\,dt+C,\]

and then divide by the nonzero exponential \(\mu\). For constant \(P=k\), the integrating factor is simply \(e^{kt}\).

Example — constant forcing

Solve

\[y'+2y=6,\qquad y(0)=1.\]

Here \(\mu=e^{2t}\), so

\[\frac d{dt}(e^{2t}y)=6e^{2t}.\]

Integrating,

\[e^{2t}y=3e^{2t}+C,\]

so \(y=3+Ce^{-2t}\). The initial condition gives \(1=3+C\), hence

\[y(t)=3-2e^{-2t}.\]

The constant \(3\) is the steady-state value; the exponential term is the transient that decays to zero.

Choose the multiplier that creates a product derivative. For y'+p(t)y=q(t), seek a non-zero function μ such that (μy)'=μy'+μpy. Matching coefficients requires μ'=pμ, so μ is an exponential of an integral of p. The method is a constructed product rule, not a separate rule to memorise.

\[\mu=e^{\int p(t)\,dt},\qquad (\mu y)'=\mu q\]
  1. Put the equation in standard linear form.
  2. Form the integrating factor from the coefficient of y.
  3. Multiply every term, integrate the resulting product derivative, then apply the initial condition.

17.3 RC circuit response

For a series resistor-capacitor circuit driven by a constant source \(V_s\), KVL and the capacitor relation \(i=C\,dv_C/dt\) lead to

\[RC\frac{dv_C}{dt}+v_C=V_s.\]

With an initially uncharged capacitor, \(v_C(0)=0\), the solution is

\[v_C(t)=V_s\left(1-e^{-t/(RC)}\right).\]

The current is

\[i(t)=\frac{V_s}{R}e^{-t/(RC)}.\]

Every symbol has a role: \(V_s\) is the applied step voltage, \(R>0\) and \(C>0\) set the time constant \(\tau=RC\), and the initial condition determines the transient coefficient. A different initial capacitor voltage produces a different solution.

Engineering consequence. The time constant is a scale, not a finish line. After one time constant a charging response has completed about 63.2 percent of its total change; each further time constant removes the same fraction of the remaining gap.

\[v_C(t)=V_f+(V_i-V_f)e^{-t/\tau}\]

17.4 Sinusoidal forcing and complex method

An AC-forced first-order equation often contains integrals such as \(\int e^{pt}\cos(\omega t)\,dt\). Euler’s formula lets us compute the real part of \(\int e^{(p+i\omega)t}\,dt\), then take the real component. This method is efficient because differentiation and integration of exponentials preserve their form. The completed response separates into a decaying transient and a persistent sinusoidal steady state.

First-order differential equations model dynamic states. In an electric circuit, inductors and capacitors store energy; the rates of change \(\frac{di}{dt}\) and \(\frac{dv}{dt}\) generate first-order ODEs governed by Kirchhoff's laws.

Standard form of a first-order linear ODE

Starting point. Consider the linear ODE \(\frac{dy}{dt} + P(t) y = Q(t)\).

  1. \[\frac{dy}{dt} + P(t) y = 0\]
    Homogeneous equation (\(Q(t) = 0\)): models natural unforced decay.reversible
  2. \[\frac{dy}{y} = -P(t) dt \implies \ln|y| = -\int P(t) dt + C_1 \implies y_h(t) = A e^{-\int P(t) dt}\]
    Separate variables to find the homogeneous solution \(y_h(t)\).reversible
  3. \[y(t) = y_h(t) + y_p(t)\]
    The general solution is the sum of the natural response \(y_h\) and any particular forced response \(y_p\).reversible

Conclusion. Every linear first-order ODE has a general solution composed of the natural response (initial condition decay) plus the forced response (steady-state driving).

  1. Put equation in standard form: \(y' + P(t)y = Q(t)\).
  2. Classify: separable or linear?
  3. If separable: separate \(\frac{dy}{g(y)} = f(t) dt\) and integrate both sides.
  4. If linear: find integrating factor \(\mu(t) = e^{\int P(t) dt}\).
  5. Apply initial condition \(y(t_0) = y_0\) to determine the constant \(C\).

17.5 Separation, linearity, and what an initial condition selects

Some first-order ODEs are separable, meaning they can be rearranged into a function of \(y\) times \(dy\) equal to a function of \(t\) times \(dt\). For example,

\[\frac{dy}{dt}=ky\]

has, where \(y\ne0\),

\[\frac{dy}{y}=k\,dt.\]

Integrating gives \(\ln|y|=kt+C\), hence \(y=Ae^{kt}\). The missing zero solution is also contained by choosing \(A=0\). Separation is efficient when available, but a linear equation such as \(y'+P(t)y=Q(t)\) need not be separable. The integrating factor method works for every equation in that standard linear form.

Example — exponential decay with units and an initial condition

Suppose a stored quantity satisfies \(dq/dt=-0.4q\), with \(t\) in seconds and \(q(0)=10\) mC. Separation gives

\[\frac{dq}{q}=-0.4\,dt,\qquad \ln|q|=-0.4t+C.\]

Exponentiating and using the initial value gives

\[q(t)=10e^{-0.4t}\ \mathrm{mC}.\]

The coefficient \(0.4\) has units \(\mathrm{s}^{-1}\), because its product with \(t\) must be dimensionless inside an exponential. This unit check detects a common model-writing mistake.

Separation of variables splits the differentials. If an ODE can be factored as \(\frac{dy}{dt} = f(t) g(y)\), group all \(y\) terms on the left and all \(t\) terms on the right.

Separation of variables procedure

Starting point. Let \(\frac{dy}{dt} = f(t) g(y)\) with \(g(y) \neq 0\) on the domain of interest.

  1. \[\frac{1}{g(y)} dy = f(t) dt\]
    Divide by \(g(y)\) and multiply by \(dt\) to separate variables.reversible
  2. \[\int \frac{1}{g(y)} dy = \int f(t) dt + C\]
    Integrate each side with respect to its own independent variable.reversible
  3. \[H(y) = F(t) + C \implies y(t) = H^{-1}(F(t) + C)\]
    Solve algebraically for \(y\) whenever an explicit inverse \(H^{-1}\) exists.reversible

Conclusion. Separation of variables converts a differential equation into two independent antiderivatives. Remember that division by \(g(y)\) assumes \(g(y) \neq 0\); equilibrium solutions \(y = y_0\) where \(g(y_0) = 0\) must be checked separately.

  1. Check for constant equilibrium solutions: solve \(g(y) = 0\).
  2. Separate variables: \(\frac{dy}{g(y)} = f(t) dt\).
  3. Integrate both sides: \(\int \frac{dy}{g(y)} = \int f(t) dt + C\).
  4. Solve for \(y(t)\) explicitly and apply the initial condition to determine \(C\).

17.6 Integrating factors, derived as a product rule

The integrating factor is sometimes taught as a recipe. Its purpose is to make the left side of a linear ODE into one derivative. Start with

\[y'+P(t)y=Q(t).\]

We seek a nonzero function \(\mu(t)\) such that

\[(\mu y)'=\mu y'+\mu' y\]

equals \(\mu y'+\mu P y\). This requires \(\mu'=P\mu\). Dividing by \(\mu\) and integrating gives

\[\frac{\mu'}{\mu}=P,\qquad \ln|\mu|=\int P(t)\,dt, \qquad \mu=e^{\int P(t)\,dt}.\]

Any nonzero constant multiple would work and cancels from the final solution.

Example — variable coefficient, all steps shown

Solve

\[y'+\frac{2}{t}y=t^2,\qquad t>0,\qquad y(1)=3.\]

Here \(P(t)=2/t\), so

\[\mu(t)=e^{\int 2/t\,dt}=e^{2\ln t}=t^2\]

on the specified positive interval. Multiply the ODE by \(t^2\):

\[t^2y'+2ty=t^4.\]

The left side is \((t^2y)'\), so integration gives

\[t^2y=\frac{t^5}{5}+C,\qquad y=\frac{t^3}{5}+\frac{C}{t^2}.\]

Apply \(y(1)=3\): \(3=1/5+C\), hence \(C=14/5\). Thus

\[y(t)=\frac{t^3}{5}+\frac{14}{5t^2},\qquad t>0.\]

The interval matters. The coefficient \(2/t\) is undefined at \(t=0\), so a solution on \(t>0\) is not automatically a solution across zero.

The integrating factor is derived directly from the product rule. The requirement that \((\mu y)' = \mu y' + \mu P y\) uniquely determines \(\mu(t) = e^{\int P(t) dt}\).

Why the integrating factor is unique

Assumptions
  • The ODE is linear: \(y' + P(x) y = Q(x)\) with continuous \(P, Q\).
  • We seek a non-zero differentiable multiplier \(\mu(x)\).
  1. Multiplying by \(\mu(x) = e^{\int P(x) dx}\) makes the left side equal to \((\mu y)'\).By the chain rule: \(\mu'(x) = \mu(x) P(x)\), so \(\mu y' + \mu P y = \mu y' + \mu' y = (\mu y)'\).
  2. Integrating \((\mu y)' = \mu Q\) yields \(\mu y = \int \mu Q\,dx + C\).By the Fundamental Theorem of Calculus: one integration produces exactly one constant of integration \(C\).
  3. The solution \(y(x) = \frac{1}{\mu(x)} \int \mu Q\,dx + \frac{C}{\mu(x)}\) is uniquely determined by \(y(x_0) = y_0\).Because \(\mu(x) = e^{\int P dx} > 0\) is never zero, division by \(\mu(x)\) is always defined and invertible.

Conclusion. The integrating factor method yields the complete, unique solution to any first-order linear initial value problem.

Scope. Covers all first-order linear ODEs on intervals where \(P(x)\) and \(Q(x)\) are continuous.

17.7 RC response from the circuit law

For a series resistor and capacitor with source \(V_s\), Kirchhoff's voltage law is

\[V_s=v_R+v_C.\]

The resistor voltage is \(v_R=Ri\), and the capacitor current is \(i=C\,dv_C/dt\) under the passive sign convention. Substitution gives

\[V_s=RC\frac{dv_C}{dt}+v_C.\]

Dividing by \(RC\) puts the equation in standard form:

\[\frac{dv_C}{dt}+\frac1{RC}v_C=\frac{V_s}{RC}.\]

The integrating factor is \(e^{t/(RC)}\). Carrying out the method gives the general step response

\[v_C(t)=V_s+(V_0-V_s)e^{-t/(RC)},\]

where \(V_0=v_C(0)\). It passes two physical checks:

\[v_C(0)=V_0,\qquad \lim_{t\to\infty}v_C(t)=V_s.\]

Engineering Example — numerical RC charging

Let \(R=2\ \mathrm{k}\Omega\), \(C=50\ \mu\mathrm F\), \(V_s=10\) V, and \(V_0=0\). Then

\[\tau=RC=(2000)(50\times10^{-6})=0.10\ \mathrm s.\]

Therefore

\[v_C(t)=10(1-e^{-t/0.10})\ \mathrm V.\]

At one time constant, \(v_C(0.10)=10(1-e^{-1})\approx6.32\) V. The capacitor has not “finished charging”; it has completed about \(63.2\%\) of the initial-to-final change. Its current is

\[i(t)=\frac{10}{2000}e^{-t/0.10}=5e^{-10t}\ \mathrm{mA}.\]

RC circuit differential equation. Applying Kirchhoff's Voltage Law to a series RC circuit with step voltage \(V_s\) gives \(R C \frac{dv_C}{dt} + v_C = V_s\).

Step response of an RC circuit

Starting point. Solve \(\frac{dv_C}{dt} + \frac{1}{RC} v_C = \frac{V_s}{RC}\) with initial condition \(v_C(0) = V_0\).

  1. \[P(t) = \frac{1}{RC} \implies \mu(t) = e^{\int (1/RC) dt} = e^{t/RC}\]
    Find the integrating factor with time constant \(\tau = RC\).reversible
  2. \[\frac{d}{dt}[e^{t/RC} v_C] = \frac{V_s}{RC} e^{t/RC}\]
    Multiply the ODE by \(\mu(t) = e^{t/RC}\).reversible
  3. \[e^{t/RC} v_C(t) = \int \frac{V_s}{RC} e^{t/RC} dt = V_s e^{t/RC} + C\]
    Integrate both sides.reversible
  4. \[v_C(t) = V_s + C e^{-t/RC}\]
    Divide by \(e^{t/RC}\).reversible
  5. \[v_C(0) = V_0 \implies V_0 = V_s + C \implies C = V_0 - V_s\]
    Apply the initial condition at \(t = 0\).reversible

Conclusion. \(v_C(t) = V_s + (V_0 - V_s)e^{-t/RC} = V_{\text{final}} + (V_{\text{initial}} - V_{\text{final}})e^{-t/\tau}\). This universal formula applies to all first-order RC/RL step responses.

  1. Identify initial voltage \(V_i = v_C(0)\) and final asymptotic voltage \(V_f = \lim_{t\to\infty} v_C(t)\).
  2. Compute time constant \(\tau = R_{\text{Th}} C\) using the Thévenin resistance seen by the capacitor.
  3. Apply the master first-order formula: \(v(t) = V_f + (V_i - V_f)e^{-t/\tau}\).
  4. Current through capacitor: \(i_C(t) = C \frac{dv_C}{dt} = \frac{V_f - V_i}{R} e^{-t/\tau}\).

17.8 First-order problem-solving strategy

  1. Name the independent variable and the unknown function; state an interval.
  2. Classify the equation: separable, linear, or neither of these standard forms.
  3. For linear equations, identify \(P(t)\) and \(Q(t)\) before forming \(\mu\).
  4. Keep the arbitrary constant until every integration is complete.
  5. Apply initial data, then substitute the result back into the ODE and inspect \(t=0\) and long-time behaviour.

For a stable constant-coefficient equation \(y'+ky=q\) with \(k>0\), the homogeneous part \(Ce^{-kt}\) decays. The particular constant \(q/k\) is the steady state. This separation is a mathematical result, not an assumption that every real circuit is ideal for all times.

A systematic diagnostic workflow for first-order ODEs. Follow this roadmap to select the optimal solution method.

  1. 1. Write the equation in standard form: \(y' = F(t, y)\) or \(y' + P(t)y = Q(t)\).
  2. 2. Check if separable: can you write \(F(t, y) = f(t) g(y)\)? If yes, separate \(\frac{dy}{g(y)} = f(t) dt\).
  3. 3. Check if linear: is the equation in the form \(y' + P(t)y = Q(t)\)? If yes, compute \(\mu(t) = e^{\int P(t) dt}\).
  4. 4. Integrate both sides and include the constant of integration \(+C\).
  5. 5. Solve for \(y(t)\) explicitly if possible.
  6. 6. Apply the initial condition \(y(t_0) = y_0\) to determine \(C\), and verify by differentiating your solution back into the original ODE.

Verification by substitution

From
  • Proposed solution: \(y(t) = 5 + 3 e^{-2t}\).
  • Original ODE: \(y' + 2y = 10\) with \(y(0) = 8\).
  1. Check initial condition: \(y(0) = 5 + 3 e^0 = 5 + 3 = 8\) (matches).
  2. Compute derivative: \(y'(t) = -6 e^{-2t}\).
  3. Substitute into left side: \(y' + 2y = -6e^{-2t} + 2(5 + 3e^{-2t}) = -6e^{-2t} + 10 + 6e^{-2t} = 10\).
  4. Matches right side \(Q(t) = 10\) for all \(t\).

Result. The solution is certified correct.

Common Mistakes

  • Calling an equation “linear” merely because it contains derivatives; \(yy'\) is nonlinear in \(y\).
  • Forgetting the initial condition after finding a general solution.
  • Using \(e^{\int Pdt}\) without the integral in a variable-coefficient equation.
  • Writing a numerical RC formula such as \(5e^{-t/RC}/R\) without stating the source voltage and initial condition that justify the \(5\).

The integrating factor turns the left side into a product rule derivative. Multiplying \(y' + P(t)y = Q(t)\) by \(\mu(t) = e^{\int P(t)dt}\) allows direct integration.

Derivation of the integrating factor

Starting point. We seek a multiplier \(\mu(t)\) such that \(\mu(t)y' + \mu(t)P(t)y = \frac{d}{dt}[\mu(t) y]\).

  1. \[\frac{d}{dt}[\mu y] = \mu y' + \mu' y\]
    Apply the product rule to the right side.reversible
  2. \[\mu y' + \mu P y = \mu y' + \mu' y \implies \mu' = P \mu\]
    Equate coefficients of \(y\): this yields a separable ODE for \(\mu\).reversible
  3. \[\frac{d\mu}{\mu} = P(t) dt \implies \ln|\mu| = \int P(t) dt \implies \mu(t) = e^{\int P(t) dt}\]
    Integrate to find the integrating factor (set \(C = 0\) as any non-zero multiplier works).reversible
  4. \[\frac{d}{dt}[\mu(t) y] = \mu(t) Q(t) \implies \mu(t) y = \int \mu(t) Q(t) dt + C\]
    Multiply the original ODE by \(\mu(t)\) and integrate both sides.reversible
  5. \[y(t) = \frac{1}{\mu(t)} \int \mu(t) Q(t) dt + \frac{C}{\mu(t)}\]
    Divide by \(\mu(t)\) to obtain the explicit general solution.reversible

Conclusion. \(y(t) = e^{-\int P(t)dt} \left[ \int e^{\int P(t)dt} Q(t) dt + C \right]\). The constant \(C\) is inside the brackets and must be divided by \(\mu(t)\).

Exercises

  1. Solve \(y'-3y=0\) with \(y(0)=4\).
  2. Solve \(y'+y=t\) using an integrating factor.
  3. Derive the current in an RC charging circuit from the capacitor-voltage result.
  4. State transient and steady-state parts of \(y(t)=7+2e^{-t/5}\).
  5. A capacitor initially has voltage \(V_0\). Write the expected qualitative change to the RC charging formula if the source is \(V_s\).
  6. Solve \(dy/dt=-3y\) with \(y(0)=7\), and state the units required for \(3\) if time is measured in seconds.
  7. Solve \(y'+(2/t)y=t^2\) for \(t>0\) with \(y(1)=1\).
  8. Starting from \(V_s=v_R+v_C\), derive the first-order RC equation.
  9. A \(1\ \mathrm{k}\Omega\) resistor and \(100\ \mu\)F capacitor are charged from \(5\) V with \(v_C(0)=1\) V. Find \(v_C(t)\) and \(v_C(0.1)\).