\input amssym.def
\def\d{\displaystyle}
\input epsf
\def\d{\displaystyle}
\nopagenumbers
\magnification= \magstep1

\parindent=0pt
\font\largerbold = cmbx10 scaled \magstep2

\centerline {\largerbold Problems, Week 4}

\bigskip

%trig sub & trig ints
%int strategies
%approx methods

1.~Suppose $f(x)=\sqrt{3x+6x^4}$.
\smallskip

a) Prove that $f$ is increasing on the interval $[0,1]$. 

\medskip

b) Write down a finite sum which will be within $10^{-10}$ of the true
value of $\d{\int_0^1 f(x)\; dx}$. You are {\it not} asked
to actually compute the sum, just describe it in any convenient
fashion.

Hint: your reasoning and your explanation may be guided by the picture
below: 
\medskip
\centerline{\epsfbox{pic4-1.eps}} 
\smallskip
\centerline{Note that the horizontal and vertical axes have different scales.}

\centerline{The rectangles represent the difference between right \& left
rectangles, trapping the area.}
\bigskip
2.~Consider the definite integral $\d{\int_0^1 \cos (x^2)\;
dx}$. 
\smallskip

a) Compute the results of approximating this integral with both the
Trapezoidal Rule and Simpson's Rule with $n=4$ and $n=8$ and
$n=16$ subdivisions. 

\medskip

b) A twenty-digit approximation of the true value of this integral is 

$$.90452423790027208145$$ 

Compute the differences between each of the approximations obtained
in a) and the true value. 

\medskip

c) Multiply the Trapezoidal Rule errors by $n^2$ and the Simpson's Rule
errors by $n^4$ in each case. 

\medskip

d) Make a table exhibiting all the numbers you have computed. Use
the information in the table to answer the following questions: 
\smallskip
      
{\parindent=.9in 
\narrower \noindent
What happens as $n$ increases to the
error? What can you guess about the precise {\it rate} of error
decrease in each case?\par

}

\bigskip

3.~Can numerical methods {\it lie}? Create a function $f$ on an
interval $[a,b]$ so that both the Trapezoidal Rule and Simpson's Rule
with, say, $n=100$ will give $0$ as their estimation of $\d{\int_a^b
f(x) \; dx}$ but where the true value of the integral is greater than
100. Try to explain what goes ``wrong'' in your example using
information about the error estimates in the text.

\bigskip

4.~Many numerical methods for definite integrals arise by looking at
what happens to simple polynomials.

\smallskip

a) Consider the equation

$$\int_0^1 f(x) \; dx = {{f(0)+f(1)}\over 2}$$

Verify that if $f(x)=A +Bx$ then this equation is correct. If
$f(x)=x^2$ then this equation is not correct.

\rightline{\sevenrm This equation leads to the Trapezoidal Rule.}

\medskip

%\def\s#1#2{{\scriptstyle #1} \over {\scriptstyle #2}} 
b) Consider the equation

$$\int_0^1 f(x) \; dx = f\!\left(\textstyle{1 \over 2}\right)$$

Verify that if $f(x)=A +Bx$ then this equation is correct. If
$f(x)=x^2$ then this equation is not correct.

\rightline{\sevenrm This equation leads to the Midpoint Rule.}

\medskip


c) Consider the equation

$$\int_0^1 f(x) \; dx = {\textstyle {1\over 3}}f(0)+{\textstyle{2\over
3}}f (\textstyle{1\over 3})$$

Verify that if $f(x)=A +Bx+Cx^2$ then this equation is correct. If
$f(x)=x^3$ then this equation is not correct.

\rightline{\sevenrm This equation leads to Radau Quadrature.}
\smallskip
Moral: Two function evaluations can get linear accuracy. One function
evaluation can get linear accuracy. But two well-chosen function
evaluations can get quadratic accuracy. If function evaluations are
difficult to get (expensive or hard to measure), then $\dots $

\bigskip


5.~Many numerical methods for definite integrals arise by looking at
what happens to simple polynomials.

\smallskip
a) Consider the equation

$$\int_0^1 f(x) \; dx = {{f(0)+4f({1\over 2}) + f(1)}\over 6}$$

Verify that if $f(x)=A +Bx+Cx^2 +Dx^3$ then this equation is correct. If
$f(x)=x^4$ then this equation is not correct.

\rightline{\sevenrm This equation leads to Simpson's Rule.}

\medskip

e) Consider the equation

$$\int_0^1 f(x) \; dx = \textstyle {1\over 2}f\!\left({\textstyle{1\over 2}
-\textstyle {1\over
{2\sqrt{3}}}}\right) +{1\over 2}f\!\left({{1\over 2} +{1\over
{2\sqrt{3}}}}\right)$$

Verify that if $f(x)=A +Bx+Cx^2+Dx^3$ then this equation is correct. If
$f(x)=x^4$ then this equation is not correct.

\rightline{\sevenrm This equation leads to Gaussian Quadrature.}

\smallskip
Moral: Three function evaluations can get cubic accuracy. The same
accuracy can be gotten from only two function evaluations, if they are
well-chosen. If function evaluations are difficult to get (expensive
or hard to measure), then $\dots $

\vfil\eject\end

% Local Variables: 
% mode: tex
% TeX-master: t
% End: 
