function [dg,dh]=grestr16(x)
% lucro de um processo catalitico
% x(1) -->  catalisador (fracao molar)
% x(2) -->  vapor (razao vapor/produto)

x2=x(2)*400;

% lucro=50*(0.1+0.3*x(1)+1e-4*x2-1e-4*x(1).*x2)- ...
%       (2+10*x(1)+20*x(1).^2)-(1+0.003*x2+2e-6*x2.^2);

% S=-lucro;
% g(1)=S;
% g(2)=-x(1);
% g(3)=-x(2);
% g(4)=x(1)-1;
% h=[];

dlucro1=50*(0.3-1e-4*x2)-(10+40*x(1));
dlucro2=50e-4*(1-x(1))-(0.003+4e-6*x2);

dS(1) = -dlucro1;
dS(2) = -dlucro2;

dg(1,:) = [dS(1) dS(2)];
dg(2,:) = [ -1       0];
dg(3,:) = [  0      -1];
dg(4,:) = [  1       0];

dh = [];
