function fjac = p22_jac ( n, x )

%*****************************************************************************80
%
%% p22_jac() sets the jacobian for problem 22.
%
%  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) = 2.0 * x(1);
  fjac(1,2) = - 1.0;

  fjac(2,1) = 1.0;
  fjac(2,2) = 0.5 * pi * sin ( 0.5 * pi * x(2) );

  return
end

