\documentclass[11pt,subeqn]{article}
\usepackage[letterpaper,margin=1.5in]{geometry}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage[textsize=scriptsize,textwidth=1.25in,backgroundcolor=green!40,linecolor=blue!80,bordercolor=blue!80]{todonotes}

\title{Laser Model -- Final Report}
\author{Danny Caballero, Steve Pollock}
\date{\today}

\begin{document}
\maketitle
\todo{Our sample report appears long, but it really is not. There are three reasons for its apparent length: (1) The margins have been increased to accommodate annotations like these, (2) we worked out a lot of algebra inline ($\sim$3 pages), and (3) figures take up a lot of space ($\sim$4 pages). These annotation boxes are meant to help you decide what goes into your final report.}

\begin{abstract}
We modeled a pair of coupled differential equations that represent a simple mathematical model for a laser. 
The model is nonlinear, but can be investigated both using analytic and numerical methods. 
We describe this model in detail connecting each variable in the model to the physics it controls/describes. 
We found fixed points (i.e., critical points) for this system and have determined their stability. 
This system appears to have a number of variables that control the stability, but by non-dimensionalizing the model, we have found that a certain ratio of these parameters control lasing of the system. 
We have plotted interesting results from the analytics and modeled particular trajectories of the system. 
\end{abstract}
\todo{An abstract or summary is nice, but not necessary. It helps the reader figure out the point of your project. It also provides you with a nice summary of what you did.}

%\section*{Outline}
%
%\begin{enumerate}
%
%\item Describe the physics of lasers and the mathematical model
%\item Find solutions to special cases where at least some of our variables are not changing with time any more ($d/dt = 0$, called ``fixed points")
%\item Find fixed (critical) points and characterize their stability
%\item Discuss simplifications (i.e., the quasi-static approximation) of the model
%\item Qualitatively discuss lasing given by the stability of certain points
%\item Model the system numerical and discuss how lasing occurs in this model
%
%\end{enumerate}

\section{Introduction}

\subsection{How do lasers work?}
Most lasers work on the principle of an ``inverted population''. 
\todo{In this section, we have tried to explain/motivate the model that we are going to work with. You might notice this is the exact text from our progress report. That's OK!}
That is, atoms in the laser system a ``pumped" into an excited state. The resulting decay of those atoms to a lower state produces photons at a particular wavelength. The atoms in a laser system are typically immersed in a ``gain medium". The photons that are emitted bounce between two mirrors on either end of the gain medium, causing further stimulated emission which amplifies (increases power) the output. One of the mirrors is partially transparent so that some photons escape. These photons are of a single wavelength and coherent (roughly, the same phase).

\subsection{The laser model}
\todo{We are simply presenting the model that we are going to work with. Notice, we have cited where it came from.}
Milonni and Eberly \cite{lasers1988} proposed a mathematical model for laser dynamics that takes into account both the number of laser photons ($n$) and excited atoms ($N$):

\begin{subequations}
\begin{equation}
\frac{dn}{dt} = GnN - kn,
\label{eqn:ndot}
\end{equation}
\begin{equation}
\frac{dN}{dt} = -GnN - fN+p.
\label{eqn:Ndot}
\end{equation}
\label{eqn:lasermodel2}
\end{subequations}

In this model, there are $N$ excited atoms in the system which can produce the $n$ laser photons. 
\todo{This section of text is very important. It provides the explanation of the model. We are attempting to make sense of the model and connect it back to the physics. Notice, we haven't performed any calculations yet. We are simply illustrating that we understand some of the details of the model that we have chosen to work with.}
The number of laser photons ($n$) increases when there are more excited atoms ($N$) and more laser photons ($n$) available to excite those atoms. Moreover, the gain coefficient, $G$, for the medium controls how effective these photons are in exciting more atoms and thus creating more photons. This is the first term in Eq. 1, $GnN$. The number of photons ($n$) decreases as photons leave the system at a rate $k$; this is proportional to the number of laser photons in the system ($n$). This is the second term in Eq. 1, $-kn$. As more photons are emitted by atoms, fewer atoms are excited; the rate at which this happens is proportional to the number of excited atoms ($N$) and the efficiency of the medium ($G$). This is the first term in Eq. 2, $-GnN$. The number of excited atoms ($N$) also drops as atoms emit photons at a rate $f$; again, this is also proportional to the number of excited atoms ($N$). This is the second term in Eq. 2, $-fN$. Finally, the number of excited atoms ($N$) increases as the pumping of energy into the system increases, $p$. This is the final term in Eq. 2, $p$.


We can consider the limit when the rate of excited atom production is much ``slower'' than the production of laser photons. 
\todo{This section still contains more sense-making. We are attempting to motivate a simpler model, by consider a particular limit. Notice, that we don't actually take the limit and perform the mathematics until we have explained the physics behind taking this limit.}
This might seem like a counter intuitive limit, how can excited atom production be slower than the the production of laser photons. In fact, what we are saying is that laser photons stay in the system for a much longer time than atoms are excited. That is, atoms quickly drop down and release a photon which stays in the cavity of a long time. This limit is $\frac{k}{f} \ll 1$, that its the decay rate of photons due to scattering and mirror transmission is much smaller than the rate of spontaneous emission. This limit is effectively taking $\dot{N} \approx 0$ because atoms are not excited ``long enough'' to be counted compared to the photons they produce \cite{strogatz1994nonlinear}. In the quasi-static limit, when $\dot{N}$ is small compared to $\dot{n}$, the model reduces to a single non-linear differential equation,

\todo{We chose to enumerate only final equations. Later, you will see that we have performed some algebra inline. You can do this, or turn in separate calculations.}
\begin{displaymath}
\frac{dN}{dt} = 0 = -GnN - fN+p \longrightarrow N= \frac{p}{Gn+f}
\end{displaymath}

\begin{equation}
\frac{dn}{dt} = Gn \left(\frac{p}{Gn+f}\right) - kn 
\label{eqn:lasermodel1}
\end{equation}


%\begin{equation}
%\frac{dn}{dt} = k \left(\frac{p}{k} - \frac{f}{G} -n\right)\frac{Gn}{f+Gn}.
%\end{equation}

\subsection{Non-dimensionalizing the laser model}

Equations \ref{eqn:lasermodel2} and \ref{eqn:lasermodel1} are mathematical models of a laser that have explicit units (e.g., $f$ has units of atoms/second). 
\todo{We chose to non-dimensionalize our model and this section provides the motivation for that work. You are certainly free to maintain dimensions in your model. In that case, you might discuss typical parameter values for the model your are working with.}
Often, it makes sense to remove the units from these models in a process called, ``non-dimenionalization''. This produces a mathematical model which has fundamentally the same dynamics as the model with dimensions. However, a non-dimensional model is often easier to work with because the number of parameters is typically reduced (i.e., parameters tend to form dimensionless ratios) \cite{strogatz1994nonlinear}.

\subsubsection{The one-dimensional model}
We begin by non-dimensionalizing equation \ref{eqn:lasermodel1} because it is a single differential equation. 
\todo{This is how you non-dimensionalize most equations, in general. As you might notice, we have worked out the algebra in detail. This is for your benefit; should you chose to non-dimensionalize your own model.}
Equation \ref{eqn:lasermodel1} has a single independent variable $t$ and a single dependent variable $n$. We propose two critical numbers ($t_c$ and $n_c$) which will yield dimensionless variables ($\tau = t/t_c$ and $x=n/n_c$). We plug these definitions into equation \ref{eqn:lasermodel1} and obtain

\begin{displaymath}
\frac{n_c}{t_c}\frac{dx}{d\tau} = Gxn_c\left(\frac{p}{Gxn_c+f}\right)-kxn_c.
\end{displaymath}

If we divide this equation by $n_c$ and multiply by $t_c$ the resulting equation is dimensionless,

\begin{displaymath}
\frac{dx}{d\tau} = Gxt_c\left(\frac{p}{Gxn_c+f}\right)-kxt_c.
\end{displaymath}

We choose $t_c=1/k$ to simplify the second term to a single non-dimensional variable,

\begin{displaymath}
\frac{dx}{d\tau} = \frac{Gx}{k}\left(\frac{p}{Gxn_c+f}\right)-x.
\end{displaymath}

We also divide out an $f$ from the denominator to ensure it is dimensionless and swap $x$ for $p$ in the parentheses,

\begin{displaymath}
\frac{dx}{d\tau} = \frac{Gp}{fk}\left(\frac{x}{Gxn_c/f+1}\right)-x.
\end{displaymath}

We choose $n_c=f/G$ to simplify the first term in the denominator to a single non-dimensional variable,

\begin{displaymath}
\frac{dx}{d\tau} = \frac{Gp}{fk}\left(\frac{x}{x+1}\right)-x.
\end{displaymath}

Finally, we rewrite the ratio $Gp/fk$ as $c$, the single parameter which characterizes the system.

\begin{equation}
\frac{dx}{d\tau} = \frac{cx}{x+1}-x.
\label{eqn:ndlm1}
\end{equation}

We can interpret c as the ratio of parameters that contribute to lasing 
\todo{We have performed some algebra to obtain our dimensionless model; but, more importantly, we have tried to make sense of the resulting dimensionless ratio. We are trying to make sense of the physics every step of the way.}
(high gain, $G$; and high pumping, $p$) to parameters that can detract from it (high decay rates, $f$ and $k$).  Indeed, $f$ is a funny parameter because it is possible for it to both contribute to lasing and detract from it. In this case, we interpret is as being unproductive for lasing because higher $f$ with fixed $G$ and $p$ will not lead to lasing.
So we expect that the laser should operate (i.e., lase) when $c > 1.$ We shall see this is the case in the next full section.


\subsubsection{The two-dimensional model}

Non-dimensionalizing the two-dimensional model, given by equation \ref{eqn:lasermodel2}, proceeds the same way as before. 
\todo{Here's another example of non-dimensionalizing a model. There's a bit more algebra in this section, but we have attempted to explain each step for your benefit.}
However, in this model, they are now two dependent variables ($n$ and $N$), hence we propose a third critical number ($\tilde{N}_c$) that will remove the dimensions of the second dependent variable (i.e., $y=N/N_c$). We plug the two previous definitions into equation \ref{eqn:lasermodel2} to obtain:

\begin{displaymath}
\frac{\tilde{n}_c}{\tilde{t}_c}\frac{dx}{d\tau} = G\tilde{n}_c\tilde{N}_cxy - k\tilde{n}_cx,
\end{displaymath}

\begin{displaymath}
\frac{\tilde{N}_c}{\tilde{t}_c}\frac{dy}{d\tau} = -G\tilde{n}_c\tilde{N}_cxy - f\tilde{N}_cy+p.
\end{displaymath}

Isolating $\dot{x}$ and $\dot{y}$, we obtain,

\begin{displaymath}
\frac{dx}{d\tau} = G\tilde{N}_c\tilde{t}_cxy - k\tilde{t}_cx,
\end{displaymath}

\begin{displaymath}
\frac{dy}{d\tau} = -G\tilde{n}_c\tilde{t}_cxy - f\tilde{t}_cy+\frac{p\tilde{t}_c}{\tilde{N}_c}.
\end{displaymath}

Again, the simplest isolation of a variable comes from setting $\tilde{t}_c=1/k$. This isolates $x$ in the first equation,

\begin{displaymath}
\frac{dx}{d\tau} = \frac{G\tilde{N}_c}{k}xy - x,
\end{displaymath}

\begin{displaymath}
\frac{dy}{d\tau} = -\frac{G\tilde{n}_c}{k}xy - \frac{f}{k}y+\frac{p}{k\tilde{N}_c}.
\end{displaymath}

The next simplest isolation is a the product ($xy$) in the first equation. By setting $\tilde{N}_c=k/G$, we obtain,

\begin{displaymath}
\frac{dx}{d\tau} = xy - x,
\end{displaymath}

\begin{displaymath}
\frac{dy}{d\tau} = -\frac{G\tilde{n}_c}{k}xy - \frac{f}{k}y+\frac{pG}{k^2}.
\end{displaymath}

The final characteristic number can be set to isolate the first term in the second equation. In fact, setting it equal to $\tilde{N}_c$ makes the most sense (i.e., $\tilde{n}_c = k/G$),

\begin{displaymath}
\frac{dx}{d\tau} = xy - x,
\end{displaymath}

\begin{displaymath}
\frac{dy}{d\tau} = -xy - \frac{f}{k}y+\frac{pG}{k^2}.
\end{displaymath}
 
We have reduced two non-linear differential equations with four free parameters to two non-linear differential equations with two free dimensionless ratios. We set $a=f/k$ and $b=pG/k^2$ to finally obtain,

\begin{subequations}
\begin{equation}
\frac{dx}{d\tau} = x (y - 1),
\end{equation}
\begin{equation}
\frac{dy}{d\tau} = -y(x+a)+b.
\end{equation}
\label{eqn:ndlm2}
\end{subequations}
 
We can understand the dimensionless ratios as a measure of losses 
\todo{In this case, we have a slightly more complicated non-dimensional model, but we tried to make sense of the new dimensionless ratios and how they might influence the physics.} 
(if $a$ is large and $b$ is small) or gains (if $a$ is small and $b$ is large). Therefore, we expect the laser to operate (i.e., lase) if $b > a$. This is the same condition as before because $c=b/a$. We shall this is the case in the next full section.
 
  
\section{Analytical analysis of the laser model}

Analytical analysis of equations \ref{eqn:ndlm1} and \ref{eqn:ndlm2} can help us make sense of how lasing is possible in each of these models. 
\todo{Each project must contain some analytical work. For a non-linear model, finding steady solutions is an appropriate analytical exercise. Your project might lend itself to analytics in some limit or you might compare it to a simpler analytical model.}
First, we can look for steady solutions (i.e., fixed or ``critical'' points). Steady solutions do not change with time and it is possible for such solutions to be stable (attractor) or unstable (repeller). 
That is, it is possible that given a particular set of parameter values all solutions either approach or run away from a particular steady solution. To determine which is the case, we must evaluate the stability of our obtained steady solutions. For one-dimensional systems, this is quite simple \cite{taylor}. For multidimensional systems, we can evaluate linear stability using the Jacboian \cite{strogatz1994nonlinear}.

\subsection{Steady solutions of the one-dimensional systems}

To find steady solutions for the one-dimensional system, we set equation \ref{eqn:ndlm1} to zero and solve for $x$.

\begin{displaymath}
\dot{x} = 0 = \frac{cx}{x+1}-x
\end{displaymath}

\begin{align*}
\frac{cx}{x+1} & = x \\
cx & = x^2 + x \\
0 & = x^2 + (1-c)x\\
0 & = x \left( x + (1-c)\right)\\
\end{align*}

Hence, there are two possible steady solutions $x_0=0$ or $x_0=c-1$. 
\todo{Again, we worked out the algebra inline. This is not necessary, but please attach that work to your final write-up.}
Recall that the dimensionless ratio $c$ is a free parameter. The stability of these solutions might depend on our choice of this parameter. We postulated that $c>1$ should produce lasing. To evaluate the stability of these solutions we take evaluate the sign of the derivative of right-hand side of equation \ref{eqn:ndlm1} with respect to $x$ at the fixed points. This is identical to checking the sign of $\ddot{x}$, that is, concavity near the fixed point.

\begin{displaymath}
\dot{x} = F(x) =  \frac{cx}{x+1}-x\\
\end{displaymath}

\begin{displaymath}
F'(x) =  \frac{c}{x+1}-\frac{cx}{(x+1)^2}-1
\end{displaymath}

\begin{displaymath}
F'(0) =  \frac{c}{0+1}-\frac{0}{(0+1)^2}-1 = c-1
\end{displaymath}


\begin{displaymath}
F'(c-1) =  \frac{c}{(c-1)+1}-\frac{c(c-1)}{((c-1)+1)^2}-1=\frac{1}{c}-1
\end{displaymath}

If $F'(x_0) > 0$, the solution is unstable (repeller), and if $F'(x_0) < 0$, the solution is stable (attractor). 
\todo{The mathematics we performed had a purpose. We connected our earlier prediction (i.e., lasing occurs when $c>1$) to the mathematics necessary to prove this. Notice that we have also made sense of the other limit (i.e., that the unstable solution is unphysical).} 
If $c<1$, the first steady solution is stable (i.e., $x_0=0$ means no lasing) and the second steady solution is unstable ($x_0=c-1$). 
For this situation ($c<1$), the second solution is unphysical ($x_0=c-1<0$); this corresponds to negative photon numbers. If $c>1$, the first steady solution is unstable and the second steady solution is stable. 
In this situation ($c>1$), the second steady solution is the lasing solution ($x_0=c-1>0$) that we predicted earlier. In particular, the laser photon number is some finite positive value.

\subsection{Steady solutions of the two-dimensional systems}

To find steady solutions for the two-dimensional system, we set both differential equations in equation \ref{eqn:ndlm2} to zero and solve for $x$ and $y$ simultaneously.,


\begin{align*}
\dot{x} &= 0 = x(y-1),\\
\dot{y} &= 0 = -y(x+a)+b.
\end{align*}

The first equation above is satisfied if $x=0$ or $y=1$. First, we choose $x=0$ and plug this into the second equation to find what $y$ must be,

\begin{align*}
0 &= -y(0+a)+b\\
0 &= -ay+b\\
y & = b/a
\end{align*}

Hence, the first steady solution is $\langle x_0,y_0\rangle=\langle0,b/a\rangle$. Notice that this corresponds to having no laser photons in the cavity ($x_0=0$). 
\todo{Here, we have made sense of the first steady solution.}
To find the second solution, we allow set $y=1$ in the second equation and solve for $x$,

\begin{align*}
0 &= -1(x+a)+b\\
0 &= -x+b-a\\
x & = b-a
\end{align*}

Hence, the second steady solution is $\langle x_0,y_0\rangle=\langle b-a,1\rangle$. This solution can have laser photons in the cavity if $b>a$ as that corresponds to positive $x_0$. 
\todo{Here, we have made sense of the second steady solution.}
This is the lasing solution that we predicted earlier.

We can determine the linear stability of these steady solutions by evaluating the Jacobian (matrix of partial derivatives) of this system at these fixed points. 
\todo{This section describes how we probed stability for multi-dimensional systems. This work is definitely beyond the scope of our course, but the description of the method is included for completeness. You may contact us if you are interested in performing this type of investigation.}
This methodology is somewhat beyond the scope of the current project (and course!), so we do not detail the method here. Interested readers are directed to Strogatz \cite{strogatz1994nonlinear}. But, we sketch out the idea. 

A particular solution that converges (or runs away from) to a fixed point (steady solution) does so along a particular trajectory or path. This path can be simple (such as a straight-line along the x or y-axis) or complex (a curved path that eventually is tangent to some direction). The latter is an approach (or run away) along an eigenvector of the Jacobian evaluated at the fixed point. The rate of approach (or run away) can be determined by that eigenvector's eigenvalue. Hence, the eigenvalues of the Jacobian are very important in talking about the long time dynamics of the system. Do solutions converge to the fixed point or run way from it?

The sign of the eigenvalues determine determine whether the fixed point is a stable fixed point (both eigenvalues negative and real), unstable fixed point (both eigenvalues positive and real), or a saddle point -- stable in one direction but unstable in another (both real, but one positive and one negative). More interesting behaviors is possible (i.e., if the eigenvalues are complex). 

For the current system, the fixed point $\langle 0, b/a \rangle$ is linearly stable if $b/a<1$ and a saddle point when $b/a>1$.
\todo{We make sense of the stability of both steady solutions and have connected it back to the physics.}
That is, lasing appears impossible unless the gains ($b$) are stronger than the losses ($a$). The fixed point $\langle b-a, 1 \rangle$ is linearly stable if $b/a>1$ and a saddle (but irrelevant) if $b/a<1$. This saddle point is irrelevant because $b-a<0$  is not a physical solution (i.e., negative photon number!).



\section{Computational analysis of the laser model}


We have built some intuition about the laser model. In particular, when losses outweigh gains (regardless of model), lasing is not possible. We present numerical computations to further illustrate these claims.

\subsection{Numerical analysis of the one-dimensional system}

In our analytical analysis of the one-dimensional laser model, we have found one physical solution that occurs at low gains and high losses ($c<1$).  This solution corresponds to no lasing; laser photons in the cavity tend to zero.
\todo{This section starts with the numerics. To perform the work in this section, we used NDSolve as well as various plotting tools. We have, in each figure caption, attempted to make sense of our numerical results and connect the plots to the physics.}
 Below, we plotted the phase space trajectory for this one-dimensional system and observed that all solutions converge to the no lasing solution in this parameter limit (Figure \ref{fig:onedphase}). All solutions in a one-dimensional system follow the same phase space trajectory \cite{strogatz1994nonlinear}.

\begin{figure}[ht]
\centering
\subfigure[Low gains ($c<1$) produce no lasing.]{
\includegraphics[width=0.4\linewidth]{oned_phasespace.pdf}
}
\hspace*{0.1\linewidth}
\subfigure[Two trajectories (they overlap) started with $x=1$ and $x=0.5$.]{
\includegraphics[width=0.4\linewidth]{oned_phasespace_traj.pdf}
}
\caption{Phase space plots of the one-dimensional laser model ($c=0.9$). (a) In a one-dimensional system, all solutions (blue line) converge to zero photon number (red dot). (b) A series of particular solutions (orange line) follows the same phase space trajectory (blue line).}\label{fig:onedphase}
\end{figure}

We obtained numerical solutions for the model for two choices of initial conditions. After roughly 20$\tau$, both tend to zero photon number (Figure \ref{fig:onedreal}). If $c<1$, then the system has more losses, through mirror transmission and photon scattering, than gains, through pumping. 
\todo{Here, we have connected the predictions from the model back to the physical system.}
Hence, the system is unable to sustain laser photons in the cavity for any appreciable amount of time.

\begin{figure}[ht]
\centering
\subfigure[Trajectory started with $x=0.1$.]{
\includegraphics[width=0.4\linewidth]{oned_realspace1.pdf}
}
\hspace*{0.1\linewidth}
\subfigure[Trajectory started with $x=1$.]{
\includegraphics[width=0.4\linewidth]{oned_realspace.pdf}
}
\caption{Plots of dimensionless photon number versus time for the one-dimensional laser model. Regardless of initial conditions, all solutions coverage to zero photon number.}\label{fig:onedreal}
\end{figure}

The system bifurcates and two solutions appear as $c$ is increased above 1. One of the solutions previously existed and is unstable (no lasing), but the new solution (lasing) is stable. Below, we plotted the phase space trajectory for this one-dimensional system and observed that all solutions converge to the lasing solution for $c>1$ (Figure \ref{fig:onedphaselase}). 

\begin{figure}[ht]
\centering
\subfigure[High gains ($c>1$) produce lasing.]{
\includegraphics[width=0.4\linewidth]{oned_phasespace_lase.pdf}
}
\hspace*{0.1\linewidth}
\subfigure[Two trajectories (they overlap) started with $x=0.1$ and $x=0.5$.]{
\includegraphics[width=0.4\linewidth]{oned_phasespace_traj_lase.pdf}
}
\caption{Phase space plots of the one-dimensional laser model ($c=2$). (a) In a one-dimensional system, all solutions (blue line) converge to $(c-1)$ photon number (green dot) and run away from zero photon number (red dot). (b) A series of particular solutions (orange line) follows the same phase space trajectory (blue line).}\label{fig:onedphaselase}
\end{figure}

We obtained numerical solutions for the model for two choices of initial conditions. After roughly, 20$\tau$, both tend toward $(c-1)$ photon number (Figure \ref{fig:onedreallase}). 
\todo{Notice that, again, we emphasized the connection between the models predictions and the physics.}
If $c>1$, the system has more gains, through pumping or choice of medium, than losses, through mirror transmission and scattering. Hence, the system is self-sustaining.

\begin{figure}[ht]
\centering
\subfigure[Trajectory started with $x=0.1$.]{
\includegraphics[width=0.4\linewidth]{oned_realspace_lase.pdf}
}
\hspace*{0.1\linewidth}
\subfigure[Trajectory started with $x=0.5$.]{
\includegraphics[width=0.4\linewidth]{oned_realspace_lase1.pdf}
}
\caption{Plots of dimensionless photon number versus time for the one-dimensional laser model. Regardless of initial conditions, all solutions coverage to $(c-1)$ photon number.}\label{fig:onedreallase}
\end{figure}

\subsection{Numerical analysis of the two-dimensional system}

In our analytical analysis of the two-dimensional laser model, we found only one physical solution that occurs at high losses and low gains ($b/a<1$). 
\todo{This section is quite similar to the previous section. Note the sense-making and connections to previous predictions in this section.}
This solution corresponds to no lasing; there tend to be no laser photons even though some fixed fraction of atoms remain excited. Below, we plotted the phase space for this two-dimensional system. The vertical axis in these plots correspond to the number excited atoms and the horizontal axis correspond to number of laser photons. All physical solutions converge to the steady solution (Figure \ref{fig:twodphase}).

\begin{figure}[ht]
\centering
\subfigure[Low gains and high losses ($b/a<1$) produce no lasing.]{
\includegraphics[width=0.4\linewidth]{twod_phase.pdf}
}
\hspace*{0.1\linewidth}
\subfigure[Two trajectories started with $\langle x_0, y_0 \rangle = \langle 0.1, 0 \rangle$ and $\langle x_0, y_0 \rangle = \langle 2, 1 \rangle$.]{
\includegraphics[width=0.4\linewidth]{twod_phase_traj.pdf}
}
\caption{Phase space plots of the two-dimensional laser model ($b/a=0.9$). (a) In a two-dimensional system, all solutions (blue line) converge to zero photon number (red dot). (b) A series of particular solutions (orange lines) follow the different phase space trajectories, but converge to the same solution (red dot).}\label{fig:twodphase}
\end{figure}

We obtained numerical solutions for the model for two choices of initial conditions. After 20$\tau$, both tend toward zero photon number and maintain an identical number of excited atoms -- $b/a$ (Figure \ref{fig:twodreal}). For $b/a<1$, the system has more losses than gains and, hence, cannot sustain laser photons in the cavity. Interestingly, in the model, atoms are maintain their excitation and are releasing laser photons, but this is exactly canceled by the losses due to scattering and mirror transmission.

\begin{figure}[ht]
\centering
\subfigure[Trajectories started with $\langle x_0, y_0 \rangle = \langle 0.1, 0 \rangle$.]{
\includegraphics[clip,trim=8mm 20mm 0mm 20mm,width=0.4\linewidth]{twod_real1.pdf}
}
\hspace*{0.1\linewidth}
\subfigure[Trajectories started with $\langle x_0, y_0 \rangle = \langle 2, 1 \rangle$.]{
\includegraphics[clip,trim=8mm 20mm 0mm 20mm,width=0.4\linewidth]{twod_real2.pdf}
}
\caption{Plots of dimensionless photon number ($x$) and dimensionless excited atom number ($y$) versus time for the two-dimensional laser model. Regardless of initial conditions, all solutions converge to zero photon number (no lasing).}\label{fig:twodreal}
\end{figure}


\begin{figure}[h]
\centering
\subfigure[Trajectories started with $\langle x_0, y_0 \rangle = \langle 0.1, 0 \rangle$.]{
\includegraphics[width=0.4\linewidth]{twod_phase_lase.pdf}
}
\hspace*{0.1\linewidth}
\subfigure[Trajectories started with $\langle x_0, y_0 \rangle = \langle 2, 1 \rangle$.]{
\includegraphics[width=0.4\linewidth]{twod_phase_lase_traj.pdf}
}
\caption{Phase space plots of the two-dimensional laser model ($b/a=1.5$). (a) In a two-dimensional system, almost all solutions (blue lines) converge to $(b-a)$ photon number (green dot) and run away from zero photon number (red dot). (b) A series of particular solutions (orange lines) follow different phase space trajectories. One trajectory (no photons in cavity to begin with) converges to zero photon number.}\label{fig:twodphaselase}
\end{figure}


The system bifurcates and two solutions appear as $b/a$ is increased above 1. One of the solution previously existed and is now a saddle point (no lasing), but the new solution (lasing) is stable. Below, we plotted the phase space for the two-dimensional laser model (Figure \ref{fig:twodphaselase}). All solutions (except those starting with $x_0=0$) appear to converge to the lasing solution. That the previous solution is now a saddle point is interesting. Along all directions, except if $x_0=0$, the system will sustain laser photons in the cavity. That is, there must exist at least a single photon in the system to produce lasing. This is generally possible because of thermal fluctuations in the medium. With some probability, a few atoms are already excited and emitting photons. Hence, the system is typically primed for lasing.

\begin{figure}[h]
\centering
\subfigure[Trajectories started with $\langle x_0, y_0 \rangle = \langle 0.1, 0 \rangle$.]{
\includegraphics[clip,trim=8mm 20mm 0mm 20mm,width=0.4\linewidth]{twod_real_lase1.pdf}
}
\hspace*{0.1\linewidth}
\subfigure[Trajectories started with $\langle x_0, y_0 \rangle = \langle 2, 1 \rangle$.]{
\includegraphics[clip,trim=8mm 20mm 0mm 20mm,width=0.4\linewidth]{twod_real_lase2.pdf}
}
\caption{Plots of dimensionless photon number ($x$) and dimensionless excited atom number ($y$) versus time for the two-dimensional laser model. Regardless of initial conditions, all solutions converge to $(b-a)$ photon number (no lasing).}\label{fig:twodreallase}
\end{figure}

We obtained numerical solutions for the model for two choices of initial conditions. After 20$\tau$, both tend toward $x=b-a$  and $y=1$. If $b/a>1$, the system has more gains than losses and can, thus, sustain laser photons in the cavity for indefinitely (Figure \ref{fig:twodreallase}).


\section{Conclusions}


In this paper, we investigated model for a laser that accounts for medium gain, losses through mirrors and scattering, spontaneous emission of atoms, and pumping. 
\todo{We simply summarize the results from the model in this section.}
The model predicts, in general, if the effects of pumping, gain, atomic decay outweigh losses through scattering and mirrors, lasing can occur. This is true regardless of initial conditions except for the case where there are no laser photons in the cavity to start. However, such a situation is generally unphysical given thermal fluctuations in the cavity.

%In this limit, we have investigated the effects of low pumping (low energy input) and high pumping (high energy input). In these limits, we observe no lasing in the low pumping scenario and lasing in the high pumping scenario. Both systems began with one laser photon in the model.
%
%
%\begin{figure}[ht]
%\centering
%\subfigure[Low pumping produces no lasing (number of laser photons does not increase)]{
%\includegraphics[width=0.4\linewidth]{low-pumping.pdf}
%}
%\hspace*{0.1\linewidth}
%\subfigure[High pumping produces lasing (number of laser photons increases)]{
%\includegraphics[width=0.4\linewidth]{hi-pumping.pdf}
%}
%\end{figure}
%
%\noindent Code for Figure (a)
%\begin{verbatim}
%g = 1; k = 0.001; f = 0.1; p = 0.0001;
%sol = NDSolve[{n'[t] == k (p/k - f/g - n[t]) g n[t]/(f + g n[t]), n[0] == 1}, n, {t, 0, 100}]
%Plot[n[t] /. sol, {t, 0, 100}, PlotRange -> {{0, 100}, {0, 100}}, 
% AxesLabel -> {Style[t, Large, Bold], Style[n, Large, Bold]}, 
% LabelStyle -> Directive[Large, Bold], PlotStyle -> Thick]
% \end{verbatim}
%
%\noindent Code for Figure (b)
%\begin{verbatim}
%g = 1; k = 0.001; f = 0.1; p = 0.5;
%sol = NDSolve[{n'[t] == k (p/k - f/g - n[t]) g n[t]/(f + g n[t]), n[0] == 1}, n, {t, 0, 100}]
%Plot[n[t] /. sol, {t, 0, 100}, PlotRange -> {{0, 100}, {0, 100}}, 
% AxesLabel -> {Style[t, Large, Bold], Style[n, Large, Bold]}, 
% LabelStyle -> Directive[Large, Bold], PlotStyle -> Thick]
% \end{verbatim}
%
\begin{thebibliography}{9}
  
\bibitem{lasers1988}
 P.W. Milonni and J.H. Eberly,
 \emph{Lasers}.
 Wiley,
 1988.
 
 \bibitem{strogatz1994nonlinear}
  S.H. Strogatz,
  \emph{Nonlinear dynamics and chaos: With applications to physics, biology, chemistry, and engineering}.
  Westview Pr,
  1st Edition,
  1994.

\bibitem{taylor}
  J.R. Taylor,
  \emph{Classical mechanics}.
  University Science Books,
  1st Edition,
  2005.
  

 
\end{thebibliography}

\newpage

\section*{Contributions to the work}

Danny did most of the work including the coding and the writeup. 
\todo{This section will help us decide how to award credit. Make sure that you work together to avoid our outcome.}
Steve offered some suggestions, but not many were included in the main manuscript. He did go over final draft and offered helpful suggestions, including catching an algebraic error. We both agree that Danny should receive a higher grade on the assignment.

\end{document}
