Class 12 Maths, Worked in Full Past papersGet updates
Chapter 7 · Integrals

Miscellaneous · Q33: ∫01x ex dx=1\int_0^1 x\,e^x\,dx=1

Miscellaneous ExerciseDefinite integrals by parts · Miscellaneous Exercise
The question

Prove that

∫01x ex dx=1\int_0^1 x\,e^x\,dx = 1
Exam answer

Let I=∫01x ex dxI = \displaystyle\int_0^1 x\,e^x\,dx⁠.

Taking xx as the first function and exe^x as the second, by parts:

I=[x ex]01−∫011⋅ex dx=[x ex−ex]01=[(x−1)ex]01=(1−1)e1−(0−1)e0=0−(−1)\begin{aligned} I &= \Big[x\,e^x\Big]_0^1 - \int_0^1 1\cdot e^x\,dx \\ &= \Big[x\,e^x - e^x\Big]_0^1 = \Big[(x - 1)e^x\Big]_0^1 \\ &= (1 - 1)e^1 - (0 - 1)e^0 \\ &= 0 - (-1) \end{aligned}

∴ I=1=RHS\therefore\ I = 1 = \text{RHS}⁠. Hence proved.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

The integrand is a product of a polynomial xx and an exponential exe^x⁠. Integration by parts with xx as the first function removes the xx (its derivative is 1) while exe^x integrates to itself. What is left, ∫ex dx\int e^x\,dx⁠, is immediate. The antiderivative (x−1)ex(x - 1)e^x happens to vanish at the upper limit, which is why the answer is so clean.

Given, to show, and the plan
Given
I=∫01x ex dxI = \displaystyle\int_0^1 x\,e^x\,dx⁠.
To show
I=1I = 1⁠.
Plan
(1) Continuity. (2) Choose the first and second functions. (3) Integrate by parts. (4) Check by differentiating. (5) Evaluate from 0 to 1.

Basics you need

1Integration by parts (Section 7.6)

∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du⁠: "first function times integral of the second, minus the integral of (derivative of the first times integral of the second)". Lesson: integration by parts

2The exponential

ddxex=ex\frac{d}{dx}e^x = e^x and ∫ex dx=ex+C\int e^x\,dx = e^x + C (standard formula (xi), Section 7.2); e0=1e^0 = 1⁠. Basics: integration undoes differentiation

3Theorem 2, Section 7.8.3

∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a) for continuous ff with antiderivative FF⁠. Lesson: definite integrals

Solution

  1. The integrand is continuous on [0,1][0, 1]

    xx and exe^x are continuous on all of R\R⁠, so their product is continuous on [0,1][0, 1]⁠, and Theorem 2 applies.

    Every definite integral starts with this check (Remark (iv) after Theorem 2). Here it is immediate.
  2. Choose the first function: u=xu = x

    u=x,du=dx,dv=ex dx,v=ex.\begin{aligned} u &= x, & du &= dx, \\ dv &= e^x\,dx, & v &= e^x . \end{aligned}
    Remark (iii) of Section 7.6: when one factor is a polynomial and the other is not inverse trigonometric or logarithmic, take the polynomial as the first function. Differentiating xx gives 1, so the new integral has no xx left in it. The other choice, u=exu = e^x⁠, dv=x dxdv = x\,dx⁠, would produce ∫x22ex dx\int\frac{x^2}{2}e^x\,dx⁠, which is worse. (The book makes the same choice in Example 19.)
  3. Integrate by parts

    ∫x ex dx=x ex−∫ex dx=x ex−ex+C=(x−1)ex+C.\begin{aligned} \int x\,e^x\,dx &= x\,e^x - \int e^x\,dx \\ &= x\,e^x - e^x + C \\ &= (x - 1)e^x + C . \end{aligned}

    Call F(x)=(x−1)exF(x) = (x - 1)e^x⁠. It is valid for every real xx⁠.

    This is uv−∫v duuv - \int v\,du with uv=xexuv = xe^x and ∫v du=∫ex dx=ex\int v\,du = \int e^x\,dx = e^x⁠. No constant is needed when finding vv (Remark (ii), Section 7.6).
    Section 7.6, formula (1); standard formula (xi), Section 7.2. Lesson: integration by parts
  4. Check: differentiate FF back

    F′(x)=1⋅ex+(x−1)ex=x ex ✓F'(x) = 1\cdot e^x + (x - 1)e^x = x\,e^x \ ✓
    The product rule gives two terms; the exe^x and −ex-e^x cancel, leaving the integrand.
    Product rule (Chapter 5); ddxex=ex\frac{d}{dx}e^x = e^x⁠. Basics: integration undoes differentiation
  5. Evaluate between 0 and 1

    F(1)=(1−1)e1=0F(1) = (1 - 1)e^1 = 0⁠, and F(0)=(0−1)e0=−1F(0) = (0 - 1)e^0 = -1⁠.

    I=F(1)−F(0)=0−(−1)=1.I = F(1) - F(0) = 0 - (-1) = 1 .

    This is the required result.

    Theorem 2. The upper value is 0 because of the factor x−1x - 1⁠; the lower value is −1-1 because e0=1e^0 = 1⁠. Size check: xexxe^x rises from 0 to e≈2.718e \approx 2.718 on [0,1][0, 1] and bends upwards, so the area under it is well below the triangle-like estimate 12⋅2.718≈1.36\frac12\cdot 2.718 \approx 1.36⁠. The value 1 fits.
Result

∫01x ex dx=[(x−1)ex]01=0−(−1)=1,\begin{aligned} \int_0^1 x\,e^x\,dx &= \Big[(x - 1)e^x\Big]_0^1 \\ &= 0 - (-1) = 1, \end{aligned} as was to be proved.

Check it with numbers

Numerical integration (adaptive quadrature) of xexxe^x over [0,1][0, 1] gives 1.0000000000 ✓.

Derivative spot check at x=0.5x = 0.5⁠: F(0.501)≈−0.82353504F(0.501) \approx -0.82353504 and F(0.499)≈−0.82518376F(0.499) \approx -0.82518376⁠, so the slope is about 0.001648720.002=0.82436\frac{0.00164872}{0.002} = 0.82436 (that is, F(0.501)−F(0.499)F(0.501) - F(0.499) over 0.002), and 0.5 e0.5≈0.82436060.5\,e^{0.5} \approx 0.8243606 ✓.

Common mistakes
  1. Choosing u=exu = e^x: the power of xx goes up instead of down.
  2. Sign of the second term: it is xex−∫ex dx=xex−exxe^x - \int e^x\,dx = xe^x - e^x⁠, not xex+exxe^x + e^x⁠.
  3. Taking F(0)=0F(0) = 0 because "everything has an xx in it". F(0)=(0−1)e0=−1F(0) = (0 - 1)e^0 = -1⁠.
What to take away
  1. ∫x ex dx=(x−1)ex+C\int x\,e^x\,dx = (x - 1)e^x + C⁠. More generally, by parts with the polynomial first, ∫p(x)ex dx\int p(x)e^x\,dx is (polynomial)⋅ex\cdot e^x⁠.
  2. This is also an example of ∫ex(f(x)+f′(x))dx=exf(x)+C\int e^x\big(f(x) + f'(x)\big)dx = e^x f(x) + C (Section 7.6.1) with f(x)=x−1f(x) = x - 1⁠: f+f′=x−1+1=xf + f' = x - 1 + 1 = x⁠.

Every fact used, and where it comes from

FactUsed inSource
A definite integral needs ff continuous on [a,b][a, b]Step 1Theorem 2 and Remark (iv), Section 7.8.3
Integration by parts; choice of first functionSteps 2, 3Section 7.6, formula (1), Remarks (ii), (iii); Example 19
∫ex dx=ex+C\int e^x\,dx = e^x + CStep 3Standard formula (xi), Section 7.2
Product ruleStep 4Chapter 5, Section 5.3
F(b)−F(a)F(b) - F(a)Step 5Theorem 2, Section 7.8.3
∫ex(f+f′) dx=exf+C\int e^x(f + f')\,dx = e^x f + CTake-awaySection 7.6.1
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →