Monday, September 10, 2012

Linear Differential Equations III: Undetermined Coefficients


← Part II, The Homogeneous Case                           {Causality} Next →

Consider the linear differential equation of order n.
          
where an ≠ 0 and X(t) ≠ 0.

It has solution y = yc + yp.  The homogeneous solution yc can always be found in a straightforward manner.  We would like to find the particular solution, yp.  There are a number of methods, depending on the properties of X(t).   The simplest, to me, is

THE  METHOD OF UNDETERMINED COEFFICIENTS
 If X(t) is a linear combination of functions, and each term has a finite number of linearly independent derivatives, then yp is a linear combination of X(t) and its linearly independent derivatives.  The coefficients of each term  are unknown.  Substitute the trial solution into (1), and solve for the unknown coefficients.

Basically, we already know we're going to differentiate our solution a bunch of times.  n times, to be exact.  And when we're done, we need to be left with X(t).  So differentiate X(t) and see what functions are introduced.  Make up a solution which is stupidly  AllOfThoseFunctionsAddedTogether.  The only question left is then what constants to multiply them by, so we really are left with X(t).

That's it.  Really.

Example 1:
          
We have  X(t)  =  2t + ksin(t).   The elementary functions in X(t) are   t  and   sin(t).   The linearly independent derivatives are:
           t :      1
     sin(t):    cos(t)
Our trial solution  has the form:
          
Differentiating twice,
          
Substitute these values into the differential equation,
          
Collect like terms:
  
The coefficients on the left-hand side must match the ones on the right.
          
The rest is Algebra.
       
We now have the particular solution:
       
From the characteristic equation m2 - 2m + 3 has roots  m = 1± i√2, and the homogeneous solution is
       
At last we have the general solution,  :
       .


Example 2:

       
For periodic functions such as sine and cosine, another approach is available.  From the equality   ,  we know that  cos x  is the real part of eix.  Consider, then,
       
If Yp is a solution of (2a), then yp =     (the real part of yp) is a solution of (2).
A trial solution is then
       
Substitute into (2a):
       
And divide through by e0t,  which  is never ever ever zero, foreverEverPlus1, no takebacks.
       
The particular solution of (2) is then
     
In addition, the real part of any complex exponential can be written as a linear combination of two complex exponentials with equal exponents of opposite sign, which in turn can be written as a single sine or cosine function of the form     Asin(ω0 t + θ1)    or      Acos(ω0t −θ2).

In this example, construct the right triangle with base 3 and height 2ω0.  Call the angle adjacent to the base θ.  Then
       
And yp can be rewritten as
       
where   tanθ  = 2ω0/3.

Everything appears to be in order.  It is time to move on to an elementary example from signal processing.  I am not sure why people who work on signals insist on making things more complicated and confusing than necessary.  That is part of what I am unraveling as I catch up with the job I want.  Something is terribly wrong with the current state of audio tools and design.  Audio is full of crazy.   But I know how to tell the difference between a coat hanger and the ghost of my grandfather. So bring it on.

Bring on the crazy.

No comments:

Post a Comment