pseudocode for hump_trap.m Apply a sequence of trapezoid rules T1, T2, T4, ..., T1024 to estimate the integral of hump(x) over [0,2]. a = 0 b = 2 q = 0 loop1 nlog = 0 to 10 n = 2^nlog qold = q x = n + 1 equally spaced values between a and b q = 0.5 * f(x(1)) loop2 i = 2 to n q = q + f ( x(i) ) end loop2 q = q + 0.5 * f(x(n+1)) q = ( b - a ) * q e = hump_int(a,b) - q print n, q, e end loop1