Skip to content

Instantly share code, notes, and snippets.

@JonnoFTW
Created November 24, 2014 11:16
Show Gist options
  • Save JonnoFTW/03401ada8c3324896b88 to your computer and use it in GitHub Desktop.
Save JonnoFTW/03401ada8c3324896b88 to your computer and use it in GitHub Desktop.
Basic template I use for LaTeX documents
\documentclass[11pt]{article}
\usepackage[english]{babel}
\usepackage{a4wide}
\usepackage[utf8]{inputenc}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage{url}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{textcomp}
\usepackage{gensymb}
\usepackage{textcomp}
\usepackage{xcolor}
\definecolor{dark-red}{rgb}{0.4,0.15,0.15}
\definecolor{dark-blue}{rgb}{0.15,0.15,0.4}
\definecolor{medium-blue}{rgb}{0,0,0.5}
\hypersetup{
colorlinks, linkcolor={black},
citecolor={dark-blue}, urlcolor={medium-blue}
}
\setcounter{tocdepth}{2}
\begin{document}
\title{Title \\ Line 1 \\ Differential Equations \\ Modelling a Pendulum}
\author{Spartacus}
\maketitle
\tableofcontents
\section{Introduction}
In this report I will work through the process of modelling the action of a pendulum using differential equations.
\section{Analysis}
The pendulum is drawn in figure \ref{pendulum}. Our end goal is to find the period of the pendulum. To do this, we must determine the sum of the forces acting on the pendulum.
\begin{figure}[ht!]
\centering
\includegraphics[width=0.5\textwidth]{Pendulum_gravity.png}
\caption{The forces acting on the pendulum \citep{wiki:pendulum_maths} \label{pendulum}}
\end{figure}
Adding up the forces gives us the second order differential equation:
\begin{align}
m l \frac{d^2\theta}{dt^2} + 10 \frac{d\theta}{dt} - mg\sin(\theta) = 0
\end{align}
We can simplify this since $sin(\theta) \approx \theta$ for small $\theta$ to get the linear ODE
\begin{align}
m l \frac{d^2\theta}{dt^2} + 10 \frac{d\theta}{dt} - mg\theta = 0
\end{align}
\bibliographystyle{agsm}
\bibliography{refs}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment