Probability - Continuous independent variables question?

I have a homework problem I've been working on for hours and can't seem to solve. Please help.

Let X and Y be two independent but similarly distributed variables with uniform distribution:

f(x) = 1 , when 0<x<1

= 0 , otherwise

Let U = min(X,Y) and V = max(X,Y).

Find the marginal densities for U and V, and then find the joint density for U and V.

I am having a lot of trouble doing this. I don't know what bounds to set for the integral. I am also used to finding marginal densities by integrating over the joint density. Here you do not have the joint density for U and V, so I don't know how I am supposed to get the marginals first.

Thanks for your help

Re: Probability - Continuous independent variables question?

Hey AmbientTemple.

In your unit square you need to draw the line y = x and look at the probability of the upper triangle (Y > X) and the lower triangle (Y <= X). Once you specify the probability functions for these triangles you can get the marginals. You know that since X and Y are IID, then P(X = x, Y = y) = P(X = x)P(Y = y).

You get the marginals by integrating over the right triangles.