function y = g2(x,i)
% x = vector of x's
% i = identify which element to evaluate
% y = g(x)
% Used for Example 6.1

switch i
    case 1
        y = sqrt(10-x(1)*x(2));
    case 2
        y = sqrt((57-x(2))/(3*x(1)));
    otherwise
        y = [sqrt(10-x(1)*x(2));; sqrt((57-x(2))/(3*x(1)))];
end
