By the end of this chapter, you will be able to:
Mastering these skills will help you solve real-world engineering problems with confidence and precision.
Engineering electronics systems often involve dynamic processes described by differential equations, where the rate of change of currents, voltages, or charge storage is fundamental. Understanding how to form and solve ordinary differential equations (ODEs) equips electronics engineers with tools to analyze circuits involving capacitors, inductors, and signal responses. This chapter focuses on the formation and solution of first and second order ODEs commonly encountered in electronics engineering applications, such as RC, RL, and RLC circuits.
In electronics engineering practice in Kenya, differential equations model transient responses in circuits and control systems. Mastery of solving these ODEs enables engineers to predict system behavior under various inputs, ensure stability, and design filters and oscillators. We begin with first order ODEs, progressing through variable separable, homogeneous, and linear types, fundamental in analyzing circuits with single energy storage elements.
A first order variable separable differential equation can be expressed as
$$\frac{dy}{dx} = g(x)h(y)$$
where the variables \(x\) and \(y\) can be separated on opposite sides of the equation. This form is common in simple RC circuit charging or discharging problems where voltage or current changes with time.
The general solution involves rewriting as
$$\frac{1}{h(y)} dy = g(x) dx$$
and integrating both sides.
Example 1: An RC circuit discharges through a resistor with voltage across the capacitor \(V\) governed by
$$\frac{dV}{dt} = -\frac{1}{RC} V$$
Given \(R = 2\,k\Omega\), \(C = 10\,\mu F\), and initial voltage \(V_0 = 12\,V\), find \(V\) at time \(t\).
Given: \(R=2000\,\Omega\), \(C=10 \times 10^{-6} F\), \(V_0=12\,V\), find \(V(t)\).
Separate variables:
$$\frac{dV}{V} = -\frac{1}{RC} dt$$
Substitute values:
$$\frac{dV}{V} = -\frac{1}{2000 \times 10 \times 10^{-6}} dt = -50 dt$$
Integrate both sides:
$$\int \frac{1}{V} dV = -50 \int dt$$
$$\ln |V| = -50 t + C$$
Solve for \(V\):
$$V = e^{-50 t + C} = Ae^{-50 t}$$
Apply initial condition \(V(0) = 12\):
$$12 = A e^{0} \Rightarrow A = 12$$
Final solution:
$$V(t) = 12 e^{-50 t}$$
Answer: \(V(t) = 12 e^{-50 t}\) volts
Example 2: The current \(I\) in an RL circuit satisfies
$$\frac{dI}{dt} = -\frac{R}{L} I$$
Given \(R=5\,\Omega\), \(L=0.1\,H\), and initial current \(I_0=3\,A\), find \(I\) at \(t=0.05\,s\).
Separate variables:
$$\frac{dI}{I} = -\frac{R}{L} dt$$
Substitute values:
$$\frac{dI}{I} = -\frac{5}{0.1} dt = -50 dt$$
Integrate:
$$\ln |I| = -50 t + C$$
Solve for \(I\):
$$I = Ae^{-50 t}$$
Apply initial condition:
$$3 = A e^{0} \Rightarrow A=3$$
Calculate \(I\) at \(t=0.05\):
$$I = 3 e^{-50 \times 0.05} = 3 e^{-2.5}$$
Calculate \(e^{-2.5} \approx 0.0821\):
$$I = 3 \times 0.0821 = 0.2463\,A$$
Answer: \(I = 0.2463\,A\) at \(t=0.05\,s\)
Example 3: A capacitor voltage \(V\) in an RC circuit is governed by
$$\frac{dV}{dt} = \frac{1}{RC} (V_{in} - V)$$
Assuming \(V_{in} = 5\,V\), \(R=1\,k\Omega\), \(C=20\,\mu F\), and initial voltage \(V(0)=0\), find \(V\) at \(t=0.01\,s\).
Rearranged:
$$\frac{dV}{dt} + \frac{1}{RC} V = \frac{V_{in}}{RC}$$
This is not separable directly, but if we consider the complementary solution:
Separate variables for the homogeneous part:
$$\frac{dV}{dt} = -\frac{1}{RC} V$$
Solution:
$$V_c = Ae^{-\frac{t}{RC}}$$
The particular solution is \(V_p = V_{in} = 5\,V\).
General solution:
$$V = V_p + V_c = 5 + Ae^{-\frac{t}{RC}}$$
Apply initial condition:
$$0 = 5 + A e^{-\frac{0}{RC}} = 5 + A \Rightarrow A = -5$$
Calculate at \(t=0.01\):
$$V = 5 - 5 e^{-\frac{0.01}{1000 \times 20 \times 10^{-6}}} = 5 - 5 e^{-0.5}$$
Calculate \(e^{-0.5} \approx 0.6065\):
$$V = 5 - 5 \times 0.6065 = 5 - 3.0325 = 1.9675\,V$$
Answer: \(V = 1.9675\,V\) at \(t=0.01\,s\)
A first order homogeneous differential equation has the form
$$\frac{dy}{dx} = F(\frac{y}{x})$$
which implies the function depends on the ratio \(y/x\). This form appears in electronics when variables scale proportionally, such as in transistor characteristic curves or normalized circuit parameters.
The substitution \(v = \frac{y}{x}\) transforms the equation into a separable one.
Example 1: Solve
$$\frac{dy}{dx} = \frac{y}{x}$$
Given initial condition \(y(1)=2\).
Substitute \(v = \frac{y}{x}\), then \(y = vx\), so
$$\frac{dy}{dx} = v + x \frac{dv}{dx}$$
Substitute into original equation:
$$v + x \frac{dv}{dx} = v$$
Simplify:
$$x \frac{dv}{dx} = 0$$
$$\frac{dv}{dx} = 0$$
Integrate:
$$v = C$$
Recall \(v = \frac{y}{x}\), so
$$\frac{y}{x} = C \Rightarrow y = C x$$
Apply initial condition:
$$2 = C \times 1 \Rightarrow C=2$$
Answer: \(y = 2x\)
Example 2: Solve
$$\frac{dy}{dx} = \frac{x + y}{x}$$
Given \(y(1) = 1\).
Rewrite:
$$\frac{dy}{dx} = 1 + \frac{y}{x}$$
Let \(v = \frac{y}{x}\), \(y = v x\), so
$$\frac{dy}{dx} = v + x \frac{dv}{dx}$$
Substitute into equation:
$$v + x \frac{dv}{dx} = 1 + v$$
Simplify:
$$x \frac{dv}{dx} = 1$$
Separate variables:
$$\frac{dv}{dx} = \frac{1}{x}$$
Integrate:
$$v = \ln |x| + C$$
Recall \(v = \frac{y}{x}\):
$$\frac{y}{x} = \ln |x| + C \Rightarrow y = x \ln |x| + C x$$
Apply initial condition \(y(1) = 1\):
$$1 = 1 \times \ln 1 + C \times 1 = 0 + C \Rightarrow C=1$$
Answer: \(y = x \ln |x| + x\)
Example 3: Solve
$$\frac{dy}{dx} = \frac{y, x}{y + x}$$
Given \(y(1) = 0\).
Rewrite the right side:
$$\frac{dy}{dx} = \frac{y, x}{y + x}$$
Let \(v = \frac{y}{x}\), so \(y = v x\).
Calculate \(\frac{dy}{dx} = v + x \frac{dv}{dx}\).
Substitute:
$$v + x \frac{dv}{dx} = \frac{v x, x}{v x + x} = \frac{v - 1}{v + 1}$$
Rearrange:
$$x \frac{dv}{dx} = \frac{v - 1}{v + 1} - v = \frac{v - 1 - v (v + 1)}{v + 1} = \frac{v - 1 - v^2 - v}{v + 1} = \frac{-v^2 - 1}{v + 1}$$
Simplify numerator:
$$-v^2 - 1 = -(v^2 + 1)$$
So:
$$x \frac{dv}{dx} = -\frac{v^2 + 1}{v + 1}$$
Separate variables:
$$\frac{v + 1}{v^2 + 1} dv = -\frac{dx}{x}$$
Integrate left side:
$$\int \frac{v + 1}{v^2 + 1} dv = \int \frac{v}{v^2 + 1} dv + \int \frac{1}{v^2 + 1} dv$$
Calculate each integral:
\(\int \frac{v}{v^2 + 1} dv = \frac{1}{2} \ln (v^2 + 1)\)
\(\int \frac{1}{v^2 + 1} dv = \tan^{-1} v\)
Therefore:
$$\int \frac{v + 1}{v^2 + 1} dv = \frac{1}{2} \ln (v^2 + 1) + \tan^{-1} v + C$$
Integrate right side:
$$\int -\frac{dx}{x} = -\ln |x| + C$$
Combine:
$$\frac{1}{2} \ln (v^2 + 1) + \tan^{-1} v = -\ln |x| + C$$
Apply initial condition \(y(1) = 0\), so \(v = \frac{0}{1} = 0\):
$$\frac{1}{2} \ln (0^2 + 1) + \tan^{-1} 0 = -\ln 1 + C$$
$$0 + 0 = 0 + C \Rightarrow C=0$$
Implicit solution:
$$\frac{1}{2} \ln (v^2 + 1) + \tan^{-1} v = -\ln |x|$$
Recall \(v = \frac{y}{x}\):
$$\frac{1}{2} \ln (\frac{y^2}{x^2} + 1 ) + \tan^{-1} (\frac{y}{x}) = -\ln |x|$$
A first order linear differential equation has the standard form
$$\frac{dy}{dx} + P(x) y = Q(x)$$
which appears frequently in electronics for circuits with forcing functions, such as RC circuits with input voltage sources.
The integrating factor method solves this equation using
$$\mu(x) = e^{\int P(x) dx}$$
and the solution formula
$$y \times \mu(x) = \int Q(x) \times \mu(x) dx + C$$
Example 1: Solve
$$\frac{dy}{dx} + 2 y = 4$$
with initial condition \(y(0) = 1\).
Calculate integrating factor:
$$\mu(x) = e^{\int 2 dx} = e^{2x}$$
Multiply both sides by \(\mu(x)\):
$$e^{2x} \frac{dy}{dx} + 2 e^{2x} y = 4 e^{2x}$$
Left side is derivative:
$$\frac{d}{dx} (y e^{2x}) = 4 e^{2x}$$
Integrate both sides:
$$y e^{2x} = \int 4 e^{2x} dx + C$$
Calculate integral:
$$\int 4 e^{2x} dx = 4 \times \frac{e^{2x}}{2} = 2 e^{2x}$$
So:
$$y e^{2x} = 2 e^{2x} + C$$
Divide both sides by \(e^{2x}\):
$$y = 2 + C e^{-2x}$$
Apply initial condition \(y(0) = 1\):
$$1 = 2 + C e^{0} = 2 + C \Rightarrow C = -1$$
Final solution:
$$y = 2 - e^{-2x}$$
Answer: \(y = 2 - e^{-2x}\)
Example 2: An RC circuit voltage \(V\) satisfies
$$\frac{dV}{dt} + \frac{1}{RC} V = \frac{V_{in}}{RC}$$
Given \(R = 1\,k\Omega\), \(C=10\,\mu F\), \(V_{in} = 10\,V\), and \(V(0) = 0\), find \(V(t)\).
Calculate \(\mu(t)\):
$$\mu(t) = e^{\int \frac{1}{RC} dt} = e^{\frac{t}{RC}}$$
Substitute \(RC = 1000 \times 10 \times 10^{-6} = 0.01\,s\):
$$\mu(t) = e^{\frac{t}{0.01}} = e^{100 t}$$
Multiply equation by \(\mu(t)\):
$$e^{100 t} \frac{dV}{dt} + \frac{1}{RC} e^{100 t} V = \frac{V_{in}}{RC} e^{100 t}$$
Left side is derivative:
$$\frac{d}{dt} (V e^{100 t}) = \frac{V_{in}}{RC} e^{100 t}$$
Integrate both sides:
$$V e^{100 t} = \int \frac{V_{in}}{RC} e^{100 t} dt + C = \frac{V_{in}}{RC} \int e^{100 t} dt + C$$
Calculate integral:
$$\int e^{100 t} dt = \frac{e^{100 t}}{100}$$
Therefore:
$$V e^{100 t} = \frac{V_{in}}{RC} \times \frac{e^{100 t}}{100} + C = \frac{10}{0.01} \times \frac{e^{100 t}}{100} + C = 1000 \times \frac{e^{100 t}}{100} + C = 10 e^{100 t} + C$$
Divide both sides by \(e^{100 t}\):
$$V = 10 + C e^{-100 t}$$
Apply initial condition \(V(0) = 0\):
$$0 = 10 + C e^{0} \Rightarrow C = -10$$
Final solution:
$$V = 10 - 10 e^{-100 t}$$
Answer: \(V(t) = 10 - 10 e^{-100 t}\) volts
Example 3: Solve
$$\frac{dy}{dx} + \frac{2}{x} y = \sin x$$
with \(y(\pi) = 0\).
Calculate integrating factor:
$$\mu(x) = e^{\int \frac{2}{x} dx} = e^{2 \ln |x|} = x^{2}$$
Multiply both sides by \(x^{2}\):
$$x^{2} \frac{dy}{dx} + 2 x y = x^{2} \sin x$$
Left side is derivative:
$$\frac{d}{dx} (x^{2} y) = x^{2} \sin x$$
Integrate both sides:
$$x^{2} y = \int x^{2} \sin x dx + C$$
Use integration by parts to evaluate \(\int x^{2} \sin x dx\):
Let
\(u = x^{2}\), \(dv = \sin x dx\)
Then
\(du = 2x dx\), \(v = -\cos x\)
Apply integration by parts:
\(\int x^{2} \sin x dx = -x^{2} \cos x + \int 2x \cos x dx\)
Evaluate \(\int 2x \cos x dx\) by parts again:
Let
\(u = 2x\), \(dv = \cos x dx\)
Then
\(du = 2 dx\), \(v = \sin x\)
So
\(\int 2x \cos x dx = 2x \sin x - \int 2 \sin x dx = 2x \sin x + 2 \cos x + C\)
Therefore:
\(\int x^{2} \sin x dx = -x^{2} \cos x + 2x \sin x + 2 \cos x + C\)
So:
$$x^{2} y = -x^{2} \cos x + 2x \sin x + 2 \cos x + C$$
Divide by \(x^{2}\):
$$y = -\cos x + \frac{2 \sin x}{x} + \frac{2 \cos x}{x^{2}} + \frac{C}{x^{2}}$$
Apply initial condition \(y(\pi) = 0\):
Calculate each term at \(x = \pi\):
\(-\cos \pi = -(-1) = 1\)
\(\frac{2 \sin \pi}{\pi} = 0\)
\(\frac{2 \cos \pi}{\pi^{2}} = \frac{2 \times -1}{\pi^{2}} = -\frac{2}{\pi^{2}}\)
So:
$$0 = 1 + 0 - \frac{2}{\pi^{2}} + \frac{C}{\pi^{2}}$$
Solve for \(C\):
$$\frac{C}{\pi^{2}} = -1 + \frac{2}{\pi^{2}}$$
Multiply both sides by \(\pi^{2}\):
$$C = -\pi^{2} + 2$$
Final solution:
$$y = -\cos x + \frac{2 \sin x}{x} + \frac{2 \cos x}{x^{2}} + \frac{-\pi^{2} + 2}{x^{2}}$$
An RC circuit with \(R = 3\,k\Omega\) and \(C = 5\,\mu F\) discharges from an initial voltage of 15 V. Find the voltage after 0.002 seconds. (5 marks)
Solve the differential equation \(\frac{dy}{dx} = \frac{2y + x}{x}\) given \(y(1) = 0\). (6 marks)
Find the solution of \(\frac{dy}{dx} + \frac{3}{x} y = x^{2}\) with \(y(1) = 2\). (7 marks)
For an RL circuit with \(R = 10\,\Omega\), \(L = 0.5\,H\), and initial current 5 A, find the current after 0.1 seconds. (5 marks)
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis chapter introduced the formation and solution of first and second order ordinary differential equations, beginning with first order equations that are variable separable, homogeneous, and linear. It then progressed to solving second order differential equations by determining unknown coefficients using characteristic equations. The D-operator method was presented as a powerful technique to simplify solving linear differential equations, including its extension to simultaneous differential equations and solutions through the series method. Throughout, emphasis was placed on step-by-step procedures to obtain general and particular solutions. The chapter concluded by exploring practical applications of differential equations in engineering contexts, demonstrating their relevance in modeling physical phenomena and solving real-world problems. Mastery of these methods equips students to analyze and solve a wide range of engineering problems involving rates of change and dynamic systems.
Solve the first-order variable separable differential equation for the current \(i(t)\) in an RC circuit given by
\[
\frac{di}{dt} = -\frac{1}{RC} i,
\]
where \(R = 1\,k\Omega\) and \(C = 1\,\mu F\), and the initial current \(i(0) = 5\,mA\). Find \(i(t)\) at \(t = 2\,ms\). (2 marks)
Find the general solution of the first-order homogeneous differential equation
\[
\frac{dy}{dx} = \frac{x+y}{x-y}.
\]
(2 marks)
At the start of this chapter we promised you would be able to:
Tick each one you can genuinely do.
Sample simulation — try how the simulator works. A version built for this chapter's practical is coming.
Prepare Kenyan PilauLocked ▸Free: practical guides, quick cards, workplace scenarios and more.
Now — are you there yet?
You're competent when you can confidently do 50% or more of what this chapter promised.
Sign in to record how you're doing.