Numerical Analysis Using MATLAB and Spreadsheets

This chapter is a review of ordinary differential equations and an introduction to state variables and state equations. Solutions of differential equations with numerical methods will be discussed in Chapter 9.
In this section we present two simple examples to show the importance of differential equations in engineering applications.
The current and voltage in a capacitor are related by
where i C( t) is the current through the capacitor, v C( t) is the voltage across the capacitor, and the constant C is the capacitance in farads (F). For this example C = 1 F and the capacitor is being charged by a constant current I. Find the voltage 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,
By substitution of (5.2) into (5.1) we get
and by separation of the variables,
Integrating both sides of (5.3) we get
where k represents the constants of integration of both sides.
We can find the value of the constant k by making use of the initial condition, i.e., at t = 0, v C = V 0 and (5.4) then becomes
or k = V 0, and by substitution into (5.4),
This example shows that when a capacitor...