function xprime=reactor(t,x);
% file name: reactor.m
% right hand side of the reactor equations as required by ode45
% Ubar is the equilibrium control
% u(t) is the perturbation of the control variable; it is defined in u.m
% Ubar+u(t) is the control variable
global alpha beta Ubar;
U=Ubar+u(t); 
xprime = zeros(2,1);    % create a column vector
xprime(1)=1-x(1)      -x(1)*arrhen(x(2)); 
xprime(2)=1-x(2)+alpha*x(1)*arrhen(x(2))-beta*(x(2)-U); 
