function U = biharmonic_fd2d_solution ( X, Y )

%*****************************************************************************80
%
%% biharmonic_fd2d_solution() evaluates a solution of the biharmonic equation.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 June 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X(*), Y(*): evaluation points.
%
%  Output:
%
%    real U(*): the solution.
%
  [ k, xmin, xmax, ymin, ymax ] = biharmonic_fd2d_parameters ( );

  if ( k == 1 )
    U = X .* ( 1.0 - X ) .* Y .* ( 1.0 - Y );
  elseif ( k == 2 )
    U = X.^2 - Y.^2  + X .* exp ( X ) .* cos ( Y );
  elseif ( k == 3 )
    U = 2350.0 * X.^4 .* ( X - 1.0 ).^2 .* Y.^4 .* ( Y - 1.0 ).^2;
  elseif ( k == 4 )
    U =       sin ( pi * X ) .* sin ( pi * Y );
  end

  return
end

