Expected value proof? Let $X∼\text{Bin}(n, p)$.  Show that
$$\ E\left[ \frac{1}{1+X}\right]= \frac{1-(1-p)^{n+1}}{p(n+1)}\ .$$
Attempt at solution: I know that
$$\ E[g(x)]= \sum_{x}g(x) P_X(x)$$
so I tried
$$\sum_{x}g(x) P_X(x) = \frac{p^x(1-p)^{n-x}}{1+x}$$
but then I'm pretty stuck from here. I've tried to manipulate this to get it into other forms but I can't seem to get the one they want.
 A: Here's how you need to begin.
$\begin{align}\mathsf P(X=x) ~&=~ \dfrac{n!~p^x\,(1-p)^{n-x}}{x!\,(n-x)!}\mathbf 1_{x\in\{0,..,n\}} & \because~&X\sim \mathcal{Bin}(n, p)\\[2ex]\therefore\quad \mathsf E\left(\dfrac 1{X+1}\right) ~&=~ \sum_{x=0}^n \dfrac{1}{(x+1)}\dfrac{n!~p^x\,(1-p)^{n-x}}{x!\,(n-x)!} && \text{by definition} \\[1ex] &=~ \sum_{x=0}^n \dfrac{n!~p^x\,(1-p)^{n-x}}{(x+1)!\,(n-x)!} &\because~& (x+1)!=(x+1)\,x! \\[1ex] &=~ \dfrac{1}{p\,(n+1)}\sum_{x=0}^n \dfrac{(n+1)!~p^{x+1}\,(1-p)^{n+1-x-1}}{(x+1)!\,(n+1-x-1)!} && \text{set up for change of variable} \\[1ex] &\ddots~ \end{align}$

 

Thank you! how did you know to remove the 1/(p(n+1)) out in front though?

$$\begin{align} &~~~\sum_{x=0}^n \dfrac{n!~p^x\,(1-p)^{n-x}}{(\color{blue}{x+1})!\,(n-x)!}
 &&\text{this hints that we should express the term in factors of }x+1
\\[1ex] &=~ \sum_{x+1=1}^{\color{blue}{n+1}} \dfrac{n!~p^{x+1}p^{-1}\,(1-p)^{\color{blue}{n+1}-(x+1)}}{({x+1})!\,(\color{blue}{n+1}-(x+1))!} &&\text{this suggest we do likewise for the remaining factor}
\\[1ex] &=~ \sum_{x+1=1}^{n+1} \dfrac{\color{blue}{(n+1)^{-1}}\,(n+1)!\,p^{x+1}\color{blue}{p^{-1}}\,(1-p)^{{n+1}-(x+1)}}{({x+1})!\,({n+1}-(x+1))!} &&\text{these factors are constants so can be redistributed}
\\[1ex] &=~ \frac{1}{p\,(n+1)}\sum_{\color{blue}{x+1}=1}^{n+1} \dfrac{(n+1)!~p^{\color{blue}{x+1}}\,(1-p)^{{n+1}-(\color{blue}{x+1})}}{(\color{blue}{x+1})!\,({n+1}-(\color{blue}{x+1}))!} &&\text{a change of variables now seems appropriate}
\\[1ex] &\ddots\end{align}$$
A: $\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\sum_{x = 0}^{n}{n \choose x}p^{x}\pars{1 - p}^{n - x}\,{1 \over 1 + x} =
\sum_{x = 0}^{n}{n \choose x}p^{x}\pars{1 - p}^{n - x}\int_{0}^{1}t^{x}\,\dd t
\\[5mm] = &\
\pars{1 - p}^{n}\int_{0}^{1}\sum_{x = 0}^{n}{n \choose x}
\pars{pt \over 1 - p}^{x}\,\dd t
\\[5mm] = &
\pars{1 - p}^{n}\int_{0}^{1}\pars{1 + {pt \over 1 - p}}^{n}\,\dd t =
\left.{\pars{1 - p + pt}^{n + 1} \over \pars{n + 1}p}\,
\right\vert_{\ t\ =\ 0}^{\ t\ =\ 1}
\\[5mm] = &\
\bbx{\ds{{1 - \pars{1 - p}^{n + 1} \over \pars{n + 1}p}}}
\end{align}
