function a = w_mass_matrix ( n )

%*****************************************************************************80
%
%% W_MASS_MATRIX computes the mass matrix for the Chebyshev W polynomial.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    20 July 2015
%
%  Author:
%
%    John Burkardt
%
  [ x, w ] = w_quadrature_rule ( n + 1 );

  phi = w_polynomial ( n + 1, n, x );

  for i = 1 : n + 1
    phiw(:,i) = w(i) * phi(i,:)';
  end

  a = phiw * phi;

  return
end
