Finding $P(X\in A)$ given description of $X$ 
Consider a random variable $X$ defined on $[0,1]$ as follows: $$X(\omega)=1,\space\space\space\space\space\space \space0\leq\omega<\dfrac{1}{4}$$$$X(\omega)=2\omega^2,\space\space\space\space\space\space\dfrac{1}{4}\leq\omega<\dfrac{3}{4}$$$$X(\omega)=\omega^2,\space\space\space\space\space\space\dfrac{3}{4}\leq\omega\leq1$$ Assume that $P$ is the Lebesgue measure on $[0,1]$. Determine $P(X\in[0,1])$ and $P(X\in[\frac{1}{2},1])$.

I am not sure how to do this problem. Actually this is the first type of problem I am facing. I realized that $P(X\in[0,1])=P(\omega\in[0,\dfrac{1}{\sqrt{2}}])+P(\omega\in[\dfrac{3}{4},1])$. But what distribution does $\omega$ follow?

The figure below depicts $X$ as a function of $\omega$. Note that the measure is the Lebesgue measure this time.

If $0\le \omega\le \frac{1}{\sqrt 2}$ or if $\frac{3}{4}\le \omega \le 1$ then $0\le X(\omega)\le1$. So $$\mathbb P(0\le X(\omega)\le1)=\frac{1}{\sqrt2}+\frac{1}{4}.$$ 
As far as the second probability: $X\ge 1/2$ if $\omega\in A\cup B$. So  $$ \mathbb P( X\ge 1/2)= \mathbb P( A\cup B)=\frac{1}{4}+\frac{1}{2}=\frac{3}{4}.$$
