Let $X \sim exp(\lambda)$ be independent of $Y \sim exp(\lambda)$ compute $E[X|X+Y]$ Let $X \sim exp(\lambda)$ be independent of $Y \sim exp(\lambda)$ compute $E[X|X+Y]$
I have tried to do this in a couple different ways and all of them have either led to an indefinite integral or a bad answer (illogically $-\lambda$). 
Let $Z := X+Y$
The first way I tried to do it was, 
$
\begin{align}
E[X|Z] &= \int_0^{\infty} x p_{x|z}dx\\
\end{align}$
Then I found $p_{x|z}$ to be 
$
\begin{align}
p_{x|z} &= \frac{P(X=x, X+Y=z)}{P(Z=z)}\\
&= \frac{P(X=x)P(Y=z-x)}{P(Z=z)}\\
&= \frac{\lambda^2 e^{-\lambda x} e^{-\lambda (z-x)}}{\lambda e^{-\lambda z}}\\
&= \lambda 
\end{align}$
So,
$
\begin{align}
E[X|Z] &= \int_0^{\infty} x p_{x|z}dx\\
&= \int_0^{\infty} x \lambda dx
\end{align}$
Which doesn't coverage, can anyone help?
 A: Aside from the fact that, by being continous random variables, none of them have probability mass functions, the distribution of $Z$ is not exponential (and certainly not with rate $\lambda$. The probability density function for $Z$ is:
$$\begin{align}f_Z(z)&=\int_\Bbb R f_{X,Y}(s, z-s)\mathsf d s 
\\[1ex] &=\mathbf 1_{z\in[0;\infty}\int_\Bbb R \lambda e^{-\lambda s}\mathsf 1_{s\in[0;\infty)}\cdot\lambda e^{-\lambda (z-s)}\mathsf 1_{z-s\in[0;\infty)}\mathsf d s
\\[1ex] &= \mathbf 1_{z\in[0;\infty)}\int_0^z \lambda^2 e^{-\lambda z}\mathsf d s
\\[1ex] f_Z(z) &= \lambda^2 z e^{-\lambda z}\mathbf 1_{z\in[0;\infty)}\end{align}$$
You may use this to find the conditional probability density function for $X$ given $Z$.

 $$f_{X\mid Z}(x\mid z) =\dfrac{\lambda e^{-\lambda x}\cdot \lambda e^{-\lambda (z-x)}}{\lambda^2 ze^{-\lambda z}}\mathbf 1_{0\leq x\leq z} = \tfrac 1z \mathbf 1_{z\in[0;\infty),x\in [0;z]}$$


Of course there is an easier way: $\mathsf E(X+Y\mid Z)= Z$, so you may use Linearity of Expectation and an argument from symmetry.   
