I came across this example:

$$\int_0^{+\infty}xe^{-x} \ dx$$

I calculated it like this:

$$\int_0^{+\infty} xe^{-x} \ dx = \left[ -xe^{-x} \right]_0^{+ \infty} - \int_0^{+ \infty} e^{-x}dx $$

$$ 0 - \left[ e^{-x} \right]^{+\infty}_0 = 0-0 = 0$$

$$ lim_{x \rightarrow \infty} \frac{x}{e^x}\biggr\vert^\beta_0 = \lim_{\beta \rightarrow \infty} \frac{\beta}{e^\beta} \quad L'H \\ lim_{\beta \rightarrow \infty} \frac{1}{e^\beta} = 0 \\ $$

But my sample solution says:

$$\int^{\infty}_0 xe^{-x} dx = \left[ - \frac{x}{e^x}-e^{-x}\right]\biggr\vert^\infty_0 = 0-0+1 = 1$$

I dont understand where the $1$ comes from, my understanding is that the limit of that function should go to zero but instead a $1$ appears.

Can someone clear this up ?

  • 4
    $\begingroup$ Note that $e^{0}=1$ $\endgroup$ – projectilemotion Aug 22 '17 at 15:04
  • 1
    $\begingroup$ ...in $0-[e^{-x}]_0^{+\infty}$ $\endgroup$ – Blex Aug 22 '17 at 15:07
  • 1
    $\begingroup$ I also suspect you've made a typo, but this is not a problem because you seem to have fixed it later: $$\int_0^{+\infty} xe^{-x} \ dx = \left[ -xe^{-x} \right]_0^{+ \infty} \color{red}{+} \int_0^{+ \infty} e^{-x}dx$$ $\endgroup$ – projectilemotion Aug 22 '17 at 15:15
  • $\begingroup$ @projectilemotion oops, thanks for the catch, totally missed that. post an answer and I'll accept $\endgroup$ – zython Aug 22 '17 at 15:16

First of all, you seem to have made a typo, but this is not a problem because you seem to have fixed it after integrating $e^{-x}$: $$\begin{align}\int_0^{+\infty} xe^{-x} \ dx &= \left[ -xe^{-x} \right]_0^{+ \infty} \color{red}{+} \int_0^{+ \infty} e^{-x}dx \\&=\left[ -xe^{-x} \right]_0^{+ \infty}-\left[e^{-x}\right]_0^{+\infty}\\&=0-\left[e^{-x}\right]_0^{+\infty} \tag{1}\end{align}$$

Apart from that, the only mistake you made is when evaluating the right-hand side of $(1)$. Note that $e^0\neq 0$, but $e^0=1$, hence giving: $$\int_0^{+\infty} xe^{-x}~dx=0-(0-1)=1$$

  • $\begingroup$ wait I'm a litle bit confused, I just looked up the definition of integration by parts and it says to subtract the two parts, but you add them together, which confuses me. can you explain ? $\endgroup$ – zython Aug 22 '17 at 15:39
  • 1
    $\begingroup$ Integration by parts states that: $$\int u~dv=uv-\int v~du$$ In your case, $u=x$ and $dv=e^{-x}~dx$. Note that as a result, $v=\color{red}{-}e^{-x}$, since: $$\int e^{-x}~dx=-e^{-x}+C$$ $\endgroup$ – projectilemotion Aug 22 '17 at 15:41
  • $\begingroup$ ah yes makes sense $\endgroup$ – zython Aug 22 '17 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.