Normal forms¶
Background¶
A normal form of \(\dot{x}=f(x)\) (\(\dot{x}\) means \(dx/dt\)) centered at an equilibrium \(x_0\) is an equation \(\dot{x}=h(x)\) such that \(h(x)\) is homeomorphic to \(f(x)\) in a neighborhood of \(x_0\) and \(h'(x)f'(x_0)^Tx-f'(x_0)^Th(x)=0\). The normal form \(\dot{x}=h(x)\) has the same qualitative dynamics as the starting equation \(\dot{x}=f(x)\) near \(x_0\) since the vector fields \(f,h\) are topologically equivalent in a neighborhood of \(x_0\). Normal forms enjoy neat geometric properties such as: the flow \(\varphi_h^t(x)\) generated by \(\dot{x}=h(x)\) preserves the foliation \(F\) induced by the flow \(e^{f'(x)t}\) near \(x_0\); that is, if \(\ell\) is a leaf of \(F\), then so is \(\varphi_h^t(\ell)\) for appropriate \(\ell\) and \(t\).
Normal forms can be computed by a sequence of substitutions in the context of asymptotic series. A substitution \(x=\varphi(y)\) transforms \(\dot{x}=f(x)\) to \(\dot{y}=(\varphi')^{-1}(y)f(\varphi(y))\). Differentiate the substitution with respect to \(t\) and solve for \(\dot{y}\) to check the last statement. This transformation can be computed using
- The fundamental theorem of Lie series for vector fields
If \(\varphi^t_g(x)\) is the flow generated by the vector field \(g(x)\), then the similarity transformation \(S_{g}f=(\varphi_g')^{-1}f\circ\varphi_g\) is formally expanded as
\[S_{g}f\sim e^{L_g}f = \left(I + L_g + \frac1{2!}L^2_g + \cdots \right)f\]where \(L_g(f(x))=[f(x),g(x)]=f'(x)g(x)-g'(x)f(x)\).
Notice that if \(f_i,g_j\) are degree \(i,j\) homogenous polynomial vector fields, respectively, then \(L_{j}f_i(x)\), where \(L_j\) denotes \(L_{g_j}\), is degree \(i+j-1\). So, the subsitution \(x=\varphi_{g_j}(y)\) leaves the Taylor series of \(f\) unaltered up to degree \(j-1\) by
where \(f_i(x)\) denotes the degree \(i\) term in the Taylor series of \(f\) centered at \(x_0\).
A sequence of polynomial vector fields \(g_j(x)\) (called generators) for \(j>1\) can be chosen to ensure that the equation \(\dot{y}=f_1(y)+h_2(y)+h_3(y)+\cdots\) resulting from the substitution \(x=\cdots\circ\varphi_3\circ\varphi_2(y)\) is a normal form of \(\dot{x}=f(x)\) by the following.
Rearranging the formula for the modified degree \(j\) term \(h_j(x)\) labeled above and using \([f,g]=-[g,f]\), we have
where \(L_1\) denotes \(L_{f_1}\). If \(h_j(x)\) is the part of \(f_j(x)\) in the nullspace of \(L_1^T\), so that \(L_1^T(h_j(x))=h'_j(x)f'(x_0)^Tx-f'(x_0)^Th_j(x)=0\), then the last equation can be solved for \(g_j(x)\).
The main class of this package, normal_forms.normal_form.normal_form
, implements the following algorithm for computing a normal form \(\dot{x}=f_1(x)+h_2(x)+\cdots+h_k(x)+O(x^{k+1})\) of \(\dot{x}=f(x)\) up to a specified degree \(k\).
- Select an orthonormal basis \(N\) for the nullspace of \(L_1^T\)
For \(j=2,\ldots,k\)
- Set \(h_j(x)=N^Tf_j(x)\) to the projection of \(f_j(x)\) onto \(N\)
- Solve \(L_1g_j(x)=f_j(x)-h_j(x)\) for \(g_j(x)\)
- Compute the transformation \(e^{L_j}f(x)\) up to degree \(k\) and relabel it as \(f(x)\)
Note
In some theoretically-oriented presentations of normal forms, a preliminary linear substitution \(x=Ty\) is performed to bring \(f_1(y)\) into a canonical form such as Jordan form, and a basis \(N\) for the nullspace of \(L_1^T\) is chosen to simplify an ensuing analysis. This package deals directly with \(f_1(x)=f'(x_0)x\) derived from the supplied righthand side \(f\) since computing Jordan forms is ill-conditioned. And, this package chooses \(N\) agnostically with respect to any ensuing analysis corresponding to the singular value decomposition modes of \(L_1^T\) with zero singular values.
The terms \(h_j(x)\) that appear in the normal form of \(\dot{x}=f(x)\) are fully determined by \(f_1(x)=f'(x_0)x\) and \(N\). If \(f_1'(x_0)\) is diagonalizable over \(\mathbb{C}\) with eigenvalues \(\lambda_i\), then so is \(L_1:\mathcal{V}_j^n\rightarrow\mathcal{V}_j^n\) but with eigenvalues \(m_1\lambda_1+\cdots+m_n\lambda_n-\lambda_i\) for all nonnegative \(m_1,\ldots,m_n\) such that \(|m_1|+\cdots+|m_n|=j\), where \(\mathcal{V}_j^n\) is the space of \(n\)-dim homogenous degree \(j\) polynomial vector fields. If \(L_1\) has all nonzero eigenvalues, that is has no integer relations \(m_1\lambda_1+\cdots+m_n\lambda_n=\lambda_i\) with \(m_1,\ldots,m_n\) as before, for \(j>1\), then \(h_j(x)=0\) since \(L_1^T:\mathcal{V}_j^n\rightarrow\mathcal{V}_j^n\) has a trivial nullspace. Otherwise, \(h_j(x)\) may appear as a nontrivial vector field in the nullspace of \(L_1^T\).
A 1-D example: saddle-node bifurcation¶
The equation
after expanding the righthand side is
Since \(f_1=0\), every polynomial is in the nullspace of \(L_1^T=0\) and therefore the equation is already in normal form. More pedantically, a basis for the nullspace of \(L_1^T:\mathcal{V}_j^n\rightarrow\mathcal{V}_j^n\) is \(\{x^j\}\) and clearly every degree \(j\) term for \(j>1\) in the Taylor series of \(f\) is a multiple of one of these basis monomials.
The above equation undergoes a saddle-node bifurcation at \(r=0\): a saddle and a node that exist for \(r>0\) coalesce at \(x=0\) when \(r=0\) and disappear as \(r\) is decreased [1]. The above equation is then topologically equivalent in a neighborhood of \(x=0\) to any equation \(\dot{x}=f(x)\) with \(f:\mathbb{R}\rightarrow\mathbb{R}\) that has a saddle node equilibrium at \(x=0\).
To compute the normal form with this package, supply the equation righthand side \(f\), the center of the expansion \(x_0\), and the maximum degree \(k\) of the expansion. The sympy
variants of non-algebraic functions such as sin
, cos
, and exp
should be used when defining f
.
In [1]: import sympy
In [2]: f = lambda x, r=0: r + 1 - x - sympy.exp(-x)
In [3]: from normal_forms import normal_form
In [4]: h = normal_form(f, x=0, k=2)
You can see a symbolic representation of the normal form righthand side using the normal form object’s fun
attribute. You can also call the normal form object to evaluate \(f_1(x)+h_2(x)+\cdots+h_k(x)\).
In [5]: h.fun
Out[5]: -0.5*x_0**2
In [6]: h(2)
Out[6]: -2.0