Page 162 - Numerical Analysis Using MATLAB and Excel
P. 162
Chapter 5
Differential Equations, State Variables, and State Equations
T his chapter is a review of ordinary differential equations and an introduction to state vari-
ables and state equations. Solutions of differential equations with numerical methods is dis-
cussed in Chapter 9.
5.1 Simple Differential Equations
In this section we present two simple examples to show the importance of differential equations in
engineering applications.
Example 5.1
The current and voltage in a capacitor are related by
dv
C
i t() = C--------- (5.1)
C
dt
where i t() is the current through the capacitor, v t() is the voltage across the capacitor, and the
C
C
constant is the capacitance in farads (F). For this example C = 1 F and the capacitor is being
C
I
charged by a constant current . Find the voltage v C across this capacitor as a function of time
given that the voltage at some reference time t = 0 is V 0 .
Solution:
It is given that the current, as a function of time, is constant, that is,
i t() = I = constan t (5.2)
C
By substitution of (5.2) into (5.1) we obtain
dv
C
--------- = I
dt
and by separation of the variables,
dv C = Idt (5.3)
Integrating both sides of (5.3) we obtain
v t() = It + k (5.4)
C
where represents the constants of integration of both sides.
k
Numerical Analysis Using MATLAB® and Excel®, Third Edition 5−1
Copyright © Orchard Publications