function fjac = p05_jac ( n, x )

%*****************************************************************************80
%
%% P05_JAC sets the jacobian for problem 5.
%
%  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) =  100.0 * x(2) / ( 2.0 * pi * ( x(1)^2 + x(2)^2 ) );
  fjac(1,2) = -100.0 * x(1) / ( 2.0 * pi * ( x(1)^2 + x(2)^2 ) );
  fjac(1,3) =   10.0;

  fjac(2,1) = 10.0 * x(1) / sqrt ( x(1)^2 + x(2)^2 );
  fjac(2,2) = 10.0 * x(2) / sqrt ( x(1)^2 + x(2)^2 );
  fjac(2,3) = 0.0;

  fjac(3,1) = 0.0;
  fjac(3,2) = 0.0;
  fjac(3,3) = 1.0;

  return
end

