The probability density function for a "uniform probability" is a constant. In particular, the probability density function for the uniform probability on an interval, (a, b), is one over the length of the interval, $\displaystyle \frac{1}{b- a}$ Here, that interval is (0, x).