\documentclass[11pt]{article}
\usepackage{calc}
\usepackage{url}
\usepackage[margin=1.2in]{geometry}
\usepackage{setspace}
\usepackage{lmodern}
\usepackage{amsmath,amsthm,amssymb,fancybox,ifthen,float}
\usepackage{bm}
\usepackage{color}
\usepackage{parskip}
\usepackage{comment}
\usepackage{isomath}
\usepackage{lastpage}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[L]{\small \bfseries \sffamily Spring 2020 MA-UY 4424}
\fancyhead[C]{\small \bfseries \sffamily NYU Tandon}
\fancyhead[R]{\small \bfseries \sffamily Prof. M. O'Neil}
\fancyfoot[C]{\thepage\ of \pageref{LastPage}}
\usepackage{parskip}
%%%%\onehalfspacing
\newcommand{\matlab}{\textsc{Matlab}}
\newcommand{\vct}[1]{\bm{\mathsf{#1}}}
\newcommand{\pvct}[1]{\bm{#1}}
\newcommand{\mtx}[1]{\bm{\mathsf{#1}}}
\newcommand{\entry}[1]{{\mathsf{#1}}}
\newcommand{\mtb}[1]{\bm{\mathcal{#1}}}
\newcommand\horline{\begin{center}\line(1,0){250}\end{center}}
\begin{document}
\Large
%\noindent
\begin{center}
{\bfseries \sffamily Homework 1}\\
\vspace{\baselineskip}
\normalsize
Due: Tuesday 2:00pm, February 18, 2020, in class
\end{center}
\normalsize
\vspace{.25in}
\horline
Notes on the first (and all subsequent) assignments:
\textbf{\sffamily Submission}: Homework assignments must be submitted in the
class on the due date. If you cannot attend the class, please send
your solution per email as a single PDF before class. Please hand in
cleanly handwritten or typed (preferably with LaTeX) homework. Feel
free to use original homework LaTeX document to write-up your homework. If
you are required to hand in code or code listings, this will
explicitly be stated on that homework assignment.
\textbf{\sffamily Collaboration}: NYU’s integrity policies will be enforced. You
are encouraged to discuss the problems with other students.
However, you must write (i.e. type) every line of
code yourself and also write up your solutions independently. Copying
of any portion of someone else’s solution/code or allowing others to
copy your solution/code is considered cheating.
\textbf{\sffamily Plotting and formatting}: Plot figures carefully and think
about what you want to illustrate with a plot. Choose proper ranges
and scales (e.g. semilogx, semilogy, loglog), always label axes, and give
meaningful titles. Sometimes, using a table can be useful, but never
submit pages of numbers. Discuss what we can observe in, and learn from,
a plot. If you do print numbers, in MATLAB for example, use
\texttt{fprintf} to format the output nicely. Use \texttt{format
compact} and other format commands to control how MATLAB prints
things. When you create figures using MATLAB (or Python or Julia),
please try to export them in a vector graphics format (.eps, .pdf,
.dxf) rather than raster graphics or bitmaps (.jpg, .png, .gif,
.tif). Vector graphics-based plots avoid pixelation and thus look much
cleaner.
\textbf{\sffamily Programming}: This is an essential part of this
class. We will use MATLAB for demonstration purposes in class, but you
are free to use other languages. The TA will give an introduction to
MATLAB in the first few recitation classes. Please use meaningful
variable names, try to write clean, concise and easy-to-read code. As
detailed in the syllabus, in order to receive full credit, your code
must be thoroughly commented.
\horline
\begin{enumerate}
\item \textbf{[10pts]} In this problem, you will write a code that
will find all of the roots of the function $f(x) = x^5 - 3x^2 +1$
inside the interval $[-2,2]$. For each part, please submit a
print-out of your code along with the values you obtain for the roots.
\begin{enumerate}
\item Using the fact that the roots of $f$ on this interval are
separated by at least $0.25$, write a program that implements
the bisection algorithm to obtain estimates of the roots that
are accurate to within $0.1$.
\item Using the estimates of the roots obtained in the previous
part, write a program that implements Newton's method to
refine the values of the roots such that the difference
between successive iterates is at most $10^{-12}$.
\end{enumerate}
\item \textbf{[10pts]} Let the function $f$ be twice continuously
differentiable in a neighborhood of $\xi$ (meaning that $f$, $f'$,
and $f''$ are all continuous in a neighborhood of
$\xi$). Furthermore, let $f(\xi) = f'(\xi) = 0$ and
$f''(\xi) > 0$. The function $f$ is said to have a double root.
\begin{enumerate}
\item At what rate do you expect Newton' method to converge?
\item Write a program to verify your estimated convergence rate
for the function \mbox{$f(x) = (x-0.5)^2$}, starting with the
initial guess $x_0 = 0.25$. Turn in your code, as well as a
table of values output by Newton's method.
\item Re-run your program, except this time on the function
$f(x) = x^3 - 1$. Use the starting value $x_0 = 0.5$. Turn in
your code, as well as a table of values output by Newton's method.
\end{enumerate}
\item \textbf{[10pts]} In this problem, you will prove the rate of
convergence for the secant method.
\begin{enumerate}
\item Show that the secant method
\[
x_{k+1} = x_k - \frac{x_k-x_{k-1}}{f(x_k) - f(x_{k-1})} f(x_k)
\]
can be rewritten in the form:
\begin{equation}\label{eq_secant}
x_{k+1} = \frac{x_k f(x_{k-1}) - x_{k-1} f(x_k)}
{f(x_{k-1}) - f(x_k)}.
\end{equation}
\item Now, denote the root of $f$ to be $\xi$, so that $f(\xi) =
0$. Also assume that $f$ is twice continuously differentiable
and that $f'>0$ and $f''>0$ in a neighborhood of $\xi$. Define
the quantity $\varphi$ to be:
\[
\varphi(x_k,x_{k-1}) = \frac{x_{k+1} - \xi}{(x_k-\xi)(x_{k-1}-\xi)},
\]
where $x_{k+1}$ is as in~\eqref{eq_secant}. Compute (for fixed
value of $x_{k-1}$)
\[
\psi(x_{k-1}) = \lim_{x_k \to \xi} \varphi(x_k,x_{k-1}).
\]
\item Now compute
\[
\lim_{x_{k-1} \to \xi} \psi(x_{k-1}),
\]
and therefore show that
\[
\lim_{x_k, x_{k-1} \to \xi} \, \varphi(x_k,x_{k-1}) =
\frac{f''(\xi)}{2f'(\xi)}.
\]
\item Next, assume that the secant method has convergence order
$q$, that is to say that
\[
\lim_{k\to \infty} \frac{|x_{k+1} - \xi|}{|x_k - \xi|^q} = A <\infty.
\]
Using the above results, show that $q-1-1/q = 0$, and therefore
that \mbox{$q = (1+\sqrt{5})/2$}.
\item Finally, show that this implies that
\[
\lim_{k\to \infty} \frac{|x_{k+1} - \xi|}{|x_k - \xi|^q} =
\left( \frac{f''(\xi)}{2f'(\xi)} \right)^{q/(1+q)}.
\]
\end{enumerate}
\item \textbf{[10pts]} Let the function $f$ be continuously
differentiable on the interval $[a,b]$. Furthermore, let its
derivative $f'$ satisfy $f' < 1$. Does this imply that $f$ is a
contraction on $[a,b]$? If so, prove it.
\item \textbf{[10pts]} The behavior of fixed point iterations lead
to some of the first examples encountered when studying chaotic
systems. Consider the \emph{tent map} on the interval $[0,1]$:
\[
f(x) = a(0.5 - | x - 0.5| ), \text{with } a\in (0,2].
\]
\begin{enumerate}
\item How many fixed points does $f$ have on the interval
$[0,1]$? What are they (in terms of $a$)?
\item Are they stable? Unstable?
\item For $a=2$, make a table of the first 10 iterates
$x_{k+1} = f(x_k)$ for two starting values: $x_0 = 0.399$ and
$x_0 = 0.400$. What is happening?
\item Can you explain the behavior of this iteration using any
of the techniques learned in class or in the textbook?
\end{enumerate}
\end{enumerate}
\end{document}