Let $X\sim Exp(1)$ and independently let $Y$ have the pmf $P(Y=k)= p$, $P(Y = \infty) = 1-p$, where $k < \infty$. I'd like to calculate $\mathbb{E}(Z)$, where $Z = \min(X,Y)$.
Usually, we tackle problems like this by first considering the cdf of $Z$, which I get to be
\begin{align}F_Z(z) &= F_X(z) + F_Y(z) - F_X(z)F_Y(z) \\&=\begin{cases} 0 , &z < 0\\ 1-e^{-z} & 0 \leq z < k, \\(1-e^{-z}) + p - p(1-e^{-z}) = 1 + (p-1)e^{-z} & k \leq z < \infty, \\1 & z = \infty \end{cases}\end{align}
Differentiating on each interval, I get the pdf $f_Z(z) = e^{-z}$ for $0 \leq z < k$, $f_Z(z) = (1-p)e^{-z}$ for $k \leq z < \infty$, $f_Z(z) = 0$ otherwise. Taking the expectation over each interval, I get a final answer of
$\mathbb{E}(Z) = 1-(k+1)e^{-k} + (k+1)(p+1)e^{-k} = \underline{1 + p(k+1)e^{-k}}$.
Is this answer correct? If not, why?
Is there a better way to tackle this?