function fx2 = p12_fx2 ( x )

%*****************************************************************************80
%
%% p12_fx2 evaluates the second derivative of the function for problem 12.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    07 May 2011
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X, the abscissa.
%
%  Output:
%
%    real FX2, the second derivative of the function at X.
%
  factor = 1000.0;

  if ( x == 1.0 )
    fx2 = 0.0;
  else
    y = x - 1.0;
    fx2 = - 2.0 * factor * exp ( - 1.0 / y.^2 ) * ( y.^2 - 2.0 ) / y.^5;
  end

  return
end

