###Objective
**Given a set of equilibria and their stability, construct a system of equations that produces the same dynamics as those determined by the equilibria.**

Take a general two dimensional system of the following form

$$\begin{align}
\dot x &= f(x,y) \\
\dot y &= g(x,y)
\end{align}$$

What form should $f(x,y)$ and $g(x,y)$ take? I will show that all dynamics in two dimensions can be reproduced by a coupled system of polynomials.

$$\begin{align}
f(x,y) &= y+P_1(x) \\
g(x,y) &= -x+P_2(y)
\end{align}$$

where $P_1(x)$ and $P_2(y)$ are arbitrary polynomials of any degree. This form was chosen so that the nullclines could be explicitly defined and would be condusive to analysis. The nullclines are given by

$$\begin{align}
y &= -P_1(x) \\ 
x &= P_2(y)
\end{align}$$

The Jacobian of the system is given by.

$$J(x,y) = \begin{bmatrix}
       p_1 & 1 \\
       -1 & p_2
     \end{bmatrix}$$

Where for notational brevity we are referring to the derivatives as $\frac{dP_1}{dx}(x,y) \equiv p_1$ and $\frac{dP_2}{dy}(x,y) \equiv p_2$. We can quickly see the trace and determinant as

$$\begin{align}
Trace(J) &= \tau(p_1,p_2) = p_1 + p_2 \\ 
Det(J) &= \Delta(p_1,p_2) = p_1 p_2 +1
\end{align}$$

The eigen values of the Jacobian determine the type and stability of nonhyperbolic equilibria. The characteristic for this system is given by

$$\begin{vmatrix}
     p_1-\lambda & 1 \\
     -1 & p_2-\lambda
   \end{vmatrix} = (p_1-\lambda)(p_2-\lambda)+1 
                 = \lambda^2 - (p_1+p_2)\lambda + p_1 p_2 +1 
                 = \lambda^2 - \tau \lambda + \Delta
$$

Given the characteristic we find the eigenvalues as

$$\lambda = \frac{\tau \pm \sqrt{\tau^2-4\Delta}}{2}$$

In conventional dynamics theory the type of equilibria is determined by the sign of the radicand $\tau^2-4\Delta$ and their stability is determined by the sign of $\tau$ and $\Delta$. The regions of stability in $\tau$ vs $\Delta$ space is shown below.



In general $\tau$ and $\Delta$ can take on all values and collectively describe all equilibria in two dimensions. Given that $P_1(x)$ and $P_2(y)$ are polynomials we know that their derivatives $p_1,p_2 \hspace{3pt} \epsilon \hspace{3pt} (-\infty,\infty)$. Also, because our general system above produces continuous $\tau$ and $\Delta$, we see that it is capable of reproducing all equilibria in two dimensions.

**TO DO: add the $p_1$ vs $p_2$ plane showing regions of stability**


The slopes of nullclines in phase space are given by

$$\begin{align}
-\frac{f_x}{f_y} &= -p_1 \\
-\frac{g_x}{g_y} &= \frac{1}{p_2}
\end{align}$$

In the $y$ vs $x$ phase space we'll define a vector tangent to each nullcline as

$$\begin{align}
\vec{T_x} &= 1\hat{i} + -p_1\hat{j} \\
\vec{T_y} &= p_2\hat{i} + 1\hat{j} 
\end{align}$$

We are interested in the angle between these vectors at an equilibria, therefore we will use the following formula...

$$\theta = \cos^{-1}(\frac{\vec{T_x}\cdot \vec{T_y}}{\|T_x\| \|T_y\|})$$

Starting with the numerator we get...

$$\vec{T_x}\cdot \vec{T_y} = p_2-p_1$$

And in the denominator

$$\|T_x\| \|T_y\| = \sqrt{1+p^2_1}\sqrt{1+p^2_2}$$

The objective here is to find the angle between the tangent vectors in terms of the eigenvalues of the system. We will need to convert the numerator and denominator into expressions of only eigenvalues. For this we will be using the handy fact from linear algebra that the trace of a matrix is equal to the sum of its eigenvalues, $\tau=\lambda_1+\lambda_2$, and the determinant of a matrix is equal to the product of its eigenvalues, $\Delta = \lambda_1 \lambda_2$.

**TO DO: elegant algebra leading to the following formulas (don't have time now)**

Thus we find the angle between the tangent vectors at the equilibria is given by

$$\theta(\lambda_1,\lambda_2) = \cos^{-1}\Bigg (\pm \sqrt{\frac{(\lambda_1-\lambda_2)^2+4}{(\lambda_1+\lambda_2)^2+(\lambda_1 \lambda_2-2)^2}}\Bigg )$$

Or, in terms of the trace and determinant

$$\theta(\lambda_1,\lambda_2) = \cos^{-1}\Bigg (\pm \sqrt{\frac{\tau^2+4(1-\Delta)}{\tau^2+(\Delta-2)^2}}\Bigg )$$

We will show that this is defined for all nonzero $\lambda_1$ and $\lambda_2$. We needn't worry about the degenerate case as the Hartman-Grobman theory tells us the Jacobian is not guaranteed to correctly determine the stability of non-hyperbolic equilibria. We need to show three things.

1. The denominator is never zero
2. The radicand is always positive
3. The magnitude of the argument to $\cos^{-1}$ is bounded by one

The second equation is found by algebraic manipulations and subsitutions of the first. Therefore showing any of the properties for one equation implies it is true for the other.

**(1)**
By inspection we see that both terms in the denominator are squared (in both equations). Thus, the denominator is nonzero for nonzero eigenvalues.

**(2)**
By inspecting the first equation we see that all terms in the radicand are positive, and we are done.

**(3)**
Looking at the second equation...

$$\frac{\tau^2+4(1-\Delta)}{\tau^2+(\Delta-2)^2} < 1 \hspace{10pt} \rightarrow \hspace{10pt} \tau^2+4(1-\Delta) < \tau^2+(\Delta-2)^2$$

Recalling that the denominator is nonzero we do not flip the inequality. We expand both sides,

$$\tau^2-4\Delta+4 < \tau^2+\Delta^2-4\Delta+4 \hspace{10pt} \rightarrow \hspace{4pt} 0 < \Delta^2$$

which is always true for nonzero eigenvalues.

**TO DO: Demonstrate with some small examples**



```

```


```

```

ea0c57f251debbcecc1e4d65de6b216409066e05
ipynb
Jupyter Notebook
cmb_phase_plane/research/.ipynb_checkpoints/Phase Diagram - Inverse Problem-checkpoint.ipynb
mathnathan/notebooks
63ae2f17fd8e1cd8d80fef8ee3b0d3d11d45cd28
MIT
2019-12-04T11:04:45.000Z
2019-12-04T11:04:45.000Z
cmb_phase_plane/research/.ipynb_checkpoints/Phase Diagram - Inverse Problem-checkpoint.ipynb
mathnathan/notebooks
63ae2f17fd8e1cd8d80fef8ee3b0d3d11d45cd28
MIT
cmb_phase_plane/research/.ipynb_checkpoints/Phase Diagram - Inverse Problem-checkpoint.ipynb
mathnathan/notebooks
63ae2f17fd8e1cd8d80fef8ee3b0d3d11d45cd28
MIT
Qwen/Qwen-72B
1. YES
2. YES