\documentclass[12pt]{article}
\usepackage{fullpage,amsmath,amsfonts}

\def\d{{\mathrm d}}

\begin{document}

\title{Nonlinear Dynamics Lab}
\author{Session 2 and 3}
\date{due February 18, 2013}
\maketitle

\begin{enumerate}

\item Consider the logistic map
\[
  x_{i+1} = r \, x_i \, (1-x_i) 
\]
Write a program to plot the bifurcation diagram in the range $r \in
[2,4]$. 

\emph{Hints:}
\begin{itemize}
\item Use vectorized code to compute the iterates for \emph{all}
values of $r$ simultaneously. 

\item Divide the $x$-interval $[0,1]$ into some number of bins and
keep a count of the number of times each bin is visited by the
trajectory.

\item To ensure that your trajectory is sufficiently close to the
asymptotic state, you need to compute some number of
pre-iterations---iterations of the logistic map which are not included
into the bin count.  The initial value will not matter.  For example,
$x_0=\tfrac12$ will do just fine.

\item Use \texttt{imshow} to display the histogram so created as an
image. 

\end{itemize}

\item Estimate the capacity dimension of the logistic map
\[
  x_{n+1} = r \, x_n \, (1-x_n)
\]
at the critical value of the bifurcation parameter $r=3.569945672$.  

\emph{Hints:} 

\begin{itemize}
\item The capacity dimension is defined as
\[
  d_{\text{capacity}} = \lim_{\varepsilon \to 0} 
  \frac{\log N(\varepsilon)}{\log \varepsilon} \,,
\]
where $\varepsilon$ is the size of each bin from the previous exercise
and $N(\varepsilon)$ is the total number of bins which have a nonzero
bin count for a given bin size $\varepsilon$.

However, this limit is not accessible computationally.  Instead,
create a doubly logarithmic plot (use \texttt{loglog} for plotting) so
that the capacity dimension arises as the slope of the region of the
graph in which you can see a clear linear dependence between $\log
\varepsilon$ and $\log N(\varepsilon)$.

\item The most efficient way to find $N(\varepsilon)$ for varying
values of epsilon is to first compute the bin-counts as in Exercise 1
on the finest level with $N_{\text{bins}} = 2^k$ for some integer $k$,
then obtain bin-counts at successively coarser scales by repeated
pairwise adding of the bin-counts of neighboring bins.
\end{itemize}

\item After you have found computational parameters so that you can
compute the capacity dimension at the critical parameter in a stable
manner, extend your code so that it computes the capacity without user
intervention.  Plot the capacity dimension as a function of $r$ for
values of $r$ around the critical value.

\end{enumerate}

You should submit by the deadline:  
\begin{itemize}
\item For Exercise~1, the program code electronically.  The program
code must be runnable and produce the requested output without further
user intervention.

\item For Exercise~2, the code as well as the doubly logarithmic plot
together with a very brief discussion of how you extracted the fractal
dimension from the plot.

\item For Exercise~3, the program code which must be runnable and
produce the requested output without further user intervention.
Moreover, you must briefly explain the choice of computational
parameters (maximal number of bins, smallest value of $\varepsilon$
chosen, number of pre-iterations, number of iterations, and other
potentially relevant choices).  Discuss the sensitivity of your result
on the choice of these computational parameters.
\end{itemize}
\end{document}

