Conditional probability and uniform distribution. So, I've been having some trouble trying to solve the problem.
Let $U$ be a random variable that has a uniform distribution over $[0,2]$. What distribution has $U$ conditional on: 


*

*$U\leq 1$

*$|U-1| \geq \frac{1}{2}$


Here's my attempt. For the first part of the problem I have this: $$P(U\leq u  \ |\ U\leq 1) = \frac{P( U \leq u \ \ , \ \ U \leq 1 )}{P(U\leq 1)}\text{,}$$ by definition. Now, finding $P(U \leq 1)$ is no hard task (it is simply equal to $\frac{1}{2})$, but I have no idea how I could find $P( U \leq u \ \ , \ \ U \leq 1 )$
For the second part of the problem, I've done the following: $$|U-1| \geq \frac{1}{2} \\ -\frac{1}{2} \geq U-1 \geq \frac{1}{2} \\ \frac{1}{2} \geq 
U \geq \frac{3}{2}\\$$Therefore we have that $$P(|U-1| \geq \frac{1}{2}) = P(U \leq \frac{1}{2}) + P(U \geq \frac{3}{2}) \\ = 1/4 + \left(1-\frac{3}{4}\right) \\ = \frac{1}{2}$$
Now, again I have no idea how to compute $$P(U \leq u \ , \ |U-1| \geq \frac{1}{2}).$$
 A: *

*$$\forall\, u \in [0,1], P(U\leq u \mid U\leq 1) = \frac{P( U \leq u, U \leq 1 )}{P(U\leq 1)} = \frac{u/2}{1/2} = u$$  So the conditional distribution follows $\mathrm{Unif}([0,1])$.

*$\forall\, u \in [0,2]$,
\begin{align}
P(U \leq u \ , \ |U-1| \geq \frac{1}{2}) &= P(U \le u, U \leq \frac{1}{2}) + P(U \le u, U \geq \frac{3}{2}) \\
&= \min\{\frac{u}2, \frac14\} + P(\frac32 \le U \le u) \\
&= \min\{\frac{u}2, \frac14\} + \max\{\frac{u}2-\frac34,0\} \\
&= \begin{cases} \frac{u}2 & \quad u \in [0,\frac12] \\ \frac14 & \quad u \in [\frac12, \frac32] \\ \frac{u}2 - \frac34 & \quad u \in [\frac32, 2] \end{cases} \\
P(U \leq u \mid \ |U-1| \geq \frac{1}{2}) &= \frac{P(U \leq u \ , \ |U-1| \geq \frac{1}{2})}{\underbrace{P(|U-1| \geq \frac{1}{2})}_{=1/2}} \\
&= \begin{cases} u & \quad u \in [0,\frac12] \\ \frac12 & \quad u \in [\frac12, \frac32] \\ u - \frac32 & \quad u \in [\frac32, 2] \end{cases}
\end{align}
Differentiating with respect to $u$ on $(0,\frac12)$ and $(\frac32,2)$ gives constant density $1$.  This shows that the conditional distribution follows $\mathrm{Unif}([0,\frac12] \cup [\frac32,2])$.

