function fx2 = p14_fx2 ( x )

%*****************************************************************************80
%
%% P14_FX2 evaluates the second derivative of the function for problem 14.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 December 2016
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X, the abscissa.
%
%  Output:
%
%    real FX2, the second derivative of the function at X.
%
  t1 = - 2.0;
  b1 = ( 0.04 + ( x - 0.9 ) ^ 2 ) ^ 2;

  t2 = 8.0 * ( x - 0.9 ) ^ 2;
  b2 = ( 0.04 + ( x - 0.9 ) ^ 2 ) ^ 3;

  t3 = 80.0 * ( 3.0 - 10.0 * x ) ^ 2;
  b3 = ( 1.0 - 6.0 * x + 10.0 * x ^ 2 ) ^ 3;

  t4 = - 200.0;
  b4 = ( 1.0 - 6.0 * x + 10.0 * x ^ 2 ) ^ 2;

  fx2 = t1 / b1 + t2 / b2 + t3 / b3 + t4 / b4;

  return
end
