Question: I've been trying to integrate the following expression:
$$\int\_{0}^{\infty} (1- \exp(-a e^{-bx})) dx$$
I started to solve this integral by first using the substitution method. With $t = e^{-bx}$, then the integral is:
$$\frac{1}{b} \int\_{0}^{1} \frac{1}{t}(1-e^{-at})dt$$
The only thing that comes to my mind is solving this using integration by parts, but it ends up complicating the integration way too much. For example, let $u = \frac{1}{t}$ and $dv = 1 - e^{-at}$. Is there any easier way to solve this integral?

Answer: 
You are taking a derivative with respect to $x$. You seem to have use the product rule, but there are not two expressions containing $x$ multiplied here.

\begin{align\*}
\frac{\mathrm{d}}{\mathrm{d}x} g^{(n)}(x) 
 &= \frac{\mathrm{d}}{\mathrm{d}x} \left( (-1)^n \frac{n!}{x^{n+1}} \right) \\
 &= \frac{\mathrm{d}}{\mathrm{d}x} \left( (-1)^n n! x^{-(n+1)} \right) \\
 &= (-1)^n n! (-(n+1)) x^{-(n+1) -1} \\
 &= (-1)^{n+1} n! (n+1) x^{-(n+1) -1} \\
 &= (-1)^{n+1} (n+1)! x^{-(n+1) -1} \\
 &= (-1)^{n+1} \frac{(n+1)!}{x^{(n+1)+1}} \\
 &= (-1)^{n+1} \frac{(n+1)!}{x^{n+2}}
\end{align\*}
$$(g^{(n)})'=(-1)^{n}\*n!\*(x^{-(n+1)})'=(-1)^n\*n!\*(-(n+1)))(x^{-(n+2)}=(-1)^{(n+1)}\*(n+1)!\*x^{-(n+2)}$$
your derivative $$(g^{(n)})'$$ is wrong.