\documentclass[10pt]{article}
 
\usepackage[margin=1in]{geometry} 
\usepackage{amsmath,amsthm,amssymb, graphicx, multicol, array, mathtools}
\usepackage{fancyhdr}
 
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\myeq}{\stackrel{\mathclap{\normalfont\mbox{def}}}{=}}

\usepackage{color}
\usepackage[colorlinks=true, urlcolor=cyan]{hyperref}
\usepackage{soul}

 
\pagestyle{fancy}
\fancyhf{}
\lhead{Your name}
\rhead{Student ID}
\rfoot{Page \thepage}

\newenvironment{problem}[2][Problem]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}\hskip \labelsep {\bfseries #2.}]}{\end{trivlist}}

\begin{document}

\date{}
\title{Problem Set 5 - Due December 02, at 11:59pm}
\author{[Your name] and [student ID]\\
MATB44H3-2019}
\maketitle

\begin{problem}{1 (25 points)}
For each of the following systems, find the fixed points, and draw a plausible phase portrait with the correct behavior near the fixed points. Where applicable, you should draw some conjectured solutions under the influence of the behavior near multiple fixed points.
\begin{enumerate}
    \item [(a)]
$\dot{x} = x - y, \qquad \dot{y} = 1 -e^x
$
    \item [(b)] 
$\dot{x} = x(x^2 - y + 1), \qquad \dot{y} = y(x - y -1)
$
    \item [(c)] 
$\dot{x} = x(2 - x - y), \qquad \dot{y} = x - y
$
\end{enumerate}


\end{problem}
\begin{proof}[Solution]
Collaborators: Donald Duck and Mickey Mouse
\end{proof}

\newpage
 
\begin{problem}{2 (28 points)}
Solve the given difference equations in terms of  the initial value $y_0$. Describe the behavior as $n \to \infty$.
\begin{enumerate}
\item[(a)]
$y_{n+1} = -0.8y_n$
\item[(b)]
$y_{n+1} = \sqrt{\frac{n+3}{n+1}} \cdot y_n$
\item[(c)]
$y_{n+1} = (-1)^{n+1}y_n$

\item[(d)]
$y_{n+1} = -0.5y_n + 6$


\end{enumerate}
\end{problem}


\begin{proof}[Solution]
Collaborators: Mark Watney
\end{proof}


\newpage
 
\begin{problem}{3 (22 points)}
A homebuyer takes out a mortage of \$100,000 with an interest rate of 12\% per year, compounded monthly (i.e. 1\% per month). What monthly payment is required to pay off the loan in 30 years? In 20 years? What is the total amount paid during the term of the loan in each of these cases?

\end{problem}

\begin{proof}[Solution]
Collaborators: Gordon Gekko
\end{proof}

\newpage

\begin{problem}{4 (25 points + 5 points bonus (total 30))}
Suppose $a_0 = 0$, $a_1 = 2$, and $a_{n+2} = 4a_{n+1} - 4a_n + n^2 - 5n + 2$. Show that $n$ divides $a_n$ for all $n \ge 1$.

\st{Note: this is a very difficult problem---more difficult than the other problems, which is why there are 5 bonus points associated with it. You may wish to begin by re-indexing, so that $a_0 = a_1 = 0$, and you may have to differentiate the appropriate power series to solve this problem. Additionally, it might help you spot the pattern if you first compute out the first several terms of the series.}

The above hint actually isn't helpful. Reindexing is nontrivial to do correctly. You should directly solve the problem. Alternately, I will also accept if you solve the following modified problem instead:

Suppose $a_0 = 0$, $a_1 = 0$, and $a_{n+2} = 4a_{n+1} - 4a_n + n^2 - 5n + 2$. Using generating functions, show that $n+1$ divides $a_n$ for all $n \ge 2$.

\end{problem}
\begin{proof}[Solution]
Collaborators: No one.
\end{proof}

\newpage 
\begin{problem}{5 (Super Bonus. 1000 points. No partial credit)}
Consider the following recurrence relation:
\[
{\displaystyle a_{n+1}={\begin{cases}{\frac {a_n}{2}}&{\text{if }} a_n \textrm{ is even}\\[4px]3a_n+1&{\text{if $a_n$ is odd}} .\end{cases}}}.
\]
Prove that for any positive integer $a_0$, $a_N = 1$ for some positive integer $N$. i.e. at some point, the sequence $a_n$ reaches the value 1.
\end{problem}
\begin{proof}[Solution]
Collaborators: \href{https://en.wikipedia.org/wiki/Lothar\_Collatz}{Lothar Collatz.}
\end{proof}



\end{document}
