function J = p25_j ( m, n, x )

%*****************************************************************************80
%
%% p25_j() evaluates the jacobian for problem 25.
%
%  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

    ti = ( i - 1 ) / 10.0;

    J(i,1) = ( abs ( x(2) ) )^ti * tanh ( x(3) * ti + sin ( x(4) * ti ) ) ...
      * cos ( ti * exp ( x(5) ) );

    J(i,2) = x(1) * ti * ( abs ( x(2) ) )^( ti - 1.0 ) ...
      * tanh ( x(3) * ti + sin ( x(4) * ti ) ) * cos ( ti * exp ( x(5) ) );

    J(i,3) = x(1) * ( abs ( x(2) ) )^ti * ti * ...
      cos ( ti * exp ( x(5) ) ) / ( cosh ( x(3) * ti + sin ( x(4) * ti ) )^2 );

    J(i,4) = x(1) * abs ( x(2) )^ti * ti * cos ( x(4) * ti ) * ...
      cos ( ti * exp ( x(5) ) ) / ( cosh ( x(3) * ti + sin ( x(4) * ti ) )^2 );

    J(i,5) = - x(1) * abs ( x(2) )^ti ...
      * tanh ( x(3) * ti + sin ( x(4) * ti ) ) * ...
      sin ( ti * exp ( x(5) ) ) * ti * exp ( x(5) );
  end

  return
end
