\documentclass[10pt]{report}

\usepackage{subcaption} % for subfigures
\usepackage{amsthm} % for QED
%\usepackage{algpseudocode} % for pseudo-code
\usepackage{mathtools} % for delimiter

\usepackage{listings} % for code
\lstset
{
	language=Matlab,
	frame=single,
	basicstyle=\footnotesize,
	captionpos=b,
	numbers=left,
	stepnumber=1,
	showstringspaces=false,
	tabsize=4,
	breaklines=true,
	breakatwhitespace=false,
}

\usepackage{siunitx} % for scientific notation
% for `e' in scientific notation
\sisetup{output-exponent-marker=\ensuremath{\mathrm{e}}}

\usepackage{float} % for figure [H]
\usepackage{booktabs} % for tabular
\usepackage{caption} % for \caption*
\usepackage[export]{adjustbox} % for valign=t
\usepackage{array} % for column type m
\usepackage{verbatim}
\usepackage{graphicx}
\graphicspath{ {imgs/} }
\usepackage{fancyhdr}
\usepackage{amssymb}
\usepackage{amsmath}

%%%%%% Pagination
\setlength{\topmargin}{-.3 in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\textheight}{9.in}
\setlength{\textwidth}{6.5in}

%Title page
\newcommand{\hwTitle}{Homework \#4}
\newcommand{\hwCourse}{Numerical Differential Equations/Computational Mathematics II}
\newcommand{\hmwkClassInstructor}{Professor Shuwang Li}

\title{
	\vspace{2in}
	\textmd{\textbf{\hwCourse\\\hwTitle}}\\
	\vspace{0.3in}\large{\textit{\hmwkClassInstructor}}
	\vspace{3in}
}

%\title{Homework 1}
\author{\textbf{Zhihao Ai}}
\date{}

%Header setting. 
\pagestyle{fancy}
\fancyhead[L]{Zhihao Ai}
\fancyhead[C]{Math 478}
\fancyhead[R]{Homework 4}
%%%%%%

%Global setting.
%\everymath{\displaystyle}
\setlength\parindent{0pt}

%Custom general commands.
\newcommand{\ds}{\displaystyle}
\newcommand{\ts}{\textstyle}
\newcommand{\f}[1] {f\left(#1\right)}
\newcommand{\eva}[2] {\left. #1 \right|_{#2}}
\newcommand{\dintt}[4] {\int_{#1}^{#2} #3 d#4}

\newcolumntype{N}{ >$ c <$}
\newcolumntype{M}[1]{>{\centering\arraybackslash $}m{#1}<{$}}

\newcommand{\abs}[1] {\left| #1 \right|}

\DeclarePairedDelimiter\autoparen{(}{)}
\newcommand{\pa}[1]{\autoparen*{#1}}
\DeclarePairedDelimiter\autodvert{\Vert}{\Vert}
\newcommand{\norm}[1]{\autodvert*{#1}}

\begin{document}

\maketitle

\section*{Question 1}
% Fundamental concepts on multistep methods.
\begin{enumerate}
	\item 
	(Problem 2.1) Derive explicitly the three-step and four-step Adams-Moulton methods and the three-step Adams-Bashforth method.
	
	Three-step Adams-Moulton:
	\begin{align*}
		b_3 &= \dintt{t_{n+2}}{t_{n+3}}{
			\frac{ (t-t_{n})(t-t_{n+1})(t-t_{n+2}) }{ (3h)(2h)(h) }}{t}
		= \frac{3}{8}h\\
		b_2 &= \dintt{t_{n+2}}{t_{n+3}}{
			\frac{ (t-t_{n})(t-t_{n+1})(t-t_{n+3}) }{ (2h)(h)(-h) }}{t}
		= \frac{19}{24}h\\
		b_1 &= \dintt{t_{n+2}}{t_{n+3}}{
			\frac{ (t-t_{n})(t-t_{n+2})(t-t_{n+3}) }{ (h)(-h)(-2h) }}{t}
		= -\frac{5}{24}h\\
		b_0 &= \dintt{t_{n+2}}{t_{n+3}}{
			\frac{ (t-t_{n})(t-t_{n+1})(t-t_{n+2}) }{ (3h)(2h)(h) }}{t}
		= \frac{1}{24}h
	\end{align*}
	Therefore, the three-step Adams-Moulton method is
	\[
	y_{n+3} = y_{n+2} + h \pa{\frac{3}{8} f(t_{n+3},y_{n+3}) + \frac{19}{24} f(t_{n+2},y_{n+2}) - \frac{5}{24} f(t_{n+1},y_{n+1}) + \frac{1}{24} f(t_n,y_n)}
	\]
	Four-step Adams-Moulton:
	\begin{align*}
	b_4 &= \dintt{t_{n+3}}{t_{n+4}}{
		\frac{ (t-t_{n})(t-t_{n+1})(t-t_{n+2})(t-t_{n+3}) }{ (4h)(3h)(2h)(h) }}{t}
	= \frac{251}{720}h\\
	b_3 &= \dintt{t_{n+3}}{t_{n+4}}{
		\frac{ (t-t_{n})(t-t_{n+1})(t-t_{n+2})(t-t_{n+4}) }{ (3h)(2h)(h)(-h) }}{t}
	= \frac{323}{360}h\\
	b_2 &= \dintt{t_{n+3}}{t_{n+4}}{
		\frac{ (t-t_{n})(t-t_{n+1})(t-t_{n+3})(t-t_{n+4}) }{ (2h)(h)(-h)(-2h) }}{t}
	= -\frac{11}{30}h\\
	b_1 &= \dintt{t_{n+3}}{t_{n+4}}{
		\frac{ (t-t_{n})(t-t_{n+2})(t-t_{n+3})(t-t_{n+4}) }{ (h)(-h)(-2h)(-3h) }}{t}
	= \frac{53}{360}h\\
	b_2 &= \dintt{t_{n+3}}{t_{n+4}}{
		\frac{ (t-t_{n+1})(t-t_{n+2})(t-t_{n+3})(t-t_{n+4}) }{ (-h)(-2h)(-3h)(-4h) }}{t}
	= -\frac{19}{720}h
	\end{align*}
	Therefore, the four-step Adams-Moulton method is
	\begin{multline*}
	y_{n+4} = y_{n+3} + h \left( \frac{251}{720} f(t_{n+4},y_{n+4}) + \frac{323}{360} f(t_{n+3},y_{n+3}) - \frac{11}{30} f(t_{n+2},y_{n+2}) \right.\\
	\left. + \frac{53}{360} f(t_{n+1},y_{n+1}) - \frac{19}{720} f(t_n,y_n) \right)
	\end{multline*}
	Three-step Adams-Bashforth:
	\begin{align*}
	b_2 &= \dintt{t_{n+2}}{t_{n+3}}{
		\frac{ (t-t_{n})(t-t_{n+1}) }{ (2h)(h) }}{t}
	= \frac{23}{12}h\\
	b_1 &= \dintt{t_{n+2}}{t_{n+3}}{
		\frac{ (t-t_{n})(t-t_{n+2}) }{ (h)(-h) }}{t}
	= -\frac{4}{3}h\\
	b_0 &= \dintt{t_{n+2}}{t_{n+3}}{
		\frac{ (t-t_{n})(t-t_{n+1}) }{ (2h)(h) }}{t}
	= \frac{5}{12}h
	\end{align*}
	Therefore, the three-step Adams-Bashforth method is
	\[
	y_{n+3} = y_{n+2} + h \pa{\frac{23}{12} f(t_{n+2},y_{n+2}) - \frac{4}{3} f(t_{n+1},y_{n+1}) + \frac{5}{12} f(t_n,y_n)}
	\]
	
	\item 
	(Problem 2.4) Determine the order of the three-step method
	\[
	y_{n+3} - y_n = h\left[\frac{3}{8}f(t_{n+3}, y_{n+3})+ \frac{9}{8}f(t_{n+2}, y_{n+2}) + \frac{9}{8}f(t_{n+1}, y_{n+1}) + \frac{3}{8}f(t_{n}, y_{n})\right]
	\]
	the \textit{three-eighths} scheme. Is it convergent?
	
	The method can be characterized in terms of the polynomials
	\[
	\rho(w) = w^3 - 1, \sigma(w) = \frac{3}{8}w^3 + \frac{9}{8}w^2 + \frac{9}{8}w + \frac{3}{8} = \frac{3}{8}(w+1)^3
	\]
	Let $w = \xi + 1$,
	\begin{align*}
	\rho(w) - \sigma(w) \ln{w}
	&=(\xi + 1)^3 - 1 - \frac{3}{8}(\xi+2)^3 \ln(\xi + 1) \\
	&=(\xi + 1)^3 - 1 - \frac{3}{8}(\xi+2)^3 (\xi - \frac{\xi^2}{2} + \frac{\xi^3}{3} - \frac{\xi^4}{4} + O(h^5))\\
	&=\frac{9}{16}\xi^5 + \frac{7}{16}\xi^6 + \frac{3}{32}\xi^7 + O(\xi^5)\\
	&=\frac{9}{16}(w-1)^5 + \frac{7}{16}(w-1)^6 + \frac{3}{32}(w-1)^7 + O((w-1)^5)
	\end{align*}
	Thus, the order of the \textit{three-eighths} scheme is 4. Since the roots of $\rho(w) = w^3 - 1$ all reside in the closed complex unit disc and are all simple roots, it satisfies the root condition. Therefore, it's convergent.
	
	\item 
	(Problem 2.8) Find the explicit form of the BDF for $s = 4$.
	\begin{align*}
	\beta &= \pa{\sum_{m=1}^{4} \frac{1}{m}}^{-1} = \frac{12}{25}\\
	\rho(w) &= \beta \sum_{m=1}^{4} \frac{1}{m} w^{4-m}(w-1)^m = w^4 - \frac{48}{25}w^3 + \frac{36}{25}w^2 - \frac{16}{25}w + \frac{3}{25}
	\end{align*}
	Therefore, the BDF for $s = 4$ is
	\[
	y_{n+4} - \frac{48}{25}y_{n+3} + \frac{36}{25}y_{n+2} - \frac{16}{25}y_{n+1} + \frac{3}{25}y_{n} = \frac{12}{25}hf(t_{n+4}, y_{n+4})
	\]
\end{enumerate}

\end{document}


