Calculus · real student question

Evaluate the definite integral of x^2 * e^(-x) from x = 0 to x = 1.

Question

Evaluate

01x2exdx\int_0^1 x^2 e^{-x}\,dx

Step-by-step solution

  1. Choose parts so the polynomial degree drops. The integrand is a polynomial times an exponential, the classic by-parts case. Take u=x2u = x^2 (which differentiates toward zero) and dv=exdxdv = e^{-x}dx (which integrates without growing), so du=2xdxdu = 2x\,dx and v=exv = -e^{-x}.

  2. Apply integration by parts once.

    x2exdx=x2ex+2xexdx\int x^2 e^{-x}dx = -x^2 e^{-x} + \int 2x e^{-x}dx

    The remaining integral has degree 11 instead of 22 — one step closer to something elementary.

  3. Apply it a second time. With u=2xu = 2x, dv=exdxdv = e^{-x}dx:

    2xexdx=2xex+2exdx=2xex2ex\int 2x e^{-x}dx = -2x e^{-x} + \int 2e^{-x}dx = -2x e^{-x} - 2e^{-x}

    Combining, the antiderivative is

    x2exdx=(x2+2x+2)ex+C\int x^2 e^{-x}dx = -\left(x^2 + 2x + 2\right)e^{-x} + C

  4. Evaluate at the limits. At x=1x = 1: (1+2+2)e1=5e1-(1 + 2 + 2)e^{-1} = -5e^{-1}. At x=0x = 0: (0+0+2)e0=2-(0 + 0 + 2)e^{0} = -2. Subtracting,

    01x2exdx=5e(2)=25e\int_0^1 x^2 e^{-x}dx = -\frac{5}{e} - (-2) = 2 - \frac{5}{e}

  5. Confirm the value is plausible. With e2.718282e \approx 2.718282, 5e1.839397\tfrac{5}{e} \approx 1.839397, so the integral is 0.160603\approx 0.160603. A composite Simpson approximation over [0,1][0,1] gives 0.16060280.1606028, agreeing to seven decimals. The value is comfortably below the crude bound 01x2dx=13\int_0^1 x^2 dx = \tfrac13, as it must be since ex<1e^{-x} < 1 on the interval.

Answer

01x2exdx=25e0.160603\int_0^1 x^2 e^{-x}\,dx = 2 - \frac{5}{e} \approx 0.160603

Need to solve a different problem like this? Open the solver →