\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{color}
\usepackage{graphicx}
\newcommand{\todo}[1]{\textcolor{red}{TODO: {#1}}}

\author{Andrew Mark Allen - 05370299}
\title{The Pendulum}
\begin{document}
\maketitle
\section*{Abstract}
The motion of a simple pendulum was modelled using the linear approximation of the equations of motion, valid for small angles, and using numerical methods to solve the nonlinear equations of motion, namely the trapezoid rule and fourth order Runge-Kutta method. The trajectories, suitably graphed with gnuplot, were compared, and finally the Runge-Kutta method was used to simulate a damped driven pendulum at various amplitudes of the driving force, with the phase portrait plotted again in gnuplot to show dynamical features such as period doubling and chaotic motion.
\section*{Introduction and Theory}
\subsection*{The Simple Pendulum}
From Newton's Second Law, it follows that the equation of motion for a simple pendulum in a plane is \[\frac{d^2s}{dt^2} = L\frac{d^2\theta}{dt^2} = -g\sin({\theta})\] where $L$ is the length of the string and $g\sin{\theta}$ is the downward acceleration due to gravity.

This is a non-linear equation, but can be simplified using the small angle approximation $\sin({\theta)} \approx \theta$, giving the second order differential equation \[\frac{d^2\theta}{dt^2} = -\frac{g}{L}\theta\] which can be solved to give the familiar equation for the harmonic oscillator \[\theta = A\sin({\beta t + \phi}), \beta = \sqrt{\frac{g}{L}}\]
where $A$ is the amplitude and $\phi$ is the constant phase offset.
\subsection*{Solving Second Order Differential Equations Numerically}
A second order differential equation can be solved numerically, both in the linear and non-linear cases by transforming it into two first-order equations, as shown here for the pendulum equation:
\[\frac{d\theta}{dt} = \omega\]
\[\frac{d\omega}{dt} = -\beta^2\sin({\theta})\]
\subsection*{Damped Driven Oscillator}
The model of the simple pendulum can be expanded to take into account damping and driving forces. In this case, the equation of motion is given by
\[\frac{d^2\theta}{dt^2} + k\omega + \beta^2\sin(\theta)= A\cos(\Omega t)\]
where $k$ is a damping coefficient, $A$ is the amplitude of the periodic driving force, and $\Omega$ is its angular frequency.
\subsection*{Simple Euler Method}

\subsection*{Trapezoid Rule}

\subsection*{Runge-Kutta Method}


\section*{Experimental Method}

\section*{Results and Analysis}

\section*{Discussion and Conclusion}
From the plots, it can be seen that the small angle approximation is, as its name implies, only suitable for relatively small displacements of the pendulum (less than $10\deg$ or so.) After that more suitable models are needed. The approximation was suitable for simulated the damped pendulum at small angles however, since the values eventually converged to 0 in all cases as time went on.

The Runge-Kutta method was far superior at higher displacement angles, and allowed the equation of motion for a damped driven oscillator to be solved. With this method, the motion of the oscillator could be analysed after being plotted on a phase space graph. As the amplitude of the driving force increased, the complexity of the motion could be seen to increase, as first period doubling appeared in the motion, and finally fully chaotic motion was observed.
\end{document}

%COMMENT: HOW TO INCLUDE GRAPHICS
%\begin{figure}[h!]
%\centering
%\fbox{\includegraphics[width=0.9\textwidth]{Graph2.png}}
%\caption{Plot of $y^2$ against ring number}
%\label{fig:graph2}
%\end{figure}
%The experimental results for the travelling microscope experiments are shown in Figure \ref{fig:graph1} and Figure \ref{fig:graph2}