\documentclass[]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
\else % if luatex or xelatex
  \ifxetex
    \usepackage{mathspec}
  \else
    \usepackage{fontspec}
  \fi
  \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\usepackage{hyperref}
\hypersetup{unicode=true,
            pdftitle={Homework 1},
            pdfborder={0 0 0},
            breaklinks=true}
\urlstyle{same}  % don't use monospace font for urls
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
}
\setlength{\emergencystretch}{3em}  % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}
% Redefines (sub)paragraphs to behave more like sections
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi

\title{Homework 1}

\input{preamble.tex}
\title{Homework}



\begin{document}
\maketitle

Please answer the following questions in complete sentences in a clearly
prepared manuscript and submit the solution by the due date on
Gradescope.

Remember that this is a graduate class. There may be elements of the
problem statements that require you to fill in appropriate assumptions.
You are also responsible for determining what evidence to include. An
answer alone is rarely sufficient, but neither is an overly verbose
description required. Use your judgement to focus your discussion on the
most interesting pieces. The answer to ``should I include `something' in
my solution?'' will almost always be: Yes, if you think it helps support
your answer. If you used an LLM on any question, you must explain what
you did with the LLM.

\subsection{Problem 0: List your
collaborators}\label{problem-0-list-your-collaborators}

Please identify anyone, whether or not they are in the class, with whom
you discussed your homework. This problem is worth 1 point, but on a
multiplicative scale.

\subsection{Problem 1: Some quick, simple
theory}\label{problem-1-some-quick-simple-theory}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\item
  What is \(1/\log(x)\) when \(x = 10^{80}\)? What is the limit of the
  sequence \(1/\log(x)\) as \(x \to \infty\)? What type of convergence
  is this?
\item
  I have a child. This individual loves to push the ``x\^{}2'' key on
  the calculator repeatedly and see what happens to the number. Let
  \(x_0\) be in \((0,1)\). What is the limit of \(x_{k+1} = x_k^2\)?
  Show that this converges quadratically.
\item
  The other button the child likes to press is \verb#sqrt#. Suppose we
  have a sequence \(x_{k+1} = \sqrt{x_k}\). Show that this sequence
  converges for all positive inputs \(x_0\). What is the rate of
  convergence.
\item
  Show, using the definition, that the sequence \(1 + k^{-k}\) converges
  superlinearly to \(1\). (To be clear, you need to use the definition
  to show superlinear convergence.)
\item
  Ask an LLM about this problem \ldots{}

  \begin{quote}
  Suppose we have a sequence \(x_{k+1} = |\log{x_k}|\). Does this
  converge for any input? For all inputs? For some? What else can you
  say about it? Are there limit points?
  \end{quote}

  Explain what the LLM tells you. Make a plot to illustrate the behavior
  of this function.
\end{enumerate}

\subsection{Problem 2: Find the
mistake!}\label{problem-2-find-the-mistake}

The following idea has a critical mistake. Explain what it is.

In class, we developed a way to solve the XKCD raptor problem for a
single direction: test a large grid of possible directions and pick the
one that is the best.

We expect the XKCD raptor problem to be continuous. If I change the
start position of the human, then the optimal angle should continuously
change. This idea suggests a strategy to solve the problem. Vary the
human starting positions over a grid, then find the optimal direction to
run for each of these starting positions. Then, when we need to find the
dynamic trajectory, we simply interpolate among these precomputed
starting positions, i.e.~just look up the nearest starting positions and
interpolate the angle to run.

\subsection{Problem 3: Angled raptors}\label{problem-3-angled-raptors}

Mr.~Munroe (the xkcd author) decided that running in a single direction
was unrealistic. Your new problem is to solve the generalized raptor
problem where you can turn twice. Once at 0.25 seconds, a second time at
0.75 seconds. Otherwise the problem is the same.

\begin{itemize}
\tightlist
\item
  Ignore all acceleration, like we did in class.
\item
  The slow raptor runs at 10 m/s
\item
  The fast raptors run at 15 m/s
\item
  You run at 6 m/s
\item
  A raptor will catch you if you are within 20 centimeters.
\item
  You can turn instantaneously.
\end{itemize}

There are two parts.

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\item
  Modify the Raptor chase example function to compute the survival time
  of a human in a raptor problem where you switch direction at 0.25
  seconds and 0.75 seconds. Show your modified function, and show the
  survival time when running directly at the slow raptor (up to time
  0.25) and then reversing your direction and running away from it.
\item
  Utilize a grid-search strategy to determine the best angles for the
  human to run to maximize the survival time. Show the angles.
\end{enumerate}

\subsection{\texorpdfstring{\textbf{OPTIONAL} Problem
4:}{OPTIONAL Problem 4:}}\label{optional-problem-4}

Work with an LLM to implement a general strategy for raptor problem that
finds the actual trajectory.

\end{document}
