\documentclass[12pt]{article}
\usepackage{latexsym,amsmath,amssymb,amsfonts}
\usepackage[dvips]{color}
\usepackage{epsfig}


\begin{document}


\noindent Physics 567 \\ Homework 4 \\ Due Wednesday, March 27, 2024
\vspace{0.25in}


\begin{center}
\textbf{\large Chaos in a Driven Pendulum} \\
\end{center}
\vspace{0.25in}

\begin{center}
   \resizebox{1.5in}{!}{\input{pendulum.pdf_t}}
\end{center}

A massless rod of length $L$ pivots on an imperfect bearing at one end. At the other end
is  a mass $M$, with electric charge $Q$. This pendulum is at rest until time
$t=0$, when a horizontal, uniform, oscillating electric field is turned on: \[
\mathbf{E} = E_0 \hat{x} \cos(\omega t). \] The equation of motion of the
pendulum is  \[ \frac{d^2 \phi}{dt^2} = -\frac{g}{L} \sin\phi -\mu \frac{d
\phi}{dt} + \frac{Q E_0}{m L} \cos\phi\,\cos(\omega t), \] where $\mu$
represents bearing friction. 

Depending upon the frequency and amplitude of the electric field, the pendulum
will sometimes exhibit chaotic behavior. For example, try the following
parameters: \\

\begin{tabular}{r c l}
   $M$     &=&  0.0005\,kg \\
   $g$     &=&  9.81\,m\,s$^{-2}$ \\
   $\mu$    &=&  0.1\,s$^{-1}$ \\
   $L$     &=&  0.1\,m \\
   $Q$     &=&  $10^{-8}$\,C \\
   $E_0$    &=&  $10^{6}$\,V\,m$^{-1}$ \\
   $\omega$ &=& 11\,rad\,s$^{-1}$ \\
\end{tabular}

\noindent Plot $\phi(t), 0 < t < 30$\,s, using the following initial conditions:
\begin{enumerate}
\item $\phi = 0$, $\dot{\phi} = 0$,
\item $\phi = 10^{-4}$, $\dot{\phi} = 0$.
\end{enumerate}

\noindent The two trajectories are initially similar but then diverge,
indicating a strong sensitivity to initial conditions. 

Your task is now to repeat this experiment, varying $E_0$ and $\omega$ to determine the region in parameter space for which the system
shows sensitivity to initial conditions. To perform this task efficiently, you will need to develop an automatic way to identify sensitivity to initial conditions. Your search should cover the range $0 \le\omega \le 30$\,rad/s and
$0 \le E_0 \le 1.0$\,MV/m, keeping other parameters as listed in the table above.\footnote{Electric fields much greater than 1
MV/m may arc in air, bringing an abrupt end to our experiment.} Your result will be a map of the 2D parameter space, indicating the locations where chaotic behavior was detected.

Please turn in the following electronically:
\begin{itemize}
\item Your source code, with clear comments.

\item A plot of $\phi(t)$, $0 < t < 30$\,s, for initial conditions (1) and (2) on
the same axes. Use the parameters specified in the table.

\item A map delineating the chaotic region of the 2D parameter space, searched at whatever resolution you can achieve in a reasonable amount of time.\footnote{Even a $10 \times 10$ grid is adequate, but the pattern becomes more interesting at higher resolution.}

\end{itemize}
\emph{In all homework assignments, I encourage  you to make use of existing code including my examples and the built-in functions in Octave and Matlab.}

\end{document}
