Idenitity with moment generating function and complex integral 
Let $\xi$ be a random variable with finite exponential moments. Define
  two functions$$C(k)=\Bbb E[(e^\xi-e^k)^+],\,k\in\Bbb R,\quad M(z)=\Bbb E[e^{z\xi}],\,z\in\Bbb C.$$
  (a) Show$$M(z)=\int_{\Bbb
> R}C(k)f(z,\,k)dk$$for $z=x+iy,\,x>1$, where
  $f(z,\,k)=z(z-1)e^{(z-1)k}$.
(b) Show$$C(k)=\frac{1}{2\pi\text{i}}\int_{x_0+\text{i}\Bbb
> R}\frac{M(z)dz}{f(z,\,k)}$$ for real $k$ and $x_0>1$.
You may use$$\int_{x_0+i\Bbb R}h(z)dz=i\int_{\Bbb R}h(x_0+iy)dy$$and, for real
  $a$ and $x_0>1$,$$\frac{1}{2\pi\text{i}}\int_{x_0+\text{i}\Bbb R}
\frac{e^{az}dz}{z(z-1)}=(e^a-1)^+.$$

Hi I am stuck with the following problem: I tried to use the suggested identities but inevitable get lost with the many integrables and variables... is there a simple way to do this?

For (a), we also use an identity in the Dirac delta. The right-hand side is$$\begin{align}\int_{\Bbb R}z(z-1)\text{e}^{zk}\Bbb E[(\text{e}^{\xi-k}-1)^+]dk&=\frac{1}{2\pi\text{i}}\int_{\Bbb R}\int_{x+i\Bbb R}\frac{z(z-1)}{z^\prime(z^\prime-1)}\text{e}^{zk}\Bbb E[\text{e}^{(\xi-k)z^\prime}]dz^\prime dk\\&=\frac{1}{2\pi\text{i}}\int_{\Bbb R}\int_{x+i\Bbb R}\frac{z(z-1)}{z^\prime(z^\prime-1)}\text{e}^{(z-z^\prime)k}M(z^\prime)dz^\prime dk\\&=\frac{1}{2\pi}\int_{\Bbb R^2}\frac{z(z-1)}{z^\prime(z^\prime-1)}\text{e}^{\text{i}k(y-y^\prime)}M(z^\prime)dz^\prime dk\\&=\int_{\Bbb R}\frac{z(z-1)}{z^\prime(z^\prime-1)}M(z^\prime)\delta(y-y^\prime)dz^\prime \\&=M(z).\end{align}$$Meanwhile,$$C(k)=\text{e}^k\Bbb E\frac{1}{2\pi\text{i}}\int_{x_0+i\Bbb R}\frac{\text{e}^{(\xi-k)z}dz}{z(z-1)}=\text{e}^k\frac{1}{2\pi\text{i}}\int_{x_0+i\Bbb R}\frac{M(z)\text{e}^{-kz}dz}{z(z-1)},$$which is the right-hand side of part (b). 
