function uxx = wave_exact_xx ( t )

%*****************************************************************************80
%
%% wave_exact_xx returns the exact second spatial derivative of U.
%
%  Discussion:
%
%    This solution satisfies the wave PDE:
%
%    u' = v
%    v' = c * uxx
%
%    u(x,t0) =       sin ( x ) * cos ( c * t0 )
%    v(x,t0) = - c * sin ( x ) * sin ( c * t0 )
%
%    u(0,t) = u(2*pi,t) = 0.0
%    v(0,t) = v(2*pi,t) = 0.0
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 March 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real t(:): the current time.
%
%  Output:
%
%    real uxx(nx): the exact spatial second derivative of U(T,X).
%
  [ xmin, xmax, nx, dx, c, t0 ] = wave_parameters ( );

  x = linspace ( xmin, xmax, nx );

  uxx = - sin ( x ) .* cos ( c * t );

  return
end

