function [ f, fz, fzz ] = f_exact ( z )

%*****************************************************************************80
%
%% f_exact() computes a function related to an exact solution of the KPP Fisher PDE.
%
%  Discussion:
%
%    ut = uxx + u * ( 1 - u )
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 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 Z: the evaluation point.
%
%  Output:
%
%    real F, FZ, FZZ: the function and derivatives at Z.
%
  [ a, c, k ] = fisher_parameters ( );

  f =     1.0 ./ ( 1.0 + a * exp ( k * z ) ).^2;
  fz =  - 2.0 ./ ( 1.0 + a * exp ( k * z ) ).^3 * a   * k   .* exp (       k * z );
  fzz = + 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
  
