S.
Boyd                                             EE102
                        Lecture 5
          Rational functions and partial fraction
                        expansion
• (review of) polynomials
• rational functions
• pole-zero plots
• partial fraction expansion
• repeated poles
• nonproper rational functions
                                                      5–1
                                        Polynomials and roots
polynomials
                                       a(s) = a0 + a1s + · · · + ansn
• a is a polynomial in the variable s
• ai are the coefficients of a (usually real, but occasionally complex)
• n is the degree of a (assuming an 6= 0)
roots (or zeros) of a polynomial a: λ ∈ C that satisfy
                                                    a(λ) = 0
examples
• a(s) = 3 has no roots
                   3
                                                               √        √
• a(s) = s − 1 has three roots: 1, (−1 + j 3)/2, (−1 − j 3)/2
Rational functions and partial fraction expansion                           5–2
factoring out roots of a polynomial
if a has a root at s = λ we can factor out s − λ:
• dividing a by s − λ yields a polynomial:
                                                               a(s)
                                                      b(s) =
                                                               s−λ
     is a polynomial (of degree one less than the degree of a)
• we can express a as
                                                    a(s) = (s − λ)b(s)
     for some polynomial b
example: s3 − 1 has a root at s = 1
                                        s3 − 1 = (s − 1)(s2 + s + 1)
Rational functions and partial fraction expansion                        5–3
the multiplicity of a root λ is the number of factors s − λ we can factor
out, i.e., the largest k such that
                                                      a(s)
                                                    (s − λ)k
is a polynomial
example:
                                             a(s) = s3 + s2 − s − 1
• a has a zero at s = −1
  a(s)   s3 + s 2 − s − 1
•      =                  = s2 − 1 also has a zero at s = −1
  s+1         s+1
    a(s)     s3 + s 2 − s − 1
•          =                  = s − 1 does not have a zero at s = −1
  (s + 1)2       (s + 1)2
so the multiplicity of the zero at s = −1 is 2
Rational functions and partial fraction expansion                       5–4
                            Fundamental theorem of algebra
     a polynomial of degree n has exactly n roots, counting multiplicities
this means we can write a in factored form
                      a(s) = ansn + · · · + a0 = an(s − λ1) · · · (s − λn)
where λ1, . . . , λn are the n roots of a
example: s3 + s2 − s − 1 = (s + 1)2(s − 1)
the relation between the coefficients ai and the λi is complicated in
general, but
                          Yn                         Xn
                  a0 = an (−λi), an−1 = −an              λi
                                             i=1              i=1
are two identities that are worth remembering
Rational functions and partial fraction expansion                            5–5
                                         Conjugate symmetry
if the coefficients a0, . . . , an are real, and λ ∈ C is a root, i.e.,
                                   a(λ) = a0 + a1λ + · · · + anλn = 0
then we have
                                                    n
    a(λ) = a0 + a1λ + · · · + anλ = (a0 + a1λ + · · · + anλn) = a(λ) = 0
in other words: λ is also a root
• if λ is real this isn’t interesting
• if λ is complex, it gives us another root for free
• complex roots come in complex conjugate pairs
Rational functions and partial fraction expansion                          5–6
example:
                PSfrag replacements                      =
                                               λ1
                                                         λ4
                                                    λ3           λ6
                                                                      <
                                                         λ5
                                               λ2
λ3 and λ6 are real; λ1, λ2 are a complex conjugate pair; λ4, λ5 are a
complex conjugate pair
if a has real coefficients, we can factor it as
                         Ã r           !Ã m                      !
                           Y                Y
             a(s) = an        (s − λi)          (s − λi)(s − λi)
                                          i=1                 i=r+1
where λ1, . . . , λr are the real roots; λr+1, λr+1, . . . , λm, λm are the
complex roots
Rational functions and partial fraction expansion                             5–7
                                            Real factored form
                                (s − λ)(s − λ) = s2 − 2(<λ) s + |λ|2
is a quadratic with real coefficients
real factored form of a polynomial a:
                                       Ã   r
                                                            !Ã    m
                                                                                           !
                                           Y                      Y
                     a(s) = an                   (s − λi)                (s2 + αis + βi)
                                           i=1                   i=r+1
• λ1, . . . , λr are the real roots
• αi, βi are real and satisfy αi2 < 4βi
any polynomial with real coefficients can be factored into a product of
• degree one polynomials with real coefficients
• quadratic polynomials with real coefficients
Rational functions and partial fraction expansion                                              5–8
example: s3 − 1 has roots
                                                          √                  √
                                                    −1 + j 3           −1 − j 3
                            s = 1,          s=               ,    s=
                                                        2                  2
• complex factored form
                                                ³             √    ´³             √       ´
                 s3 − 1 = (s − 1) s + (1 + j 3)/2                       s + (1 − j 3)/2
• real factored form
                                          s3 − 1 = (s − 1)(s2 + s + 1)
Rational functions and partial fraction expansion                                             5–9
                                            Rational functions
a rational function has the form
                                       b(s)   b0 + b 1 s + · · · + b m s m
                               F (s) =      =                            n
                                                                           ,
                                       a(s)   a0 + a 1 s + · · · + a n s
i.e., a ratio of two polynomials (where a is not the zero polynomial)
• b is called the numerator polynomial
• a is called the denominator polynomial
examples of rational functions:
                1                2                 1     s      s3 + 3s + 3
                   ,           s + 3,                +      = 3
               s+1                              s + 1 2s + 3 2s + 3s2 + 2s + 3
                                                 2
Rational functions and partial fraction expansion                                5–10
                                            b(s)
rational function F (s) =
                                            a(s)
polynomials b and a are not uniquely determined, e.g.,
                                     1      3       s2 + 3
                                        =      =
                                   s + 1 3s + 3 (s + 1)(s2 + 3)
                               √
(except at s = ±j 3. . . )
rational functions are closed under addition, subtraction, multiplication,
division (except by the rational function 0)
Rational functions and partial fraction expansion                            5–11
                                                    Poles & zeros
                                       b(s)   b0 + b 1 s + · · · + b m s m
                               F (s) =      =                            n
                                                                           ,
                                       a(s)   a0 + a 1 s + · · · + a n s
assume b and a have no common factors (cancel them out if they do . . . )
• the m roots of b are called the zeros of F ; λ is a zero of F if F (λ) = 0
• the n roots of a are called the poles of F ; λ is a pole of F if
  lims→λ |F (s)| = ∞
the multiplicity of a zero (or pole) λ of F is the multiplicity of the root λ
of b (or a)
           6s + 12
example: 2          has one zero at s = −2, two poles at s = −1
         s + 2s + 1
Rational functions and partial fraction expansion                              5–12
factored or pole-zero form of F :
                        b0 + b 1 s + · · · + b m s m    (s − z1) · · · (s − zm)
                F (s) =                              =k
                        a0 + a 1 s + · · · + a n sn     (s − p1) · · · (s − pn)
where
• k = bm/an
• z1, . . . , zm are the zeros of F (i.e., roots of b)
• p1, . . . , pn are the poles of F (i.e., roots of a)
(assuming the coefficients of a and b are real) complex poles or zeros come
in complex conjugate pairs
can also have real factored form . . .
Rational functions and partial fraction expansion                                 5–13
                                                          Pole-zero plots
          poles & zeros of a rational functions are often shown in a pole-zero plot
                                       =
                                          j
PSfrag replacements                            1
                                                              <
                                                              (× denotes a pole; ◦ denotes a zero)
          this example is for
                                                        (s + 1.5)(s + 1 + 2j)(s + 1 − 2j)
                              F (s) = k
                                                     (s + 2.5)(s − 2)(s − 1 − j)(s − 1 + j)
                                                   (s + 1.5)(s2 + 2s + 5)
                                           = k
                                               (s + 2.5)(s − 2)(s2 − 2s + 2)
          (the plot doesn’t tell us k)
          Rational functions and partial fraction expansion                                          5–14
                                    Partial fraction expansion
                                       b(s)   b0 + b 1 s + · · · + b m s m
                               F (s) =      =
                                       a(s)   a0 + a 1 s + · · · + a n sn
let’s assume (for now)
• no poles are repeated, i.e., all roots of a have multiplicity one
• m<n
then we can write F in the form
                                                r1             rn
                                      F (s) =        + ··· +
                                              s − λ1         s − λn
called partial fraction expansion of F
• λ1, . . . , λn are the poles of F
• the numbers r1, . . . , rn are called the residues
• when λk = λl, rk = rl
Rational functions and partial fraction expansion                            5–15
example:
                                     s2 − 2      −1    1   1
                                               =    +    +
                                 s3 + 3s2 + 2s    s   s+1 s+2
let’s check:
          −1    1   1    −1(s + 1)(s + 2) + s(s + 2) + s(s + 1)
             +    +    =
           s   s+1 s+2              s(s + 1)(s + 2)
in partial fraction form, inverse Laplace transform is easy:
                                   µ                       ¶
                                       r1             rn
                 L−1(F ) = L−1              + ··· +
                                     s − λ1         s − λn
                                           = r 1 eλ1 t + · · · + r n eλn t
(this is real since whenever the poles are conjugates, the corresponding
residues are also)
Rational functions and partial fraction expansion                            5–16
                      Finding the partial fraction expansion
two steps:
• find poles λ1, . . . , λn (i.e., factor a(s))
• find residues r1, . . . , rn (several methods)
method 1: solve linear equations
we’ll illustrate for m = 2, n = 3
                       b0 + b1s + b2s2       r1     r2     r3
                                          =      +      +
                  (s − λ1)(s − λ2)(s − λ3) s − λ1 s − λ2 s − λ3
Rational functions and partial fraction expansion                 5–17
clear denominators:
b0 + b1s + b2s2 = r1(s − λ2)(s − λ3) + r2(s − λ1)(s − λ3) + r3(s − λ1)(s − λ2)
equate coefficients:
• coefficient of s0:
                                   b0 = (λ2λ3)r1 + (λ1λ3)r2 + (λ1λ2)r3
• coefficient of s1:
                      b1 = (−λ2 − λ3)r1 + (−λ1 − λ3)r2 + (−λ1 − λ2)r3
• coefficient of s2:
                                                    b2 = r 1 + r 2 + r 3
now solve for r1, r2, r3 (three equations in three variables)
Rational functions and partial fraction expansion                          5–18
method 2: to get r1, multiply both sides by s − λ1 to get
              (s − λ1)(b0 + b1s + b2s2)        r2(s − λ1) r3(s − λ1)
                                        = r1 +           +
              (s − λ1)(s − λ2)(s − λ3)           s − λ2     s − λ3
cancel s − λ1 term on left and set s = λ1:
                                             b0 + b1λ1 + b2λ21
                                                               = r1
                                            (λ1 − λ2)(λ1 − λ3)
an explicit formula for r1! (can get r2, r3 the same way)
in the general case we have the formula
                                            rk = (s − λk )F (s)|s=λk
which means:
• multiply F by s − λk
• then cancel s − λk from numerator and denominator
• then evaluate at s = λk to get rk
Rational functions and partial fraction expansion                      5–19
example:
                                    s2 − 2       r1  r2   r3
                                                = +     +
                                s(s + 1)(s + 2)  s  s+1 s+2
• residue r1:
                        µ                   ¶¯                   2
                                                                           ¯
                                  r2 s   r3s ¯¯                 s −2       ¯
               r1 =         r1 +       +                  =                ¯         = −1
                                 s+1 s+2 ¯          s=0     (s + 1)(s + 2) ¯   s=0
• residue r2:
            µ                           ¶¯          2
                                                          ¯
              r1(s + 1)        r3(s + 1) ¯
                                         ¯         s − 2 ¯¯
       r2 =             + r2 +                  =               =1
                  s              s+2     ¯
                                           s=−1   s(s + 2) s=−1
                                                          ¯
• residue r3:
            µ                         ¶¯          2
                                                        ¯
              r1(s + 2) r2(s + 2)      ¯         s − 2 ¯¯
       r3 =            +          + r3 ¯
                                       ¯      =               =1
                  s       s+1            s=−2   s(s + 1) s=−2
                                                        ¯
so we have:
                                   s2 − 2        −1    1   1
                                               =    +    +
                               s(s + 1)(s + 2)    s   s+1 s+2
Rational functions and partial fraction expansion                                           5–20
method 3: another explicit and useful expression for rk is:
                                                           b(λk )
                                                    rk =
                                                           a0(λk )
to see this, note that
                    (s − λk )b(s)        b(s) + b0(s)(s − λk )   b(λk )
           rk = lim               = lim           0
                                                               = 0
               s→λk     a(s)       s→λ k         a (s)          a (λk )
where we used l’Hôpital’s rule in second line
example (previous page):
                                         s2 − 2          s2 − 2
                                                    =
                                     s(s + 1)(s + 2) s3 + 2s2 + 2s
hence,                                                  ¯
                                                     2
                                               s − 2 ¯¯
                                        r1 = 2                        = −1
                                            3s + 4s + 2 ¯       s=0
Rational functions and partial fraction expansion                            5–21
                                                      Example
let’s solve
                          v 000 − v = 0,            v(0) = 1,   v 0(0) = v 00(0) = 0
1. take Laplace transform:
                                               s3V (s) − s2 −V (s) = 0
                                               |    {z    }
                                                    L(v 000 )
2. solve for V to get
                                                              s2
                                                     V (s) = 3
                                                            s −1
3. the poles of V are the cuberoots of 1, i.e., ej2πk/3, k = 0, 1, 2
                   3
                                               ³                √   ´³                 √   ´
                 s − 1 = (s − 1) s + 1/2 + j 3/2                         s + 1/2 − j 3/2
Rational functions and partial fraction expansion                                              5–22
4. now convert V to partial fraction form
                                            r1    r2          r2
                             V (s) =           +     √ +           √
                                           s−1 s+ +j
                                                 1     3
                                                         s + 1
                                                               − j   3
                                                 2    2      2      2
     to find residues we’ll use
                                                                        √
                                   b(1)   1                  b(−1/2 − j 3/2)   1
                          r1 =      0
                                        =   ,           r2 =            √    =
                                   a (1) 3                   a0(−1/2 − j 3/2) 3
     so partial fraction form is
                                               1               1                  1
                                               3               3                  3
                             V (s) =                +              √    +             √
                                           s−1             1
                                                        s+ +j       3         1
                                                                            s+ −j      3
                                                           2       2          2       2
     (check this by just multiplying out . . . )
Rational functions and partial fraction expansion                                          5–23
5. take inverse Laplace transform to get v:
                                                                √                   √
                                                1 t 1 (− 1 −j    3      1    1       3
                             v(t) =               e + e 2       2 )t   + e(− 2 +j   2 )t
                                                3    3                  3
                                                            √
                                                1 t 2 −t     3
                                        =         e + e cos
                                                        2      t
                                                3    3      2
6. check that v 000 − v = 0, v(0) = 1, v 0(0) = v 00(0) = 0
Rational functions and partial fraction expansion                                          5–24
                                               Repeated poles
now suppose
                                                             b(s)
                                     F (s) =
                                                    (s − λ1)k1 · · · (s − λl)kl
• the poles λi are distinct (λi 6= λj for i 6= j) and have multiplicity ki
• degree of b less than degree of a
partial fraction expansion has the form
                                   r1,k1      r1,k1−1             r1,1
            F (s) =                       +             + ··· +
                                (s − λ1)k1 (s − λ1)k1−1         s − λ1
                                         r2,k2      r2,k2−1               r2,1
                                 +              +             + · · · +
                                      (s − λ2)k2 (s − λ2)k2−1           s − λ2
                                            rl,kl      rl,kl−1               rl,1
                                 + ··· +           +             + · · · +
                                         (s − λl)kl (s − λl)kl−1           s − λl
n residues, just as before; terms involve higher powers of 1/(s − λ)
Rational functions and partial fraction expansion                                   5–25
                    1
example: F (s) = 2        has expansion
                s (s + 1)
                                                      r1 r2     r3
                                            F (s) =      +   +
                                                      s2   s   s+1
inverse Laplace transform of partial fraction form is easy since
                                           µ              ¶
                                                   r               r
                                  L   −1
                                                              =          tk−1eλt
                                               (s − λ)k         (k − 1)!
same types of tricks work to find the ri,j ’s
• solve linear equations (method 1)
• can find the residues for nonrepeated poles as before
Rational functions and partial fraction expansion                                  5–26
example:
                                            1      r1 r2  r3
                                                 =   + +
                                        s2(s + 1) s2  s  s+1
we get (as before)
                                         r3 = (s + 1)F (s)|s=−1 = 1
now clear denominators to get
                                  r1(s + 1) + r2s(s + 1) + s2 = 1
                                   (1 + r2)s2 + (r1 + r2)s + 1 = 1
which yields r2 = −1, r1 = 1, so
                                                       1   1   1
                                             F (s) =     −   +
                                                       s2 s s + 1
Rational functions and partial fraction expansion                     5–27
extension of method 2: to get ri,ki ,
• multiply on both sides by (s − λi)ki
• evaluate at s = λi
gives                                                        ¯
                                                           ki ¯
                                           F (s)(s − λi)          s=λi
                                                                         = ri,ki
to get other r’s, we have extension
                                       j
                                                                 ¯
                                1 d         ¡                  ¢
                                                             ki ¯
                                                                 ¯
                                                F (s)(s − λi) ¯             = ri,ki−j
                                j! dsj                               s=λi
usually the ki’s are small (e.g., 1 or 2), so fortunately this doesn’t come up
too often
Rational functions and partial fraction expansion                                       5–28
example (ctd.):
                                                      r1 r2     r3
                                            F (s) =      +   +
                                                      s2   s   s+1
• multiply by s2:
                                      2        1                r3 s 2
                                    s F (s) =     = r1 + r2 s +
                                              s+1               s+1
• evaluate at s = 0 to get r1 = 1
• differentiate with respect to s:
                                                                    µ     2
                                                                               ¶
                                                 1             d        r3 s
                                          −            = r 2 +
                                              (s + 1)2         ds       s+1
• evaluate at s = 0 to get r2 = −1
(same as what we got above)
Rational functions and partial fraction expansion                                  5–29
                                Nonproper rational functions
                                       b(s)   b0 + b 1 s + · · · + b m s m
                               F (s) =      =                            n
                                                                           ,
                                       a(s)   a0 + a 1 s + · · · + a n s
is called proper if m ≤ n, strictly proper if m < n, nonproper if m > n
partial fraction expansion requires strictly proper F ; to find L−1(F ) for
other cases, divide a into b:
                                F (s) = b(s)/a(s) = c(s) + d(s)/a(s)
where
           c(s) = c0 + · · · + cm−nsm−n,               d = d 0 + · · · + d k sk ,   k<n
then
                       L−1(F ) = c0δ + · · · + cm−nδ (m−n) + L−1(d/a)
d/a is strictly proper, hence has partial fraction form
Rational functions and partial fraction expansion                                         5–30
example
                                        5s + 3
                                F (s) =
                                        s+1
is proper, but not strictly proper
                                              5(s + 1) − 5 + 3      2
                                F (s) =                        =5−     ,
                                                   s+1             s+1
so
                                            L−1(F ) = 5δ(t) − 2e−t
in general,
• F strictly proper ⇐⇒ f has no impulses at t = 0
• F proper, not strictly proper ⇐⇒ f has an impulse at t = 0
• F nonproper ⇐⇒ f has higher-order impulses at t = 0
• m − n determines order of impulse at t = 0
Rational functions and partial fraction expansion                          5–31
                                                    Example
                                                  s4 + s3 − 2s2 + 1
                                          F (s) =
                                                     s3 + 2s2 + s
1. write as a sum of a polynomial and a strictly proper rational function:
                                       s(s3 + 2s2 + s) − s(2s2 + s) + s3 − 2s2 + 1
                   F (s) =
                                                       s3 + 2s2 + s
                                   −s3 − 3s2 + 1
                               = s+ 3
                                    s + 2s2 + s
                                    −(s3 + 2s2 + s) + (2s2 + s) − 3s2 + 1
                               = s+
                                                s3 + 2s2 + s
                                     −s2 + s + 1
                               = s−1+ 3
                                     s + 2s2 + s
                                      −s2 + s + 1
                               = s−1+
                                       s(s + 1)2
Rational functions and partial fraction expansion                                    5–32
2. partial fraction expansion
                                   −s2 + s + 1 r1     r2     r3
                                              =   +      +
                                    s(s + 1)2   s   s + 1 (s + 1)2
     • determine r1:                                            ¯
                                                       2
                                                    −s + s + 1 ¯¯
                                               r1 =                       =1
                                                     (s + 1)2 ¯     s=0
     • determine r3:                                          ¯
                                                      2
                                                  −s + s + 1 ¯¯
                                             r3 =                         =1
                                                      s       ¯
                                                                  s=−1
     • determine r2:
                                      µ       2
                                                    ¶¯                    2
                                                                            ¯
                                 d        −s + s + 1 ¯¯             −s − 1 ¯¯
                       r2 =                                       =                    = −2
                                 ds           s       ¯
                                                           s=−1       s2 ¯      s=−1
         (alternatively, just plug in some value of s other than s = 0 or s = −1:
                              ¯
                  2
              −s + s + 1 ¯¯            1         r2    r3         r2   1
                              ¯    =     = r 1 +    +     =  1 +     +   =⇒ r2 = −2)
                s(s + 1)2 ¯            4         2     4          2    4
                                      s=1
Rational functions and partial fraction expansion                                             5–33
3. inverse Laplace transform
                                                    µ                          ¶
                                                            1   2      1
                   L−1(F (s)) = L−1                     s−1+ −     +
                                                            s s + 1 (s + 1)2
                                          = δ 0(t) − δ(t) + 1 − 2e−t + te−t
Rational functions and partial fraction expansion                                  5–34