function J = p09_j ( m, n, x )

%*****************************************************************************80
%
%% p09_j() evaluates the jacobian for problem 9.
%
%  Discussion:
%
%    The jacobian matrix of a set of M functions F(I) that depend
%    on N variables X(J) is
%
%      J(I,J)  =  d F(I) / d X(J)
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%  Modified:
%
%    03 March 2026
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the number of equations.
%
%    integer N, the number of variables.
%
%    real X(N), the evaluation point.
%
%  Output:
%
%    real J(M,N), the jacobian matrix.
%
  J = zeros ( m, n );

  v = [ 4.0; 2.0; 1.0; 0.5; 0.25; 0.167; 0.125; 0.1; 0.0833; 0.0714; 0.0625 ];

  for i = 1 : 11
    tmp1 = v(i) * ( v(i) + x(2) );
    tmp2 = v(i) * ( v(i) + x(3) ) + x(4);
    J(i,1) = - tmp1 / tmp2;
    J(i,2) = - v(i) * x(1) / tmp2;
    J(i,3) = J(i,1) * J(i,2);
    J(i,4) = J(i,1) * J(i,2) / v(i);
  end

  return
end
