{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# One Degree-of-Freedom (DoF) Hamiltonian Bifurcation of Equilibria"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "(ADD INTRODUCTORY LANGUAGE ABOUT PROBLEM DEVELOPMENT)\n",
    "We will now consider two examples of bifurcation of equilibria in two dimensional Hamiltonian system; in particular, the Hamiltonian saddle-node and Hamiltonian pitchfork bifurcations.  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Hamiltonian saddle-node bifurcation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We consider the Hamiltonian:\n",
    "\n",
    "\\begin{equation}\n",
    "H (q, p) = \\frac{p^2}{2} - \\lambda q + \\frac{q^3}{3}, \\quad (q, p) \\in \\mathbb{R}^2.\n",
    "\\label{eq:hamApp13}\n",
    "\\end{equation}\n",
    "\n",
    "\n",
    "where $\\lambda$ is considered to be a parameter that can be varied. From this Hamiltonian, we derive Hamilton's equations:\n",
    "\n",
    "\\begin{eqnarray}\n",
    "\\dot{q} & = & \\frac{\\partial H}{\\partial p} = p, \\nonumber \\\\\n",
    "\\dot{p} & = & -\\frac{\\partial H}{\\partial q} =\\lambda - q^2.\n",
    "\\label{eq:hamApp14}\n",
    "\\end{eqnarray}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Revealing the Phase Space Structures and their implications for Reaction Dynamics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The fixed points for \\eqref{eq:hamApp14} are:\n",
    "\n",
    "\\begin{equation}\n",
    "(q, p) = (\\pm\\sqrt{\\lambda}, 0),\n",
    "\\end{equation}\n",
    "\n",
    "\n",
    "from which it follows that there are no fixed points for $\\lambda <0$, one fixed point for $\\lambda =0$, and  two fixed points for $\\lambda >0$. This is the scenario for a saddle-node bifurcation. \n",
    "\n",
    "Next we examine the stability of the fixed points. The Jacobian of \\eqref{eq:hamApp14} is given by:\n",
    "\n",
    "\\begin{equation}\n",
    "J =\\left(\n",
    "\\begin{array}{cc} \n",
    "0 & 1\\\\\n",
    "-2 q & 0\n",
    "\\end{array}\n",
    "\\right).\n",
    "\\label{eq:hamApp15}\n",
    "\\end{equation}\n",
    "\n",
    "\n",
    "The eigenvalues of this matrix are:\n",
    "\n",
    "\\begin{equation}\n",
    "\\Lambda_{1, 2} = \\pm \\sqrt{-2q}.\n",
    "\\end{equation}\n",
    "\n",
    "\n",
    "Hence $(q, p) = (-\\sqrt{\\lambda}, 0)$ is a saddle, $(q, p) = (\\sqrt{\\lambda}, 0)$ is a center, and $(q, p) = (0, 0)$  has two zero eigenvalues. The phase portraits are shown in Fig. [fig:1](#fig:appC_fig3)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<img width=\"560\" height=\"315\" src=\"figures/ham_sn.png\">\n",
    "\n",
    "<a id=\"fig:appC_fig3\"></a>\n",
    "<figcaption style=\"text-align:center;font-size:14px\"><b>fig:1 </b><em> The phase portraits for the Hamiltonian saddle-node bifurcation.</em></figcaption><hr>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Hamiltonian pitchfork bifurcation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We consider the Hamiltonian:\n",
    "\n",
    "\\begin{equation}\n",
    "H (q, p) = \\frac{p^2}{2} - \\lambda \\frac{q^2}{2} + \\frac{q^4}{4},\n",
    "\\label{eq:hamApp16}\n",
    "\\end{equation}\n",
    "\n",
    "\n",
    "where $\\lambda$ is considered to be a parameter that can be varied. From this Hamiltonian, we derive Hamilton's equations:\n",
    "\n",
    "\\begin{eqnarray}\n",
    "\\dot{q} & = & \\frac{\\partial H}{\\partial p} = p, \\nonumber \\\\\n",
    "\\dot{p} & = & -\\frac{\\partial H}{\\partial q} =\\lambda q  -  q^3.\n",
    "\\label{eq:hamApp17}\n",
    "\\end{eqnarray}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Revealing the Phase Space Structures and their implications for Reaction Dynamics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The fixed points for \\eqref{eq:hamApp17} are:\n",
    "\n",
    "\\begin{equation}\n",
    "(q, p) = (0, 0), \\, (\\pm\\sqrt{\\lambda}, 0),\n",
    "\\end{equation}\n",
    "\n",
    "\n",
    "from which it follows that there is one fixed point  for $\\lambda \\leq 0$, and  three fixed points for $\\lambda >0$. This is the scenario for a pitchfork  bifurcation.\n",
    "\n",
    "Next we examine the stability of the fixed points. The Jacobian of \\eqref{eq:hamApp17} is given by:\n",
    "\n",
    "\\begin{equation}\n",
    "J = \\left(\n",
    "\\begin{array}{cc} \n",
    "0 & 1\\\\\n",
    "\\lambda-3q^2 & 0\n",
    "\\end{array}\n",
    "\\right).\n",
    "\\label{eq:hamApp18}\n",
    "\\end{equation}\n",
    "\n",
    "\n",
    "The eigenvalues of this matrix are:\n",
    "\n",
    "\\begin{equation}\n",
    "\\Lambda_{1, 2} = \\pm \\sqrt{\\lambda - 3q^2 }.\n",
    "\\end{equation}\n",
    "\n",
    "\n",
    "Hence $(q, p) = (0, 0)$ is a center for $\\lambda <0$, a saddle for $\\lambda >0$ and  has two zero eigenvalues for $\\lambda =0$. The fixed points $(q, p) = (\\sqrt{\\lambda}, 0)$ are centers for $\\lambda >0$. The phase portraits are shown in Fig. [fig:2](#fig:appC_fig4)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<img width=\"560\" height=\"315\" src=\"figures/ham_pitch.png\">\n",
    "\n",
    "<a id=\"fig:appC_fig4\"></a>\n",
    "<figcaption style=\"text-align:center;font-size:14px\"><b>fig:2 </b><em> The phase portraits for the Hamiltonian pitchfork bifurcation.</em></figcaption><hr>"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  },
  "latex_envs": {
   "LaTeX_envs_menu_present": true,
   "autoclose": false,
   "autocomplete": true,
   "bibliofile": "/Users/bas/research/book_sprint/champs-booksprint-planning/convert_tex2html/article_test/sample.bib",
   "cite_by": "apalike",
   "current_citInitial": 1,
   "eqLabelWithNumbers": true,
   "eqNumInitial": 1,
   "hotkeys": {
    "equation": "Ctrl-E",
    "itemize": "Ctrl-I"
   },
   "labels_anchors": false,
   "latex_user_defs": false,
   "report_style_numbering": false,
   "user_envs_cfg": false
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}