The density for a random variable X distributed uniformly over (a, b) is

f(x) = 1/(b - a) a < x < b

Use Definition 4.2.1 to show that

E[X] = (a + b)/2 and Var X = (b - a)²/12