I am trying to find the more general composite rule of this basic rule :

Integral from 0 to 1 of a function of x = h/12[5f(0) + 8f(1) - f(2)]

This works with h = 1 on f(x) = x for example, but I cannot figure out how to get it to work if you take h = 1/2 for example. Please help! I figured this out but it doesn't seem to work.

h/12[f0+8f1+4f2+8f3+....+4fn-2+8fn-1 -fn]

Thanks