function [ u, ut, ux, uxx ] = fisher_exact ( t, x )

%*****************************************************************************80
%
%% fisher_exact() computes an exact solution of the KPP Fisher equation.
%
%  Discussion:
%
%    ut = uxx + u * ( 1 - u )
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 May 2024
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Mark Ablowitz, Anthony Zeppetella,
%    Explicit solutions of Fisher's equation for a special wave speed,
%    Bulletin of Mathematical Biology,
%    Volume 41, pages 835-840, 1979.
%
%    Daniel Arrigo,
%    Analytical Techniques for Solving Nonlinear Partial Differential Equations,
%    Morgan and Clayfoot, 2019,
%    ISBN: 978 168 173 5351.
%
%  Input:
%
%    real T, X: the time and position at which the solution is evaluated.
%
%  Output:
%
%    real U, UT, UX, UXX: the exact solution and derivatives at (T,X).
%
  [ a, c, k ] = fisher_parameters ( );

  z = x - c * t;

  u =     1.0     ./ ( 1.0 + a * exp ( k * z ) ).^2;
  ut =    2.0 * c ./ ( 1.0 + a * exp ( k * z ) ).^3 * a   * k   .* exp (       k * z );
  ux =  - 2.0     ./ ( 1.0 + a * exp ( k * z ) ).^3 * a   * k   .* exp (       k * z );
  uxx = + 6.0     ./ ( 1.0 + a * exp ( k * z ) ).^4 * a^2 * k^2 .* exp ( 2.0 * k * z ) ...
        - 2.0     ./ ( 1.0 + a * exp ( k * z ) ).^3 * a   * k^2 .* exp (       k * z ); 

  return
end






  
