Integration by Parts — Question 4

PDF ↗

Question 4

Define In=∫xnexdx,n≥1.I_n=\int x^ne^x\,dx, \qquad n\geq 1. Use integration by parts to derive a recurrence relation connecting InI_n and In−1I_{n-1}. Then use the recurrence to evaluate I4I_4.

Original worksheet page 1: question and worked solution for 1-1-004
Show solutionHide solution

Question 4 – Solution

Start with In=∫xnexdx.I_n=\int x^ne^x\,dx. To reduce the power of xx, choose u=xn,dv=exdx,du=nxn−1dx,v=ex.u=x^n,\quad dv=e^x\,dx, \qquad du=nx^{n-1}\,dx,\quad v=e^x. Using ∫udv=uv−∫vdu\int u\,dv=uv-\int v\,du, we obtain In=xnex−∫ex(nxn−1)dx=xnex−n∫xn−1exdx.\begin{align*} I_n &=x^ne^x-\int e^x\left(nx^{n-1}\right)\,dx \\ &=x^ne^x-n\int x^{n-1}e^x\,dx. \end{align*} Since In−1=∫xn−1exdxI_{n-1}=\int x^{n-1}e^x\,dx, the recurrence relation is In=xnex−nIn−1.\boxed{I_n=x^ne^x-nI_{n-1}}. Here, as usual for indefinite integrals, the constant of integration is added after the recurrence has been applied. The base case is I0=∫exdx=ex.I_0=\int e^x\,dx=e^x.

Now apply the recurrence repeatedly: I1=xex−I0=xex−ex=ex(x−1),I2=x2ex−2I1=x2ex−2ex(x−1)=ex(x2−2x+2),I3=x3ex−3I2=x3ex−3ex(x2−2x+2)=ex(x3−3x2+6x−6),I4=x4ex−4I3=x4ex−4ex(x3−3x2+6x−6)=ex(x4−4x3+12x2−24x+24).\begin{align*} I_1 &=xe^x-I_0 =xe^x-e^x =e^x(x-1), \\[3pt] I_2 &=x^2e^x-2I_1 \\ &=x^2e^x-2e^x(x-1) =e^x(x^2-2x+2), \\[3pt] I_3 &=x^3e^x-3I_2 \\ &=x^3e^x-3e^x(x^2-2x+2) \\ &=e^x(x^3-3x^2+6x-6), \\[3pt] I_4 &=x^4e^x-4I_3 \\ &=x^4e^x-4e^x(x^3-3x^2+6x-6) \\ &=e^x(x^4-4x^3+12x^2-24x+24). \end{align*} Therefore, I4=∫x4exdx=ex(x4−4x3+12x2−24x+24)+C\boxed{\displaystyle I_4=\int x^4e^x\,dx =e^x(x^4-4x^3+12x^2-24x+24)+C}

Indeed, differentiating the result gives ddx[ex(x4−4x3+12x2−24x+24)]=ex(x4−4x3+12x2−24x+24)+ex(4x3−12x2+24x−24)=x4ex,\begin{align*} \frac{d}{dx}\left[e^x(x^4-4x^3+12x^2-24x+24)\right] &=e^x(x^4-4x^3+12x^2-24x+24)\\ &\quad+e^x(4x^3-12x^2+24x-24)\\ &=x^4e^x, \end{align*} which confirms the answer.

Original worksheet page 2: question and worked solution for 1-1-004

Original worksheet layout. Use Enlarge or open the PDF for a closer view.