\documentclass[12pt]{article}
\usepackage{latexsym}
\usepackage{enumerate}
\usepackage{amsmath}
%\input psfig.sty
\input spec_frac
\begin{document}
\title{505 Set 3, Part A}
\author{}
\maketitle
Write a program to evaluate the following integrals using
the trapezoidal rule with uniform spacing:
\begin{enumerate}
\item $A = \int_0^1   \sqrt{x} dx = 2/3 $
\item $B = \int_0^1  \sfrac{dx}{1+x^2} = \pi/4 $
\item $C = \sfrac{1}{\pi}\int_0^\pi \cos{\left[(8\sin{x})-x\right]}dx = J_1(8) =
       0.234636347 $
\item $D = \int_0^1   \sfrac{dx}{1+\sfrac{1}{2}\sin{2\pi x}} = 1.15470054 $
\item $E = \int_0^1   e^{x^2(1-x)^2} = 1.03414105 $
\end{enumerate}
Compute tables of approximate values $A_N,\ldots,E_N$ using $N$
subintervals $N=1,2,4,8,16,32,....$ and apply Richardson
extrapolation.
Why is the simple trapezoidal rule so accurate for C and E (integrands not 
periodic)? Use high enough precision to get the results to the accuracy
specified. Explain carefully your findings for all cases. Which case 
conforms most closely with your expectations? Why?
\end{document}
