function J = p06_j ( m, n, x )

%*****************************************************************************80
%
%% p06_j() evaluates the jacobian for problem 6.
%
%  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 );

  J(1,1) =  1.0;
  J(1,2) = 10.0;

  J(2,3) =   sqrt ( 5.0 );
  J(2,4) = - sqrt ( 5.0 );

  J(3,2) =   2.0 * ( x(2) - 2.0 * x(3) );
  J(3,3) = - 4.0 * ( x(2) - 2.0 * x(3) );

  J(4,1) =   2.0 * sqrt ( 10.0 ) * ( x(1) - x(4) );
  J(4,4) = - 2.0 * sqrt ( 10.0 ) * ( x(1) - x(4) );

  return
end
