% Problem 1 of HW 23 a = -1; b = 2; I = integral(@q1a,a,b); ll = exp(a)*(sin(a)-cos(a))/2; ul = exp(b)*(sin(b)-cos(b))/2; exact = ul - ll; rel = (I-exact)/exact % >> hw23_1a % rel = % 0