Find the Var$(X)$ given that $$m_X(u)=\Big(\frac{p}{1-(1-p)e^u)}\Big)^r \ \ \ \ \ \ \ u<\text{ln}((1-p)^{-1})$$
I have found $\mathbb{E}(X)$ to be $$\mathbb{E}(X)=m'_X(u)$$ $$\mathbb{E}(X)=r\Bigg(\frac{p}{(1-(1-p)e^u)}\Bigg)^{r-1}\times\frac{p(e^u-pe^u)}{(1-(1-p)e^u)^2}$$ substituting $u=0$ $$\mathbb{E}(X)=r\Bigg(\frac{p}{p}\Bigg)^{r-1}\times\frac{p(1-p)}{p^2}=\frac{r(1-p)}{p}$$
My question is, how do I find $\mathbb{E}(X^2)$? Differentiating $\mathbb{E}(X)$ again seems like it's impossible.
Sounds like the issue is with calculating the second derivative, so here are some tips. When I have to do a tedious derivative, I like to fold up the notation a little to make things easier. So in this case, I would define
$$ f(u)\equiv 1-(1-p)e^u, $$
then the MGF is
$$ m_X(u)=\bigg(\frac{p}{f(u)}\bigg)^r. $$
Using this notation, we have that
$$ m'_X(u)=-\frac{rp^rf'(u)}{\big[f(u)\big]^{r+1}}. $$
This is the tedious part. Using the quotient rule, the second derivative comes out to
$$ m''_X(u)=\frac{rp^r\big[(r+1)[f'(u)]^2-f(u)f''(u)\big]}{\big[f(u)\big]^{r+2}} $$
You can then easily evaluate $f(0)$, $f'(0)$, etc. to get the desired result.