function [ u, ux, uy, uz, uxx, uxy, uxz, uyy, uyz, uzz ] = ...
  laplace_radial_3d_exact ( x, y, z, a, b )

%*****************************************************************************80
%
%% laplace_radial_3d_exact() evaluates an exact radial solution of the Laplace equation.
%
%  Discussion:
%
%    The equation is:
%      Uxx + Uyy = 0
%
%    The radial solution in 3D, with parameters a and b, is:
%      R = sqrt ( X^2 + Y^2 + Z^2 )
%      U(X,Y,Z) = a * log ( R ) + b
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 June 2025
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X, Y, Z: the coordinates of the points.
%
%    real a, b: shape parameters.
%
%  Output:
%
%    real U, Ux, Uy, Uz, Uxx, Uxy, Uxz, Uyy, Uyz, Uzz: 
%    the solution and first and second partial derivatives evaluated 
%    at the points (X,Y).
%
  r = sqrt ( x.^2 + y.^2 + z.^2 );
  u = - a / r + b; 
  ux = a * x ./ ( x.^2 + y.^2 + z.^2 ).^(3/2);
  uy = a * y ./ ( x.^2 + y.^2 + z.^2 ).^(3/2);
  uz = a * z ./ ( x.^2 + y.^2 + z.^2 ).^(3/2);
  uxx = a * ( - 3 * x.^2 ./ ( x.^2 + y.^2 + z.^2 ) + 1 ) ...
    ./ ( x.^2 + y.^2 + z.^2 ).^(3/2);
  uxy = - 3 * a * x .* y ./ ( x.^2 + y.^2 + z.^2 ).^(5/2);
  uxz = - 3 * a * x .* z ./ ( x.^2 + y.^2 + z.^2 ).^(5/2);
  uyy = a * ( - 3 * y.^2 ./ ( x.^2 + y.^2 + z.^2 ) + 1 ) ...
    ./ ( x.^2 + y.^2 + z.^2 ).^(3/2);
  uyz = - 3 * a * y .* z ./ ( x.^2 + y.^2 + z.^2 ).^(5/2);
  uzz = a * ( - 3 * z.^2 ./ ( x.^2 + y.^2 + z.^2 ) + 1 ) ...
    ./ ( x.^2 + y.^2 + z.^2 ).^(3/2);

  return
end
 
