The lower sum for this partition is (0+1+4+9) = 14 and the upper sum is (1+4+9+16) = 30
Average of lower and upper sum = 22
The trapezoidal rule is: .5*(1 + (1+4) + (4+9) + (9+16)) = 44/2 = 22
You can also see this if you write the three expressions one under the other.