Continuous Random variable

Hi, I'm unsure where to go with this question:

Let $\displaystyle f(a,b) (x) \begin{cases} = { \left ( \frac{bx}{a} \right ) for \in [0,a] \\ {0} otherwise \end{cases} $

If a > 0 for what values of b > 0 is f(a,b) the pdf of a continuous variable. Also for what values of a and b is the E(X) = 1/3

So what I'm doing is $\displaystyle \int_{a}^{0} {bx/a} \, dx $ and then I get $\displaystyle -(a b)/2 $ . I was thinking to make this equal to 1, but don't no what to do next.