Integrate $e^{-ax}$ and $xe^{-ax}$? I'm making exercises about integration but I don't really get it. How do you solve these two integrals from 0 to +infinity?


*

*$\int Ae^{-ax}\,dx$

*$\int Axe^{-ax}\,dx$


$A$ is a parameter. 
 A: Hints
For the first one, use a substitution.
For the second one, integrate by parts.
A: We assume $a>0$:
$$\int_0^\infty e^{-ax}dx=-\frac{1}{a}e^{-ax}\bigg|_0^\infty=\frac{1}{a}$$
$$\int_0^\infty xe^{-ax}dx=\int_0^\infty\frac{t}{a}e^{-t}\frac{dt}{a}=\frac{1}{a^2}\Gamma(2)=\frac{1}{a^2}$$
A: $A$ can be taken outside of the integral and hence just multiplies the final answer.  The second integral can be expressed as the first using integration by parts.  For the first, note  that the derivative of $-ae^{-ax}$ is $e^{-ax}$.
Edit: The derivative of $e^{-ax}$ is $-ae^{-ax}$.
A: A trick for the second one is to consider it a derivative of the first function with respect to a. Is not really formal, but really useful. It goes like this:
$$\int_0^\infty Ax\exp(-ax)=-A\int_0^\infty \frac{d}{da}\exp(-ax)dx=-A\frac{d}{da}\int_0^\infty\exp(-ax)dx$$
The integral of the first one is easy, it's just $-\frac{1}{a}\exp(-ax)$, as said in the posts. The limit of a negative exponential to $\infty$ is just $0$ and to $0$ is $1$. So we get:
$$-A\frac{d}{da}\left(0-\frac{1}{a}\right)=-\frac{A}{a^2}$$
With this method you can integrate $$\int_0^\infty Ax^ n\exp(-ax)$$ for every $n \in \mathbb{N}$
