Problem 24    Due 4/5/00

In this problem we examine the error of
Gaussian quadrature for integration of
the function f(x)=sin(x) over the interval
[0,pi]. You can actually do this problem
most easily with pencil, paper, and a
calculator.

a). Derive the weights and nodes for a
three point gaussian quadrature routine.
You can simplify this to three equations
in three unknowns by making use of sym-
metry.

b). Apply this rule to the integral of f(x)
= sin(x) over [0,pi] and compare the result
to the exact value.

c). Do the same for Simpson's rule (3 points 
only) and for the trapezoidal rule with two 
panels (again 3 points).  Which has the smallest 
error?