Answer to Exercise 11.4-5


© 2001 by Karl Hahn
KCT logo

By now you should have the method down, so I won't take you through the step-by-step of integration by parts. You were supposed to do just one round of integration by parts on

   

 xn eax dx

and then use induction to infer what would happen after n rounds.

The easiest way to choose the parts is


   u  =  xn

and
dv
    =  eax
dx
Now you have to find v by integrating dv/dx. From the table and from equation 11.2-9, you have


   v  =

  

 eax dx  =

  1
    eax + C
  a
Now put u and v into equation 11.4-6a:

   1
     xn eax + C  -
   a
  1
   
  a
 

 eax

 du
    dx  =
 dx
  

 xn eax dx

To find du/dx just take the derivative of  u = xn

   du
       =  n xn-1
   dx
So shoveling that into what we already have and rearranging just a bit:

   1
     xn eax + C  -
   a
  n
   
  a
 

 xn-1 eax dx  =

  

 xn eax dx

eq. after the 1st round
which brings to an end the easy part of this problem.

So what is this equation telling you? First it tells you that you can find the integral of  xn eax  if you know the integral of  xn-1 eax.  Clearly you can find that integral if you know the integral of  xn-2 eax,  and so on down to knowing the integral of  xn-n eax.  But that last one is the same as  x0 eax = eax,  whose integral we already know. So that last one will form the first rung of our induction ladder.

It is handy to label each round of integration by parts that it takes to do this integral with an integer, k.

Can you see that immediately after the kth round of integration by parts, what you will have will be a the sum of all the uv terms you accumulated at each round, minus some constant multiplier times whatever the remaining integral is. Since at each round we always choose  v = eax,  and since the power of x inside the integral is reduced by one with each round, what you get after k rounds looks something like

  (the sum of some stuff) × eax

  +  Ak



 xn-k eax dx

where Ak (which may be negative) is the product of all the factors kicked out by each of the rounds from the first to the kth. Can you see from the
equation we got on the first round that each round will kick out a factor of

    n-(k-1)
  −        
       a
And can you see how that gives you a recurrence relationship between your Ak's, whenever  k > 1


   Ak  =  -

 n-(k-1)
        
    a

 Ak-1

and when  k = 1,  then  A1 = n/a.  (Or you could make the recurrence relationship hold for  k = 1  as well if you arbitrarily let  A0 = 1.  As you'll see later, this turns out to be a better way of looking at it)

Now take the next step. What are all the factors of Ak? Think about what you're multiplying by each time you do a round? Doesn't that mean that


   Ak  =  −

 n
    ×  −
 a
 n-1
      ×  −
  a
 n-2
      ×  ...  ×  −
  s
 n-(k-1)
        
    a

If you can see that, then congratulations -- you are thinking inductively.

When you multiply all k of the denominators together, it's pretty easy to see that you get ak. For the resulting sign, it will be positive if k is even, negative if k is odd. But that's the same as multiplying by (-1)k.

Coming up with an expression for the product of all those numerators is a little trickier. But do you remember about factorials? Recall that n! (n factorial) is the product of all the integers from 1 to n. And (n-k)! is the product of all the integers from 1 to (n-k). Now take a piece of paper and work out what happens when you divide n! by (n-k)!. When you take all the cancellations, aren't you left with exactly the product of the numerators? And that means that


   Ak  =

    n!      1
         ×    ×
  (n-k)!   ak

 (-1)k

But what about the part we called "(the sum of some stuff) × eax "? After the first round the equation tells you that "(the sum of some stuff) × eax " is equal to

   1
    
   a

 xn eax  =

  A0
    
   a

 xn eax

But after the first round, the remaining integral is multiplied by A1. Not only that, but its x is raised only to the n-1 power. So when we do the second round, the new "uv" summand that arises will be

   A1
     
    a

 xn-1 eax

so you will have

   1
    
   a
 

A0 xn  +  A1 xn-1



 eax + C  +  A2 +

 

 xn-2 eax dx

and after k rounds you will have

   1
    
   a
 

A0 xn  +  A1 xn-1  +  A2 xn-2  +  ...  +  Ak-1 xn-(k-1)



 eax + C  +


                                                     Ak

 

 xn-k eax dx

and after n rounds

   1
    
   a
 

A0 xn  +  A1 xn-1  +  A2 xn-2  +  ...  +  An-1 x1



 eax + C  +


                                                     An

 

 x0 eax dx

But  x0 = 1.  And that makes the last remaining integral easy. You end up with

   1
    
   a
 

A0 xn  +  A1 xn-1  +  A2 xn-2  +  ...  +  An



 eax + C

or in summation notation

   1
    
   a
      n
 eax   Ak xn-k
     k=0

But recall that


   Ak  =

    n!
         ×
  (n-k)!
  1
    ×
 ak

 (-1)k

So making that substitution and multiplying through by the 1/a that's to the left of the sum:


   eax

  n
  
 k=0
    n! (-1)k
              xn-k  + C  =
  (n-k)! ak+1
  

 xn eax dx


"How on earth," I can hear you thinking, "am I ever going to take the derivative of that thing?" Well -- you're going to use the product rule. And if it helps, you can write it out without the summation notation:


  eax


 n!
     xn -
n! a
    n!
           xn-1 +
 (n-1)! a2
     n!
           xn-2 - ... ±
 (n-2)! a3
    n!
        
 0! an+1


 + C =

                                                               

 xn eax dx

When you apply the product rule, you will have the derivative of  eax  times that stuff inside the parentheses, and added to that you will have  eax  times the derivative of the stuff in the parentheses. Write both of those and then see how each term in one cancels with a term in the other (except for one key term) to leave you, in the end, with only  xn eax


Return to Main Text


Optional Material: The Gamma Function

I'd like you to focus on what happens to the integral we expanded above in the case when  a = -1.  Look at the expression we got for the general case, and put in -1 for a. Can you see how this gives you


  -e-x


n!
   xn +
n!
   n!
        xn-1 +
 (n-1)!
   n!
        xn-2 + ...
 (n-2)!
   n!
 +   
   0!


 + C =

  

 xn e-x dx

Now lets take the definite integral of this from  x = 0  to  x = r


  


-e-x


n!
   xn +
n!
   n!
        xn-1 +
 (n-1)!
   n!
        xn-2 + ...
 (n-2)!
   n!
 +   
   0!


x
r

=0

 =

  r
  
  0

 xn e-x dx

You recall that this means putting in r for x and zero for x to form two substituted expressions, and then taking the first expression minus the second (noting that when  x = 0,  then raising it to any positive power also gives you zero).

  

-e-r


n!
   rn +
n!
   n!
        rn-1 +
 (n-1)!
   n!
        rn-2 + ...
 (n-2)!
   n!
 +   
   0!



 +

 

e0

 n!
   
 0!


  =

                                                          r
                                                          
                                                          0

 xn e-x dx

Now take the limit as r goes to infinity. Back in the section on L'Hopital's Rule you solved a problem that showed that

    lim  xn e-x  =  0
   x → ∞
no matter how large n is. So when we take the limit here as r goes to infinity, everything in the first set of brackets will go to zero. That leaves only:

   

e0

 n!
   
 0!


  =


  0
 xn e-x dx

(note that when we put the as one of the limits of the integral, it means that you take the limit as that limit of integration goes to infinity)

But  0! = 1,  and  e0 = 1.  So the result here is


   n!  =


  0
 xn e-x dx

We have already seen that when n is a nonnegative integer, we have a way of solving the integral on the right. And we have a definition of n! whenever n is a nonnegative integer. But what about when n is not an integer. Our definition of multiplying the integers from 1 to n can't apply, so we have can't have that as a definition of n! for non-integer n. But the definite integral on the right of the above equation does exist even when n is not an integer (even though you can't evaluate it using integration by parts because you miss the first rung of the induction ladder). But this does give us a way to define n! for any positive real number. This is the basis for the so-called Gamma function. For historical reasons, it is defined just a little differently from what we have above:


   Γ(s)  =


  0
 xs-1 e-x dx
With this definition, it is clear that whenever s is a positive integer, then

   Γ(s)  =  (s-1)!
When s is not an integer, it is not obvious how you would compute a value for Γ(s). But there are some tricks you can find in more advanced mathematical analysis to approximate it to very fine precision, and tables of values of the Gamma function are available in most math handbooks. Although this will be the last you'll be hearing about the Gamma function for a while, it does play an important role in mathematical analysis.

One last thing -- can you use the definition given here for Gamma together with integration by parts to prove that for  s > 1,  it is always the case that

   Γ(s)  =  (s-1) Γ(s-1)
More About the Gamma Function

To the right you can see a graph of the Gamma function. Gamma is continuous and has a derivative everywhere except when x is a non-positive integer. So besides being defined for all positive values of x, it is also defined for negative x as well, provided that x is not a negative integer. Values of Gamma for negative x can be derived from the values of Gamma for positive x together with the formula

              Γ(x)
   Γ(x-1)  =      
               x-1
See if you can see why this formula fails to yield any values for negative integers or for zero.

Observe where Gamma crosses  x = 1,   x = 2,   x = 3,  and  x = 4.  Can you see how this is consistent with  Γ(x) = (x-1)!  whenever x is a positive integer?

Notice that in the positive x region, Gamma intersects the line  y = 1  at both  x = 1  and at  x = 2.  So in between it must have a minimum. That occurs at approximately  x = 1.46163214497...,  where Gamma equals about 0.8856031944....

Another point of interest is at  x = 1/2.  Here you have

   Γ(0.5)  =  √π  =  1.77245385090552...
But proving that is beyond the scope of this tutorial. Still, from this and the recursion formula, you can find the value of Gamma for all other half-integer x's as well.

Graph of Gamma Function


Return to Main Text

You can email me by clicking this button:

  Use your own emailer     Use form