I_c = @(x) cos(x)./sqrt(x);
I_s = @(x) sin(x)./sqrt(x);
exact_Ic = 1.809048475800;
exact_Is = 0.620536603446;
a = 0; b = 1;
n = 100:100:1000;
n2 = 20:20:200;

Trapezoid(I_c,a,b,n,exact_Ic)
Trapezoid(I_s,a,b,n,exact_Is)

Trap_NC(I_c,a,b,n,exact_Ic)
Trap_NC(I_s,a,b,n,exact_Is)

I_cc = @(x) 2*cos(x.^2);
I_sc = @(x) 2*sin(x.^2);

Trapezoid(I_cc,a,b,n2,exact_Ic)
Trapezoid(I_sc,a,b,n2,exact_Is)