Quadratization
Quadratization by example
To better understand quadratization, let’s consider the following example. We have a scalar ordinary differential equation (ODE) given by:
Moreover, both equations have a quadratic right-hand side. We refer to the set \(\{y = x^4\}\) as a quadratization. A formal definition of quadratization will be provided later.
But now, let’s use QBee to replicate the example:
>>> from qbee import *
>>> x = functions("x")
>>> quadratize([(x, x**5)]).print() # input follows rule (x, p) => x' = p
Introduced variables:
w0 = x**4
x' = w0*x
w0' = 4*w0**2
Formal definition
Consider a polynomial system of ODEs
Then an \(l\)-dimensional vector of new variables
The dimension \(l\) of vector \(\mathbf{w}\) is called order of quadratization. A quadratization of the smallest possible order is called an optimal quadratization.
In the example above \(\mathbf{w} = [x^4],\ l = 1,\ \text{and}\ \mathbf{q}_1 = [w_0 x],\ \mathbf{q}_2 = [4w_0^2]\). Since we introduced only one variable, the resulting quadratization is optimal.
Monomial quadratization
If all the polynomials \(w_1(\mathbf{x}),\dots,w_l(\mathbf{x})\) are monomials, the quadratization is called a monomial quadratization. Accordingly, if a monomial quadratization of a system has the smallest possible order among all the monomial quadratizations of the system, it is called an optimal monomial quadratization.
The quadratization in the first example is indeed an optimal monomial quadratization.
The importance of monomial quadratizations is that optimal monomial quadratizations always exist when there is no input functions involved and \(w_1(\mathbf{x}),\dots,w_l(\mathbf{x})\) are non-negative monomials (Otherwise, quadratization may have a smaller order but we are not aware of algorithm to find an optimal quadratization in this case).
The polynomial quadratization, on the other hand, is generally of a lower order, as seen in the example below. However, the general algorithm of finding polynomial quadratizations is unknown to us. Nevertheless, shifting variables can help you to produce better order when using QBee.
Example: The system
As a further read, we recommend an article by Foyez Allaudin “Quadratization of ODEs: Monomial vs. Non-Monomial”.
Laurent monomials
Laurent monomials are monomials that may be built with both positive and negative powers, for instance \(m(x, y) = x^2 y^{-3}\). By default, QBee introduces new variables as Laurent monomials, since it results in more optimal quadratizations than by using ordinary monomials.
Example: Let’s quadratize the system below by using QBee:
>>> import sympy as sp
>>> from qbee import *
>>> x = functions("x")
>>> polynomialize_and_quadratize([(x, sp.exp(1/x))]).print()
Introduced variables:
w_0 = exp(1/x)
w_1 = w_0/x**2 <- It's a Laurent monomial;
w_2 = w_0/x**3 <- This one as well;
x' = w_0
w_0' = -w_0*w_1
w_1' = -2*w_0*w_2 - w_1**2
w_2' = -3*w_1**2 - w_1*w_2
Note: We first polynomialize the system to bring it to a polynomial form. Read about this technique in Polynomialization section.
However, in some contexts, using Laurent monomials is undesirable or even forbidden. For such cases, we can disable them:
>>> import sympy as sp
>>> from qbee import *
>>> x = functions("x", laurent=False) # Forbid "x" to be of negative powers in monomials
>>> polynomialize_and_quadratize([(x, sp.exp(1/x))]).print()
Introduced variables: # Note that the quadratization order has grown;
w_0 = exp(1/x)
w_1 = 1/x <- We introduce 1/x to tackle with the lack of Laurent monomials;
w_2 = w_0*w_1**2
w_3 = w_0*w_1**3
x' = w_0
w_0' = -w_0*w_2
w_1' = -w_2
w_2' = -2*w_0*w_3 - w_2**2
w_3' = -3*w_2**2 - w_2*w_3
For more details and context, check Remark 5.1 in Exact and optimal quadratization of nonlinear finite-dimensional non-autonomous dynamical systems.