function [ u, uxy ] = sine_gordon_exact ( a, x, y )

%*****************************************************************************80
%
%% sine_gordon_exact() evaluates an exact solution of the Sine-Gordeon PDE.
%
%  Discussion:
%
%    This is a one-soliton solution.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 May 2024
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Daniel Arrigo,
%    Analytical Techniques for Solving Nonlinear Partial Differential Equations,
%    Morgan and Clayfoot, 2019,
%    ISBN: 978 168 173 5351.
%
%  Input:
%
%    real A: a parameter.
%
%    real X, Y: the X and Y coordinates of a point.
%
%  Output:
%
%    real U, UXY: the values of the solution, and its first mixed derivative
%    at (X,Y).
%
  u = 4.0 * atan ( exp ( a * x + y / a ) );

  uxy = 4.0 * ( exp ( a * x + y / a ) - exp ( 3 * a * x + 3 * y / a ) ) ...
    / ( 1.0 + exp ( 2 * a * x + 2 * y / a ) ) ^ 2;

  return
end
