Wednesday, January 5, 2022

12 Days of Christmas Integrals: ∫ x^n ∙ e^x dx; n is a positive integer

12 Days of Christmas Integrals:  ∫ x^n ∙ e^x dx;  n is a positive integer 


On the Twelfth day of Christmas Integrals, the integral featured today is...


∫ x^n ∙ e^x dx;  n is a positive integer 


n = 1, 2, 3, 4, ...


Each term is found by repeating the Integration by Parts method.  Today, we will find a (somewhat) closed formula that applies to any positive integer n.  


∫ x^n ∙ e^x dx


u = x^n

du = n ∙ x^(n-1) dx

dv = e^x dx

v = e^x


= x^n ∙ e^x - ∫ n ∙ x^(n-1) ∙ e^x dx



u = n ∙ x^(n-1)

du = n ∙ (n-1) ∙ x^(n-2) dx

dv = e^x dx

v = e^x


= x^n ∙ e^x - n ∙ x^(n-1) ∙ e^x + ∫ n ∙ (n-1) ∙ x^(n-2) ∙ e^x dx


u = n ∙ x^(n-1)

du = n ∙ (n-1) ∙ x^(n-2) dx

dv = e^x dx

v = e^x


and so on until...


u = n ∙ (n - 1) ∙ ... ∙ 2 ∙ x

du = n! dx

dv = e^x dx

v = e^x


with the closed form:


= e^x ∙ [x^n - n ∙ x^(n-1) + n ∙ (n-1) ∙ x^(n-2) - n ∙ (n-1) ∙ (n-2) ∙ x^(n-3) + ...  

   + (-1)^(n mod 2) ∙ n!]


Examples: 


n = 2

∫ x^2 ∙ e^x dx = e^x ∙ (x^2 - 2 ∙ x + 2)


n = 3

∫ x^3 ∙ e^x dx = e^x ∙ (x^3 - 3 ∙ x^2 + 6 ∙ x - 6)


n = 4

∫ x^4 ∙ e^x dx = e^x ∙ (x^4 - 4 ∙ x^3 + 12 ∙ x^2 - 24 ∙ x + 24)


What do you think of the integral series?  Is this worth a sequel? 


Eddie 



All original content copyright, © 2011-2022.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Casio fx-CG50 and Swiss Micros DM32: HP 16C’s Bit Summation

  Casio fx-CG50 and Swiss Micros DM32: HP 16C’s Bit Summation The HP 16C’s #B Function The #B function is the HP 16C’s number of...