function J = p14_j ( m, n, x )

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

  for i = 1 : m

    temp = i / 5.0;
    tmp1 = x(1) + temp * x(2) - exp ( temp );
    tmp2 = x(3) + sin ( temp ) * x(4) - cos ( temp );

    J(i,1) = 2.0 * tmp1;
    J(i,2) = 2.0 * tmp1 * temp;
    J(i,3) = 2.0 * tmp2;
    J(i,4) = 2.0 * sin ( temp ) * tmp2;

  end

  return
end
