         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
         % Information sheet for the Matlab lab - Maths 6111 %
         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[10pt]{article} 
\input ma_no_html_header

\usepackage{color}
\usepackage{hyperref}
\hypersetup{breaklinks=true,colorlinks=true}
%\input ma_header
\setlength{\parindent}{0pt}
\pagestyle{myheadings}
% \markright{
% \protect {\protect \epsfxsize=0.2 true cm \protect \epsffile {dolph.line.eps}}
% \it Maths 3018/6111 - Numerical methods \hfill}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\thispagestyle{empty}
\begin{center}
\textbf{\Large Maths 3018/6111 - Numerical Methods \\*[8mm]
Worksheet 3}\\*[.8cm]
\end{center}

\section*{Theory}

\begin{enumerate}
\item Apply Simpson's rule to compute
  \begin{equation*}
    \int_0^{\pi/2} \cos(x) \, dx
  \end{equation*}
  using 3 points (so $h = \pi / 4$) and 5 points (so $h = \pi / 8$).
\item Apply Richardson extrapolation to the result above; does the
  answer improve?
\item State the rate of convergence of the trapezoidal rule and
  Simpson's rule, and sketch (or explain in words) the proof.
\item Explain in words adaptive and Gaussian quadrature, in particular
  the aims of each and the times when one or the other is more useful.
\item{} [3018 only] Show how the speed of convergence of a nonlinear
  root finding method depends on the derivatives of the map $g(x)$
  near the fixed point $s$.
\item{} [3018 only] Use Newton's method to find the root in $[0,1]$ of
  \begin{equation*}
    f(x) = \sin(x) - e^x + 0.9 + x.
  \end{equation*}
  Start from $x_0=1/2$ and retain 3 significant figures. Take 3 steps.
\end{enumerate}

\section*{Coding}

\begin{enumerate}
\item Write a single function that, depending on an options argument,
  computes the integral of an input function $f(x)$ between the input
  arguments $a, b$, using either
  \begin{enumerate}
  \item Simpson's rule, 3 points
  \item Trapezoidal rule, 3 points
  \item Gaussian Quadrature, 3 nodes.
  \end{enumerate}
  Test your code on
  \begin{align*}
    \int_0^1 \sin^2 (\pi x) \, dx & = \tfrac{1}{2}, \\
    \int_0^1 e^{-x} \sinh(x) \, dx & \simeq 0.283833821 \\
    \int_0^1 \frac{1}{\sqrt{x}} \, dx & = 2.
  \end{align*}
  Note that there are good reasons for some of the methods to fail on
  the final test!
\item {} [3018 only] Implement the secant method to find the root of
  \begin{equation*}
    f(x) = \tan x - e^{-x}, \quad x \in [0,1].
  \end{equation*}
\end{enumerate}

\end{document}

