Evaluate $\int_0^{\infty} x p^xe^{\Large-\frac{x}{a}}\ dx$ I need to evaluate the integral:

$$\int_0^{\infty}  x p^xe^{\Large-\frac{x}{a}}\ dx$$

for $0<p<1$. Unfortunately I do not know where to begin. I tried integration by parts but got nowhere so I would appreciate some help.
Thank you.
 A: Write $p^x$ as $e^{x\ln p}$, then
\begin{align}
\int_0^{\infty} e^{\Large-\frac{x}{a}} x p^x\ dx&=\int_0^{\infty} e^{\Large-\frac{x}{a}} x e^{\large x\ln p}\ dx\\
&=\int_0^\infty xe^{\Large-x\left(\frac{1}{a}-\ln p\right)}\ dx
\end{align}
Let $u=x\left(\frac{1}{a}-\ln p\right)$, then
\begin{align}
\int_0^\infty xe^{\Large-x\left(\frac{1}{a}-\ln p\right)}\ dx&=\frac{1}{\left(\frac{1}{a}-\ln p\right)^2}\int_0^\infty ue^{-u}\ du\\
&=\frac{a^2}{(1-a\ln p)^2}\Gamma(2)\\
&=\frac{a^2}{(1-a\ln p)^2}
\end{align}
where $\displaystyle\int_0^\infty ue^{-u}\ du$ can be evaluated by using integration by parts or using gamma function.
A: $$\int_0^{\infty} e^{-x/a} x p^x dx = \int_0^{\infty} e^{-x/a} x e^{x \log p} dx = \int_0^{\infty} x e^{x(\log p -1/a)} dx = \frac{1}{(\log p -1/a)^2} $$
This is using this bit of integration by parts and assuming $\log p < 1/a$
A: Your integral is equivalent to:
$$\int_{0}^{\infty}xe^{bx}\mathrm{d}x,$$
where $b=\dfrac{-1}{a}+\log p$.
A: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
\begin{align}&\color{#c00000}{\int_{0}^{\infty}x\,p^{x}\expo{-x/a}\,\dd x}
=p\,\partiald{}{p}\int_{0}^{\infty}p^{x}\expo{-x/a}\,\dd x
=p\,\partiald{}{p}\int_{0}^{\infty}\pars{p\expo{-1/a}}^{x}\,\dd x
\\[3mm]&=p\,\partiald{}{p}\bracks{{1 \over \ln\pars{p\expo{-1/a}}}\int_{0}^{\infty}
\partiald{\pars{p\expo{-1/a}}^{x}}{x}\,\dd x}
=p\,\partiald{}{p}\bracks{-1 \over \ln\pars{p\expo{-1/a}}}
\\[3mm]&={1 \over \ln^{2}\pars{p\expo{-1/a}}}
\end{align}

$$\color{#66f}{\large\int_{0}^{\infty}x\,p^{x}\expo{-x/a}\,\dd x
={1 \over \bracks{\ln\pars{p} - 1/a}^{2}}}\,,\qquad 0 <\verts{p\expo{-1/a}} < 1
$$

