function Problem = testcase(mode)
switch mode
  case 1
     f=@(x)exp(x).*(6*cos(4*x)+4*sin(6*x));
     a=0;
     b=pi/2;
     tol=1E-3;
  case 2
     f=@(x)exp(x).*(6*cos(4*x)+4*sin(6*x));
     a=0;
     b=pi/2;
     tol=1E-9;
  case 3
     f=@(x)exp(x).*(6*cos(4*x)+4*sin(6*x));
     a=0;
     b=pi/2;
     tol=1E-14;
  case 4
     f=@(x)sin(16*pi*x).^2;
     a=0;
     b=1;
     tol=1E-9;
  case 5
     f=@(x)sin(1./x);
     a=0.5;
     b=1;
     tol=1E-6;
  case 6
     f=@(x)sin(1./x);
     a=1E-3;
     b=1;
     tol=1E-6;
  otherwise
     f=@(x)exp(x);
     a=0;
     b=1;
     tol=1E-6;
end
Problem.f = f;
Problem.a = a;
Problem.b = b;
Problem.tol = tol;
