function [ u, ux, uy, uxx, uxy, uyy ] = laplace_radial_2d_exact ( x, y, a, b )

%*****************************************************************************80
%
%% laplace_radial_2d_exact() evaluates an exact radial solution of the Laplace equation.
%
%  Discussion:
%
%    The equation is:
%      Uxx + Uyy = 0
%
%    The radial solution in 2D, with parameters a and b, is:
%      R = sqrt ( X^2 + Y^2 )
%      U(X,Y) = a * log ( R ) + b
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 June 2025
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X, Y: the coordinates of the points.
%
%    real a, b: parameters.
%
%  Output:
%
%    real U, Ux, Uy, Uxx, Uxy, Uyy: the solution and first and second
%    partial derivatives evaluated at the points (X,Y).
%
  r = sqrt ( x.^2 + y.^2 );

  u = a * log ( r ) + b;
  ux = a * x ./ ( x.^2 + y.^2 );
  uy = a * y ./ ( x.^2 + y.^2 );
  uxx = a * ( - 2 * x.^2 ./ ( x.^2 + y.^2 ) + 1 ) ./ ( x.^2 + y.^2 );
  uxy = - 2 * a * x .* y ./ ( x.^2 + y.^2 ).^2;
  uyy = a * ( - 2 * y.^2 ./ ( x.^2 + y.^2 ) + 1 ) ./ ( x.^2 + y.^2 );

  return
end

