Conditional expectation of $E(\max(X,a)\mid\min(X,a))$ when $X$ is exponentially distributed 
I am trying to compute the conditional expectation $$E\left[\max{(X,a)} \mid \min{(X,a)}\right]$$ where $X\sim \exp(a)$ and $a$ is a constant. 

I set $U=\min{(X,a)},W=\max{(X,a)}$, and computed the joint distribution as 
$$F_{UW}(u,w)=\begin{cases}P(X\le u,a\le w)+P(X\le w,a\le u)-P(X\le u,a\le u)& u<w\\P(X\le w,a\le w) &w<u\end{cases}$$
Then I don't know how to proceed. Can I differentiate $F_{UW}$ to find the joint density? Also, is there any easy way to compute without finding the joint density?
These is a similar question here, but it involves two continuous r.v.
 A: Hint: Use the Law of Total Expectation, partitioning on the events of $X\leq a$ and $X>a$.
Also:
$\mathsf E(\max \{X, a\}\mid\min\{X,a\}) ~ = ~ {\mathsf E(a~\mathsf 1_{\min\{X,a\}<a}+X~\mathsf 1_{\min\{X,a\}=a}\mid \min\{X,a\})}$ 
A: You can simplify things, if you write $$\max{(X,a)}=X+a-\min{(X,a)}$$ so that \begin{align}E\left[\max{(X,a)} \mid \min{(X,a)}\right]&=E\left[X+a-\min{(X,a)} \mid \min{(X,a)}\right]\\[0.2cm]&=E\left[X \mid \min{(X,a)}\right]+a-\min{(X,a)}\tag{1}\end{align} 

Edit: To proceed (after correcting an obvious mistake that was pointed out), observe that 
\begin{align}E[X\mid \min{(X,a)}=y]&=\left.\begin{cases}y, & y<a\\y+E[X], &y= a\end{cases}\right\}=y+E[X]\mathbf 1_{\{y=a\}}\end{align} where the second case is due to the memoryless property of the exponential distribution. Hence \begin{align}E[X\mid \min{(X,a)}]&=\min{(X,a)}+E[X]\mathbf 1_{\{\min{(X,a)}=a\}}=\min{(X,a)}+E[X]\mathbf 1_{\{X\ge a\}}\end{align}
which, by substitution in $(1)$, gives the result
\begin{align}E\left[\max{(X,a)} \mid \min{(X,a)}\right]&=a+E[X]\mathbf 1_{\{X\ge a\}}
\end{align} 
