Evaluate the $\int_{0}^\infty {xe^{-x}dx}$. I am learning integrals. I have an integral and I solved it with two ways and got different results. Is it possible to help me and if you can, give me other easy way to understand that is it definite or indefinite only.
our integral is:

$$\int_{0}^\infty {xe^{-x}dx}$$

First way (using integration by parts):
$\int_{0}^\infty {xe^{-x}dx} = \lim_{c\to \infty}{\int_{0}^c {xe^{-x}dx}} = \lim_{c\to \infty}{(-xe^{-x} + \int {e^{-x}dx})}$(form c and 0) = $\lim_{c\to \infty}{(-e^{-c}(c + 1) + 1)} = 1$
Second way:
we use this fact that is $0 \le f(x) \le g(x)$ then if integral of g(x) in an interval go to a number (definite) then integral of f(x) in that interval go to another number (definite) too.
We know this fact too: if $\int_1^\infty {\frac{1}{x^p}}$ is definite if p > 1 and is indefinite if p <= 1.
Thanks guy for answer.
I understand that my second way is not true.
Is any way to understand our integral is a number (definite) or not a number (indefinite) without solving integral (with limit)? (by using my last facts)
Thanks and I'm sorry for bad English.
 A: Let $t>0$ and let
$$I(t)=\int_0^txe^{-x}dx$$
Now, by integration by parts we have:
$$\begin{align*}
I(t)&=\int_0^txe^{-x}dx=\int_0^tx(-e^{-x})'dx=[-xe^{-x}]_0^t-\int_0^t-e^{-x}dx=\\
&=-te^{-t}+\int_0^te^{-x}dx=-te^{-t}+[-e^{-x}]_0^t=\\
&=-te^{-t}+(-e^{-t}+1)=\\
&=1-(1+t)e^{-t}
\end{align*}$$
Now, we also have:
$$\int_0^\infty xe^{-x}dx=\lim_{t\to+\infty}I(t)$$
It is trivial, using de l' Hospital's rule to show that:
$$\lim_{t\to+\infty}I(t)=1$$
So:
$$\int_0^\infty xe^{-x}dx=1$$
As far as your second thought is concerned, it is not true that $x\leq xe^{-x}$.
Note that for every $x>0$ we have:
$$x>0\Leftrightarrow x^x>e^0=1\Leftrightarrow e^{-x}<1\Leftrightarrow xe^{-x}<x$$
Hope this helped! :)
Edit: (After the question's update). One can use the criterion stating that if $f(x)\geq g(x)$ then:
$$\int_a^bf(x)dx\geq\int_a^bg(x)dx$$
and, letting $b\to+\infty$ get:
$$\int_a^\infty f(x)dx\geq\int_a^\infty g(x)dx$$
Moreover, as far as integrals of the form $\int_0^\infty f(x)dx$ are concerned, if, for instance, $f$ is not bounded and eventually positive then $\int_0^\infty f(x)dx=+\infty$ (this is easy to prove and intuitively obvious). So, what you had writen before was accurate. The problem was that the inequality used was not true.
A: The given integral = $\Gamma(n) = \int_0^{\infty} e^{-x}x^{n-1} dx$.
Comparing this with above integral(given problem), we get $n=2$. So, the  value of integral given = $\Gamma(2) = 1! = 1$. ($\Gamma(x)=(x-1)!$)
A: 
Is any way to understand our integral is a number (definite) or not a number (indefinite) without solving integral (with limit)? (by using my last facts)

You could make your second way work by noticing that the exponential function $e^x$ grows faster than any polynomials. Thus for large enough $x$, say $x>M$, one has $e^x\geqslant x^5$, which implies that
$$
xe^{-x}\leqslant x^{-4},\quad x>M
$$ 
Now, one can tell the convergence of $\int_0^\infty xe^{-x}\ dx$ by looking at
$$
\int_M^\infty xe^{-x}\ dx\leqslant \int_M^\infty x^{-4}\ dx<\infty.
$$
(Note that $x\mapsto xe^{-x}$ is continuous on $[0,M]$ so that one has no problem regarding integrability on $[0,M]$.)
A: Here is another way, 
Let  $0\le t\le 2$
$$\int_{0}^\infty {xe^{-x}dx} = -\int_{0}^\infty {\frac{d}{dt}e^{-tx}dx}\bigg|_{t= 1}=-\frac{d}{dt}\int_{0}^\infty {e^{-tx}dx}\bigg|_{t= 1} =-\frac{d}{dt} \frac{1}{t}\bigg|_{t= 1} =1$$
A: $$\int_{0}^{\infty} x e^{-x} dx=[-xe^{-x}]_{0}^{\infty}+\int_{0}^{\infty} e^{-x} dx=\lim_{x \to \infty}(-xe^{-x})+1=1$$
