function y = unstable_exact ( t )

%*****************************************************************************80
%
%% unstable_exact(): exact solution of unstable_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    28 October 2021
%
%  Author:
%
%    Catalin Trenchea
%
%  Input:
%
%    real T: the current time.
%
%  Output:
%
%    real Y(2): the exact solution.
%
  [ mu, t0, y0, tstop ] = unstable_parameters ( );

  u = exp ( mu * t ) .* ( cos ( t / mu ) - mu^2 * sin ( t / mu ) );

  v = mu * exp ( mu * t ) .* (              cos ( t / mu ) - mu^2 * sin ( t / mu ) ) ...
    +      exp ( mu * t ) .* ( - 1.0 / mu * sin ( t / mu ) - mu   * cos ( t / mu ) );

  y = [ u(:), v(:) ];

  return
end

