%MATLAB version of the script for example 7.3 on page 317 of conte/deboor
% example 7.3  Gaussian integration.
%
%  Reference:
%
%    Samuel Conte, Carl de Boor,
%    Elementary Numerical Analysis,
%    Third Edition,
%    SIAM, 2017,
%    ISBN: 978-1-611975-19-2.
%
F = @(t) sin(t+2).^2./(t+2);
gausleg = LGNDRE(4);
intgrl = gausleg.weights*(F(gausleg.points)).';
fprintf('Example 7.3: Gauss Quadrature\n integral = %14.7e\n',intgrl) 

