When storage elements such as capacitors and inductors are in a circuit that is to be analyzed, the analysis of the circuit will yield differential equations. This section will deal with solving the types of first and second order differential equations which will be encountered in the analysis of circuits. Higher order equations are to cumbersome to solve directly and other methods will be developed to solve these circuits.
Here is an example of a first order differential equation.
In this case we can solve the differential equation using separation of variables.
Next, integrate both sides.
Here k is the constant of integration. Exponentiating both sides leaves
K is the constant ek.
We now have a solution that will work with the first order equations that we will encounter. The trial solution for first order differential equations will be
Here we solve another first order equation by using the trial solution.
The only way this equation can be true is if (s + 2) is equal to 0 since Kest is never zero unless K is zero, which it generally won't be in the problems we will consider. Therefore
(Note that the general equation (s + a) = 0 is the characteristic equation for first order differential equations).
This solution is
If an initial condition is given, then the constant K can also be found.
K must be 2 then.
Solving a second order equation would be even more cumbersome, so we will instead try the trial solution first.
Once again, either (s² + 5s + 6) or (Kest) must be zero. Again, we will consider the case where K is not zero, and therefore (s² + 5s + 6) must be zero. The quadratic, as² + bs + c, is called the characteristic equation of a second order differential equation. The quadratic equation may be used to find the two possible solutions, although in some cases, such as this one, factoring is easier.
Since we have two separate solutions for s, we must have two separate terms for the solution, the combination of which form the whole solution. We must also have two unknowns.
In this case it would be
To find both these constants, we would need two initial conditions, both the functions initial condition, and its derivatives initial condition.
(Note that dx/dt|0 means the derivative of x with respect to t evaluated at 0).
With these conditions, we can find the two constants.
The final solution is
There are two other possibilities though when solving the characteristic equation. The first is that the solution has repeated roots. In this case, the general form of the solution is different. It is
Note the extra t is the second term. This is needed to get the two separate parts of the solution necessary to solve the equation. The rest of the solution process is the same.
The other possibility is that the solution is complex. In this case the solutions would be complex conjugates where one solution would have a positive imaginary part and the other would have a negative imaginary part. (Note that j is the imaginary number sqrt(-1). It is called i in most mathematics books but j is used to avoid confusion with the variable i used for an unknown current.)
Finding the unknowns when the two solutions are complex is more difficult than with the repeated solutions, so we will go through an example here.
So the solution with the two unknowns is
When finding the unknowns is necessary, there is a more useful form of the solution. (See section on Complex Numbers for derivation). The general form is
For this problem, the solution would be
With the initial conditions
The final solution is
Up to this point, the differential equations we have solved have all consisted of an unknown and derivatives of that unknown with no other functions. Basically, this means when you gather all instances of that unknown on one side of the equation, the other side is 0. This response is called the natural response. When there is an additional function, the forced response must be considered as well. The total response is then the sum of the natural and forced responses. They can be found separately but it is required that the total response be considered when finding the unknowns in the natural response, otherwise the solution will be wrong. Here is a simple example.
Notice the constant on the right side of the equation. We will first find the forced response. To find the forced response, we will plug a trial solution into the problem and the solve for the unknowns in the solution. The type of trial solution depends on the terms which appear on the right side of the equation. In this case it is a constant so the trial solution will be a constant.
So the forced response is equal to 2. Now we find the natural response by removing the forcing function.
Solving the characteristic equation.
So the natural solution is
Now, if we are given an initial condition, we must find K using the total response.
The total solution is
Here is a table of some forcing functions and their trial solutions.
|Forcing Function||Trial Forced Solution|
|t||At + B|
|tn||Atn + Btn-1 + . . . + Et + F|
|sin wt, cos wt||A sin wt + B cos wt|
|eat sin wt, eat cos wt||eat(A sin wt + B cos wt)|
|teat sin wt, teat cos wt||teat(A sin wt + B cos wt) + eat(C sin wt + D cos wt)|
When working with second order equations or with forcing functions which are not constants, the computation is obviously harder. Here is a second order problem with a sinusoid as the forcing function.
First, we will find the forced solution.
In this case, w = 2.
Now, divide this into two different equations, one equating the cosine terms and one equating the sine terms.
So the forced solution is
Once again, to find the natural solution, remove the forcing term
Solve the characteristic equation.
This is a case of repeated roots, so the natural solution is
The total solution is then
With initial conditions
The final solution is