The question: Given that a random variable X is uniformly distributed on (-1,1) and Y=max(X, 1-X), find the CDF of Y.

I tried to solve as following:

First I found the CDF of X, then I tried to find the relation between the CDF of X and the CDF of Y.

Y=max(X, 1-X) means that for x<0.5 y=1-x, and for x>0.5 y=x

So F_{Y}(alpha)=P(Y<alpha) but here I have a problem: which Y should I use? (y=x or y=1-x or both in some complicated way)

I've been thinking this over and over, but I just CAN'T find the solution.

Can you please please help me?

Thanks!