% Creates the function f(x)
% Input: x (a real number)
% Output: y 

function y = f(x)
%y = x^2;
%y = log(x);
%y = -0.374*x^2 + 9.44*x; - 41.3;
%y = cos(x);
%y = 15.56*sin((2*pi*x)/24 - 1.787);
%y = -sin(x);
%y = 0.02*exp(-0.02*x);
y = (1-exp(2-x))/(1+exp(2-x));
%y = 5.955 * (x/7)^0.233 * exp(0.027*x/7);
%y = 8.409 * (x/7)^0.143 * exp(0.037*x/7);
%y = (x+100)*log(x+2);
%y = pi/8 * cos(3*pi*(x-1/3));
%y = 1.06 + (1.81-0.31)/2 * cos(2*pi*x/10);
%y = 1.06 + (1.81-0.31)/2 * cos(2*pi*x/10) - 1.81[;
%y = 16250*0.87^x;
%y = 0.04*x^2 + 0.6*x + 330 + 7.5*sin(2*pi*x);
%y = -10.28 + 175.9*x*exp(-x/1.3);
%if (x~=1) y = 1/(x-1); else y = 2; end;
%if (x<0) y = x^3; elseif (x>2) y = 2*x; else y = x^2; end;
%if (x<-pi/2) y=1/(x+pi/2); elseif (x>pi/2) y=1/(x-pi/2); else y=tan(x); end;
%if (x<=28) y=48+3.64*x+0.6565*x^2+0.00993*x^3; else y=-1004+65.8*x; end;