function fjac = p21_jac ( n, x )

%*****************************************************************************80
%
%% P21_JAC sets the jacobian for problem 21
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    10 October 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of variables and equations.
%
%    real X(N), the evaluation point.
%
%  Output:
%
%    real FJAC(N,N), the jacobian matrix.
%
  fjac = zeros ( n, n );

  fjac(1,1) = 1.0;
  fjac(1,2) = - 3.0 * x(2)^2 + 10.0 * x(2) -  2.0;

  fjac(2,1) = 1.0;
  fjac(2,2) =   3.0 * x(2)^2 +  2.0 * x(2) - 14.0;

  return
end

