In [165]:
from sympy import *
from sympy.abc import n, i, N, x, lamda, phi, z, j, r, k, a, t
from commons import *
from matrix_functions import *
from sequences import *
init_printing()
In [5]:
alpha, beta = IndexedBase(r'\alpha'), IndexedBase(r'\beta')
m=8
Iexp = Matrix(m, m, lambda n, k: factorial(n) if n==k else 0)
In [6]:
F = define(Symbol(r'\mathcal{F}'), Matrix([
[1, 1],
[1, 0],
]))
F
Out[6]:
$$\mathcal{F} = \left[\begin{matrix}1 & 1\\1 & 0\end{matrix}\right]$$
In [20]:
m=2
eigendata = spectrum(F)
data, eigenvals, multiplicities = eigendata.rhs
Phi_polynomials = component_polynomials(eigendata)
cmatrices = component_matrices(F, Phi_polynomials)
In [8]:
cmatrices
Out[8]:
$$\left \{ \left ( 1, \quad 1\right ) : Z^{\left[ \mathcal{F} \right]}_{1,1} = \left[\begin{matrix}- \frac{\lambda_{2} - 1}{\lambda_{1} - \lambda_{2}} & \frac{1}{\lambda_{1} - \lambda_{2}}\\\frac{1}{\lambda_{1} - \lambda_{2}} & - \frac{\lambda_{2}}{\lambda_{1} - \lambda_{2}}\end{matrix}\right], \quad \left ( 2, \quad 1\right ) : Z^{\left[ \mathcal{F} \right]}_{2,1} = \left[\begin{matrix}\frac{\lambda_{1} - 1}{\lambda_{1} - \lambda_{2}} & - \frac{1}{\lambda_{1} - \lambda_{2}}\\- \frac{1}{\lambda_{1} - \lambda_{2}} & \frac{\lambda_{1}}{\lambda_{1} - \lambda_{2}}\end{matrix}\right]\right \}$$
In [9]:
list(cmatrices.values()) # pretty print
Out[9]:
$$\left [ Z^{\left[ \mathcal{F} \right]}_{1,1} = \left[\begin{matrix}- \frac{\lambda_{2} - 1}{\lambda_{1} - \lambda_{2}} & \frac{1}{\lambda_{1} - \lambda_{2}}\\\frac{1}{\lambda_{1} - \lambda_{2}} & - \frac{\lambda_{2}}{\lambda_{1} - \lambda_{2}}\end{matrix}\right], \quad Z^{\left[ \mathcal{F} \right]}_{2,1} = \left[\begin{matrix}\frac{\lambda_{1} - 1}{\lambda_{1} - \lambda_{2}} & - \frac{1}{\lambda_{1} - \lambda_{2}}\\- \frac{1}{\lambda_{1} - \lambda_{2}} & \frac{\lambda_{1}}{\lambda_{1} - \lambda_{2}}\end{matrix}\right]\right ]$$
In [10]:
M_space_ctor = M_space(cmatrices)
v_vector = Matrix(m, 1, lambda i, _: alpha[i])
M_space_v = M_space_ctor(v_vector)
In [11]:
M_space_v
Out[11]:
$$\left \{ 1 : \left \{ 1 : \boldsymbol{x}_{1,1} = \left[\begin{matrix}- \frac{\left(\lambda_{2} - 1\right) \alpha_{0}}{\lambda_{1} - \lambda_{2}} + \frac{\alpha_{1}}{\lambda_{1} - \lambda_{2}}\\\frac{\alpha_{0}}{\lambda_{1} - \lambda_{2}} - \frac{\alpha_{1} \lambda_{2}}{\lambda_{1} - \lambda_{2}}\end{matrix}\right]\right \}, \quad 2 : \left \{ 1 : \boldsymbol{x}_{2,1} = \left[\begin{matrix}\frac{\left(\lambda_{1} - 1\right) \alpha_{0}}{\lambda_{1} - \lambda_{2}} - \frac{\alpha_{1}}{\lambda_{1} - \lambda_{2}}\\- \frac{\alpha_{0}}{\lambda_{1} - \lambda_{2}} + \frac{\alpha_{1} \lambda_{1}}{\lambda_{1} - \lambda_{2}}\end{matrix}\right]\right \}\right \}$$
In [12]:
[eq for i, xs in M_space_v.items() for eq in xs.values()] # pretty print
Out[12]:
$$\left [ \boldsymbol{x}_{1,1} = \left[\begin{matrix}- \frac{\left(\lambda_{2} - 1\right) \alpha_{0}}{\lambda_{1} - \lambda_{2}} + \frac{\alpha_{1}}{\lambda_{1} - \lambda_{2}}\\\frac{\alpha_{0}}{\lambda_{1} - \lambda_{2}} - \frac{\alpha_{1} \lambda_{2}}{\lambda_{1} - \lambda_{2}}\end{matrix}\right], \quad \boldsymbol{x}_{2,1} = \left[\begin{matrix}\frac{\left(\lambda_{1} - 1\right) \alpha_{0}}{\lambda_{1} - \lambda_{2}} - \frac{\alpha_{1}}{\lambda_{1} - \lambda_{2}}\\- \frac{\alpha_{0}}{\lambda_{1} - \lambda_{2}} + \frac{\alpha_{1} \lambda_{1}}{\lambda_{1} - \lambda_{2}}\end{matrix}\right]\right ]$$
In [13]:
relations = generalized_eigenvectors_relations(eigendata)
eqs = relations(F.rhs, M_space_v,post=lambda i: i.radsimp().factor())
eqs
Out[13]:
$$\left \{ 1 : \left \{ 1 : \left[\begin{matrix}- \frac{1}{\lambda_{1} - \lambda_{2}} \left(\alpha_{0} \lambda_{2} - 2 \alpha_{0} + \alpha_{1} \lambda_{2} - \alpha_{1}\right)\\- \frac{\alpha_{0} \lambda_{2} - \alpha_{0} - \alpha_{1}}{\lambda_{1} - \lambda_{2}}\end{matrix}\right] = \left[\begin{matrix}- \frac{\lambda_{1}}{\lambda_{1} - \lambda_{2}} \left(\alpha_{0} \lambda_{2} - \alpha_{0} - \alpha_{1}\right)\\\frac{\left(\alpha_{0} - \alpha_{1} \lambda_{2}\right) \lambda_{1}}{\lambda_{1} - \lambda_{2}}\end{matrix}\right]\right \}, \quad 2 : \left \{ 1 : \left[\begin{matrix}\frac{1}{\lambda_{1} - \lambda_{2}} \left(\alpha_{0} \lambda_{1} - 2 \alpha_{0} + \alpha_{1} \lambda_{1} - \alpha_{1}\right)\\\frac{\alpha_{0} \lambda_{1} - \alpha_{0} - \alpha_{1}}{\lambda_{1} - \lambda_{2}}\end{matrix}\right] = \left[\begin{matrix}\frac{\lambda_{2}}{\lambda_{1} - \lambda_{2}} \left(\alpha_{0} \lambda_{1} - \alpha_{0} - \alpha_{1}\right)\\- \frac{\left(\alpha_{0} - \alpha_{1} \lambda_{1}\right) \lambda_{2}}{\lambda_{1} - \lambda_{2}}\end{matrix}\right]\right \}\right \}$$
In [15]:
miniblocks = Jordan_blocks(eigendata)
X, J = Jordan_normalform(eigendata, matrices=(F.rhs, M_space_v, miniblocks))
X_lambda = Lambda(v_vector, X.rhs)
In [16]:
X, J
Out[16]:
$$\left ( X = \left[\begin{matrix}- \frac{\left(\lambda_{2} - 1\right) \alpha_{0}}{\lambda_{1} - \lambda_{2}} + \frac{\alpha_{1}}{\lambda_{1} - \lambda_{2}} & \frac{\left(\lambda_{1} - 1\right) \alpha_{0}}{\lambda_{1} - \lambda_{2}} - \frac{\alpha_{1}}{\lambda_{1} - \lambda_{2}}\\\frac{\alpha_{0}}{\lambda_{1} - \lambda_{2}} - \frac{\alpha_{1} \lambda_{2}}{\lambda_{1} - \lambda_{2}} & - \frac{\alpha_{0}}{\lambda_{1} - \lambda_{2}} + \frac{\alpha_{1} \lambda_{1}}{\lambda_{1} - \lambda_{2}}\end{matrix}\right], \quad J = \left[\begin{matrix}\lambda_{1} & 0\\0 & \lambda_{2}\end{matrix}\right]\right )$$
In [21]:
# FX=XJ
assert ((F.rhs*X.rhs).applyfunc(lambda i: i.subs(eigenvals).radsimp().expand())==
(X.rhs*J.rhs).applyfunc(lambda i: i.subs(eigenvals).radsimp().expand()))
In [22]:
J_pow = Matrix([[lamda_indexed[1]**r, 0],[0, lamda_indexed[2]**r],]).subs(eigenvals)
J_pow
Out[22]:
$$\left[\begin{matrix}\left(- \frac{\sqrt{5}}{2} + \frac{1}{2}\right)^{r} & 0\\0 & \left(\frac{1}{2} + \frac{\sqrt{5}}{2}\right)^{r}\end{matrix}\right]$$
In [23]:
F_pow_r = (F.rhs**r).applyfunc(simplify)
F_pow_r
Out[23]:
$$\left[\begin{matrix}\frac{2^{- r}}{10} \sqrt{5} \left(\left(1 + \sqrt{5}\right)^{r + 1} - \left(- \sqrt{5} + 1\right)^{r + 1}\right) & \frac{2^{- r}}{5} \sqrt{5} \left(\left(1 + \sqrt{5}\right)^{r} - \left(- \sqrt{5} + 1\right)^{r}\right)\\\frac{2^{- r}}{5} \sqrt{5} \left(\left(1 + \sqrt{5}\right)^{r} - \left(- \sqrt{5} + 1\right)^{r}\right) & \frac{2^{- r}}{10} \sqrt{5} \left(\left(-1 + \sqrt{5}\right) \left(1 + \sqrt{5}\right)^{r} + \left(1 + \sqrt{5}\right) \left(- \sqrt{5} + 1\right)^{r}\right)\end{matrix}\right]$$
In [24]:
Eq(X.lhs, X.rhs.subs({alpha[0]:1, alpha[1]:1}).applyfunc(simplify), evaluate=False)
Out[24]:
$$X = \left[\begin{matrix}\frac{- \lambda_{2} + 2}{\lambda_{1} - \lambda_{2}} & \frac{\lambda_{1} - 2}{\lambda_{1} - \lambda_{2}}\\\frac{- \lambda_{2} + 1}{\lambda_{1} - \lambda_{2}} & \frac{\lambda_{1} - 1}{\lambda_{1} - \lambda_{2}}\end{matrix}\right]$$
In [25]:
X_Jpow_Xinv = (X.rhs*J_pow*X.rhs**(-1)).subs({alpha[0]:1, alpha[1]:1}).applyfunc(simplify)
X_Jpow_Xinv
Out[25]:
$$\left[\begin{matrix}\frac{2^{- r} \left(\left(1 + \sqrt{5}\right)^{r} \left(\lambda_{1} - 2\right) \left(\lambda_{2} - 1\right) - \left(- \sqrt{5} + 1\right)^{r} \left(\lambda_{1} - 1\right) \left(\lambda_{2} - 2\right)\right)}{\left(\lambda_{1} - 2\right) \left(\lambda_{2} - 1\right) - \left(\lambda_{1} - 1\right) \left(\lambda_{2} - 2\right)} & \frac{2^{- r} \left(- \left(1 + \sqrt{5}\right)^{r} + \left(- \sqrt{5} + 1\right)^{r}\right) \left(\lambda_{1} - 2\right) \left(\lambda_{2} - 2\right)}{\left(\lambda_{1} - 2\right) \left(\lambda_{2} - 1\right) - \left(\lambda_{1} - 1\right) \left(\lambda_{2} - 2\right)}\\\frac{2^{- r} \left(\left(1 + \sqrt{5}\right)^{r} - \left(- \sqrt{5} + 1\right)^{r}\right) \left(\lambda_{1} - 1\right) \left(\lambda_{2} - 1\right)}{\left(\lambda_{1} - 2\right) \left(\lambda_{2} - 1\right) - \left(\lambda_{1} - 1\right) \left(\lambda_{2} - 2\right)} & \frac{2^{- r} \left(- \left(1 + \sqrt{5}\right)^{r} \left(\lambda_{1} - 1\right) \left(\lambda_{2} - 2\right) + \left(- \sqrt{5} + 1\right)^{r} \left(\lambda_{1} - 2\right) \left(\lambda_{2} - 1\right)\right)}{\left(\lambda_{1} - 2\right) \left(\lambda_{2} - 1\right) - \left(\lambda_{1} - 1\right) \left(\lambda_{2} - 2\right)}\end{matrix}\right]$$
In [136]:
# assert F_pow_r.applyfunc(factor) == X_Jpow_Xinv # too general
In [26]:
assert F_pow_r.subs({r:10}).applyfunc(simplify) == (X.rhs*J_pow*X.rhs**(-1)).subs(eigenvals).subs({alpha[0]:1, alpha[1]:t, r:10}).applyfunc(simplify)
In [27]:
Xsym, Jsym = MatrixSymbol('X',m,m), MatrixSymbol('J',m,m)
Eq(Xsym * Jsym**8 * Xsym**(-1), X_Jpow_Xinv.subs(eigenvals).subs({r:8}).simplify(), evaluate=False)
Out[27]:
$$X J^{8} X^{-1} = \left[\begin{matrix}34 & 21\\21 & 13\end{matrix}\right]$$
In [28]:
m=8
J = define(Symbol(r'\mathcal{J}'), Matrix(m, m, lambda n, k: 1 if n==k or n==k+1 else 0))
J
Out[28]:
$$\mathcal{J} = \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & 1 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 1 & 1 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & 1 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & 1 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1 & 1\end{matrix}\right]$$
In [29]:
eigendata = spectrum(J)
data, eigenvals, multiplicities = eigendata.rhs
Phi_polynomials = component_polynomials(eigendata, early_eigenvals_subs=True)
cmatrices = component_matrices(J, Phi_polynomials)
In [30]:
list(cmatrices.values()) # pretty print
Out[30]:
$$\left [ Z^{\left[ \mathcal{J} \right]}_{1,1} = \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\end{matrix}\right], \quad Z^{\left[ \mathcal{J} \right]}_{1,2} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\end{matrix}\right], \quad Z^{\left[ \mathcal{J} \right]}_{1,3} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{1}{2} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{1}{2} & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & \frac{1}{2} & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & \frac{1}{2} & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & \frac{1}{2} & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & \frac{1}{2} & 0 & 0\end{matrix}\right], \quad Z^{\left[ \mathcal{J} \right]}_{1,4} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{1}{6} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{1}{6} & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & \frac{1}{6} & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & \frac{1}{6} & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & \frac{1}{6} & 0 & 0 & 0\end{matrix}\right], \quad Z^{\left[ \mathcal{J} \right]}_{1,5} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{1}{24} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{1}{24} & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & \frac{1}{24} & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & \frac{1}{24} & 0 & 0 & 0 & 0\end{matrix}\right], \quad Z^{\left[ \mathcal{J} \right]}_{1,6} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{1}{120} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{1}{120} & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & \frac{1}{120} & 0 & 0 & 0 & 0 & 0\end{matrix}\right], \quad Z^{\left[ \mathcal{J} \right]}_{1,7} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{1}{720} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{1}{720} & 0 & 0 & 0 & 0 & 0 & 0\end{matrix}\right], \quad Z^{\left[ \mathcal{J} \right]}_{1,8} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{1}{5040} & 0 & 0 & 0 & 0 & 0 & 0 & 0\end{matrix}\right]\right ]$$
In [31]:
M_space_ctor = M_space(cmatrices)
v_vector = Matrix(m, 1, lambda i, _: alpha[i])
M_space_v = M_space_ctor(v_vector)
[eq for i, xs in M_space_v.items() for eq in xs.values()] # pretty print
Out[31]:
$$\left [ \boldsymbol{x}_{1,1} = \left[\begin{matrix}\alpha_{0}\\\alpha_{1}\\\alpha_{2}\\\alpha_{3}\\\alpha_{4}\\\alpha_{5}\\\alpha_{6}\\\alpha_{7}\end{matrix}\right], \quad \boldsymbol{x}_{1,2} = \left[\begin{matrix}0\\\alpha_{0}\\\alpha_{1}\\\alpha_{2}\\\alpha_{3}\\\alpha_{4}\\\alpha_{5}\\\alpha_{6}\end{matrix}\right], \quad \boldsymbol{x}_{1,3} = \left[\begin{matrix}0\\0\\\alpha_{0}\\\alpha_{1}\\\alpha_{2}\\\alpha_{3}\\\alpha_{4}\\\alpha_{5}\end{matrix}\right], \quad \boldsymbol{x}_{1,4} = \left[\begin{matrix}0\\0\\0\\\alpha_{0}\\\alpha_{1}\\\alpha_{2}\\\alpha_{3}\\\alpha_{4}\end{matrix}\right], \quad \boldsymbol{x}_{1,5} = \left[\begin{matrix}0\\0\\0\\0\\\alpha_{0}\\\alpha_{1}\\\alpha_{2}\\\alpha_{3}\end{matrix}\right], \quad \boldsymbol{x}_{1,6} = \left[\begin{matrix}0\\0\\0\\0\\0\\\alpha_{0}\\\alpha_{1}\\\alpha_{2}\end{matrix}\right], \quad \boldsymbol{x}_{1,7} = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\\alpha_{0}\\\alpha_{1}\end{matrix}\right], \quad \boldsymbol{x}_{1,8} = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\\alpha_{0}\end{matrix}\right]\right ]$$
In [33]:
relations = generalized_eigenvectors_relations(eigendata)
eqs = relations(J.rhs, M_space_v)#,post=lambda i: i.radsimp().factor())
eqs
Out[33]:
$$\left \{ 1 : \left \{ 1 : \left[\begin{matrix}\alpha_{0}\\\alpha_{0} + \alpha_{1}\\\alpha_{1} + \alpha_{2}\\\alpha_{2} + \alpha_{3}\\\alpha_{3} + \alpha_{4}\\\alpha_{4} + \alpha_{5}\\\alpha_{5} + \alpha_{6}\\\alpha_{6} + \alpha_{7}\end{matrix}\right] = \left[\begin{matrix}\alpha_{0} \lambda_{1}\\\alpha_{0} + \alpha_{1} \lambda_{1}\\\alpha_{1} + \alpha_{2} \lambda_{1}\\\alpha_{2} + \alpha_{3} \lambda_{1}\\\alpha_{3} + \alpha_{4} \lambda_{1}\\\alpha_{4} + \alpha_{5} \lambda_{1}\\\alpha_{5} + \alpha_{6} \lambda_{1}\\\alpha_{6} + \alpha_{7} \lambda_{1}\end{matrix}\right], \quad 2 : \left[\begin{matrix}0\\\alpha_{0}\\\alpha_{0} + \alpha_{1}\\\alpha_{1} + \alpha_{2}\\\alpha_{2} + \alpha_{3}\\\alpha_{3} + \alpha_{4}\\\alpha_{4} + \alpha_{5}\\\alpha_{5} + \alpha_{6}\end{matrix}\right] = \left[\begin{matrix}0\\\alpha_{0} \lambda_{1}\\\alpha_{0} + \alpha_{1} \lambda_{1}\\\alpha_{1} + \alpha_{2} \lambda_{1}\\\alpha_{2} + \alpha_{3} \lambda_{1}\\\alpha_{3} + \alpha_{4} \lambda_{1}\\\alpha_{4} + \alpha_{5} \lambda_{1}\\\alpha_{5} + \alpha_{6} \lambda_{1}\end{matrix}\right], \quad 3 : \left[\begin{matrix}0\\0\\\alpha_{0}\\\alpha_{0} + \alpha_{1}\\\alpha_{1} + \alpha_{2}\\\alpha_{2} + \alpha_{3}\\\alpha_{3} + \alpha_{4}\\\alpha_{4} + \alpha_{5}\end{matrix}\right] = \left[\begin{matrix}0\\0\\\alpha_{0} \lambda_{1}\\\alpha_{0} + \alpha_{1} \lambda_{1}\\\alpha_{1} + \alpha_{2} \lambda_{1}\\\alpha_{2} + \alpha_{3} \lambda_{1}\\\alpha_{3} + \alpha_{4} \lambda_{1}\\\alpha_{4} + \alpha_{5} \lambda_{1}\end{matrix}\right], \quad 4 : \left[\begin{matrix}0\\0\\0\\\alpha_{0}\\\alpha_{0} + \alpha_{1}\\\alpha_{1} + \alpha_{2}\\\alpha_{2} + \alpha_{3}\\\alpha_{3} + \alpha_{4}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\\alpha_{0} \lambda_{1}\\\alpha_{0} + \alpha_{1} \lambda_{1}\\\alpha_{1} + \alpha_{2} \lambda_{1}\\\alpha_{2} + \alpha_{3} \lambda_{1}\\\alpha_{3} + \alpha_{4} \lambda_{1}\end{matrix}\right], \quad 5 : \left[\begin{matrix}0\\0\\0\\0\\\alpha_{0}\\\alpha_{0} + \alpha_{1}\\\alpha_{1} + \alpha_{2}\\\alpha_{2} + \alpha_{3}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\\alpha_{0} \lambda_{1}\\\alpha_{0} + \alpha_{1} \lambda_{1}\\\alpha_{1} + \alpha_{2} \lambda_{1}\\\alpha_{2} + \alpha_{3} \lambda_{1}\end{matrix}\right], \quad 6 : \left[\begin{matrix}0\\0\\0\\0\\0\\\alpha_{0}\\\alpha_{0} + \alpha_{1}\\\alpha_{1} + \alpha_{2}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\0\\\alpha_{0} \lambda_{1}\\\alpha_{0} + \alpha_{1} \lambda_{1}\\\alpha_{1} + \alpha_{2} \lambda_{1}\end{matrix}\right], \quad 7 : \left[\begin{matrix}0\\0\\0\\0\\0\\0\\\alpha_{0}\\\alpha_{0} + \alpha_{1}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\\alpha_{0} \lambda_{1}\\\alpha_{0} + \alpha_{1} \lambda_{1}\end{matrix}\right], \quad 8 : \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\\alpha_{0}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\\alpha_{0} \lambda_{1}\end{matrix}\right]\right \}\right \}$$
In [34]:
miniblocks = Jordan_blocks(eigendata)
X, JJ = Jordan_normalform(eigendata, matrices=(J.rhs, M_space_v, miniblocks))
X_lambda = Lambda(v_vector, X.rhs)
X, JJ
Out[34]:
$$\left ( X = \left[\begin{matrix}\alpha_{0} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\alpha_{1} & \alpha_{0} & 0 & 0 & 0 & 0 & 0 & 0\\\alpha_{2} & \alpha_{1} & \alpha_{0} & 0 & 0 & 0 & 0 & 0\\\alpha_{3} & \alpha_{2} & \alpha_{1} & \alpha_{0} & 0 & 0 & 0 & 0\\\alpha_{4} & \alpha_{3} & \alpha_{2} & \alpha_{1} & \alpha_{0} & 0 & 0 & 0\\\alpha_{5} & \alpha_{4} & \alpha_{3} & \alpha_{2} & \alpha_{1} & \alpha_{0} & 0 & 0\\\alpha_{6} & \alpha_{5} & \alpha_{4} & \alpha_{3} & \alpha_{2} & \alpha_{1} & \alpha_{0} & 0\\\alpha_{7} & \alpha_{6} & \alpha_{5} & \alpha_{4} & \alpha_{3} & \alpha_{2} & \alpha_{1} & \alpha_{0}\end{matrix}\right], \quad J = \left[\begin{matrix}\lambda_{1} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & \lambda_{1} & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & \lambda_{1} & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & \lambda_{1} & 0 & 0 & 0 & 0\\0 & 0 & 0 & 1 & \lambda_{1} & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & \lambda_{1} & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & \lambda_{1} & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1 & \lambda_{1}\end{matrix}\right]\right )$$
In [35]:
f = Function('f')
f_abstract = Eq(f(t), f(t), evaluate=False)
f_abstract
Out[35]:
$$f{\left (t \right )} = f{\left (t \right )}$$
In [37]:
g_abstract = Hermite_interpolation_polynomial(f_abstract, eigendata, Phi_polynomials)
g_abstract
Out[37]:
$$\operatorname{f_{ 8 }}{\left (t \right )} = \frac{t^{7}}{5040} \frac{d^{7}}{d \lambda_{1}^{7}} f{\left (\lambda_{1} \right )} + t^{6} \left(\frac{1}{720} \frac{d^{6}}{d \lambda_{1}^{6}} f{\left (\lambda_{1} \right )} - \frac{1}{720} \frac{d^{7}}{d \lambda_{1}^{7}} f{\left (\lambda_{1} \right )}\right) + t^{5} \left(\frac{1}{120} \frac{d^{5}}{d \lambda_{1}^{5}} f{\left (\lambda_{1} \right )} - \frac{1}{120} \frac{d^{6}}{d \lambda_{1}^{6}} f{\left (\lambda_{1} \right )} + \frac{1}{240} \frac{d^{7}}{d \lambda_{1}^{7}} f{\left (\lambda_{1} \right )}\right) + t^{4} \left(\frac{1}{24} \frac{d^{4}}{d \lambda_{1}^{4}} f{\left (\lambda_{1} \right )} - \frac{1}{24} \frac{d^{5}}{d \lambda_{1}^{5}} f{\left (\lambda_{1} \right )} + \frac{1}{48} \frac{d^{6}}{d \lambda_{1}^{6}} f{\left (\lambda_{1} \right )} - \frac{1}{144} \frac{d^{7}}{d \lambda_{1}^{7}} f{\left (\lambda_{1} \right )}\right) + t^{3} \left(\frac{1}{6} \frac{d^{3}}{d \lambda_{1}^{3}} f{\left (\lambda_{1} \right )} - \frac{1}{6} \frac{d^{4}}{d \lambda_{1}^{4}} f{\left (\lambda_{1} \right )} + \frac{1}{12} \frac{d^{5}}{d \lambda_{1}^{5}} f{\left (\lambda_{1} \right )} - \frac{1}{36} \frac{d^{6}}{d \lambda_{1}^{6}} f{\left (\lambda_{1} \right )} + \frac{1}{144} \frac{d^{7}}{d \lambda_{1}^{7}} f{\left (\lambda_{1} \right )}\right) + t^{2} \left(\frac{1}{2} \frac{d^{2}}{d \lambda_{1}^{2}} f{\left (\lambda_{1} \right )} - \frac{1}{2} \frac{d^{3}}{d \lambda_{1}^{3}} f{\left (\lambda_{1} \right )} + \frac{1}{4} \frac{d^{4}}{d \lambda_{1}^{4}} f{\left (\lambda_{1} \right )} - \frac{1}{12} \frac{d^{5}}{d \lambda_{1}^{5}} f{\left (\lambda_{1} \right )} + \frac{1}{48} \frac{d^{6}}{d \lambda_{1}^{6}} f{\left (\lambda_{1} \right )} - \frac{1}{240} \frac{d^{7}}{d \lambda_{1}^{7}} f{\left (\lambda_{1} \right )}\right) + t \left(\frac{d}{d \lambda_{1}} f{\left (\lambda_{1} \right )} - \frac{d^{2}}{d \lambda_{1}^{2}} f{\left (\lambda_{1} \right )} + \frac{1}{2} \frac{d^{3}}{d \lambda_{1}^{3}} f{\left (\lambda_{1} \right )} - \frac{1}{6} \frac{d^{4}}{d \lambda_{1}^{4}} f{\left (\lambda_{1} \right )} + \frac{1}{24} \frac{d^{5}}{d \lambda_{1}^{5}} f{\left (\lambda_{1} \right )} - \frac{1}{120} \frac{d^{6}}{d \lambda_{1}^{6}} f{\left (\lambda_{1} \right )} + \frac{1}{720} \frac{d^{7}}{d \lambda_{1}^{7}} f{\left (\lambda_{1} \right )}\right) + f{\left (\lambda_{1} \right )} - \frac{d}{d \lambda_{1}} f{\left (\lambda_{1} \right )} + \frac{1}{2} \frac{d^{2}}{d \lambda_{1}^{2}} f{\left (\lambda_{1} \right )} - \frac{1}{6} \frac{d^{3}}{d \lambda_{1}^{3}} f{\left (\lambda_{1} \right )} + \frac{1}{24} \frac{d^{4}}{d \lambda_{1}^{4}} f{\left (\lambda_{1} \right )} - \frac{1}{120} \frac{d^{5}}{d \lambda_{1}^{5}} f{\left (\lambda_{1} \right )} + \frac{1}{720} \frac{d^{6}}{d \lambda_{1}^{6}} f{\left (\lambda_{1} \right )} - \frac{1}{5040} \frac{d^{7}}{d \lambda_{1}^{7}} f{\left (\lambda_{1} \right )}$$
In [40]:
Jsym, e_sym = symbols('J'), IndexedBase(r'\boldsymbol{e}')
with lift_to_matrix_function(g_abstract) as G_abstract:
J_abstract = G_abstract(J)
J_abstract
Out[40]:
$$\operatorname{f_{ 8 }}{\left (\mathcal{J} \right )} = \left[\begin{matrix}f{\left (\lambda_{1} \right )} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{d}{d \lambda_{1}} f{\left (\lambda_{1} \right )} & f{\left (\lambda_{1} \right )} & 0 & 0 & 0 & 0 & 0 & 0\\\frac{1}{2} \frac{d^{2}}{d \lambda_{1}^{2}} f{\left (\lambda_{1} \right )} & \frac{d}{d \lambda_{1}} f{\left (\lambda_{1} \right )} & f{\left (\lambda_{1} \right )} & 0 & 0 & 0 & 0 & 0\\\frac{1}{6} \frac{d^{3}}{d \lambda_{1}^{3}} f{\left (\lambda_{1} \right )} & \frac{1}{2} \frac{d^{2}}{d \lambda_{1}^{2}} f{\left (\lambda_{1} \right )} & \frac{d}{d \lambda_{1}} f{\left (\lambda_{1} \right )} & f{\left (\lambda_{1} \right )} & 0 & 0 & 0 & 0\\\frac{1}{24} \frac{d^{4}}{d \lambda_{1}^{4}} f{\left (\lambda_{1} \right )} & \frac{1}{6} \frac{d^{3}}{d \lambda_{1}^{3}} f{\left (\lambda_{1} \right )} & \frac{1}{2} \frac{d^{2}}{d \lambda_{1}^{2}} f{\left (\lambda_{1} \right )} & \frac{d}{d \lambda_{1}} f{\left (\lambda_{1} \right )} & f{\left (\lambda_{1} \right )} & 0 & 0 & 0\\\frac{1}{120} \frac{d^{5}}{d \lambda_{1}^{5}} f{\left (\lambda_{1} \right )} & \frac{1}{24} \frac{d^{4}}{d \lambda_{1}^{4}} f{\left (\lambda_{1} \right )} & \frac{1}{6} \frac{d^{3}}{d \lambda_{1}^{3}} f{\left (\lambda_{1} \right )} & \frac{1}{2} \frac{d^{2}}{d \lambda_{1}^{2}} f{\left (\lambda_{1} \right )} & \frac{d}{d \lambda_{1}} f{\left (\lambda_{1} \right )} & f{\left (\lambda_{1} \right )} & 0 & 0\\\frac{1}{720} \frac{d^{6}}{d \lambda_{1}^{6}} f{\left (\lambda_{1} \right )} & \frac{1}{120} \frac{d^{5}}{d \lambda_{1}^{5}} f{\left (\lambda_{1} \right )} & \frac{1}{24} \frac{d^{4}}{d \lambda_{1}^{4}} f{\left (\lambda_{1} \right )} & \frac{1}{6} \frac{d^{3}}{d \lambda_{1}^{3}} f{\left (\lambda_{1} \right )} & \frac{1}{2} \frac{d^{2}}{d \lambda_{1}^{2}} f{\left (\lambda_{1} \right )} & \frac{d}{d \lambda_{1}} f{\left (\lambda_{1} \right )} & f{\left (\lambda_{1} \right )} & 0\\\frac{1}{5040} \frac{d^{7}}{d \lambda_{1}^{7}} f{\left (\lambda_{1} \right )} & \frac{1}{720} \frac{d^{6}}{d \lambda_{1}^{6}} f{\left (\lambda_{1} \right )} & \frac{1}{120} \frac{d^{5}}{d \lambda_{1}^{5}} f{\left (\lambda_{1} \right )} & \frac{1}{24} \frac{d^{4}}{d \lambda_{1}^{4}} f{\left (\lambda_{1} \right )} & \frac{1}{6} \frac{d^{3}}{d \lambda_{1}^{3}} f{\left (\lambda_{1} \right )} & \frac{1}{2} \frac{d^{2}}{d \lambda_{1}^{2}} f{\left (\lambda_{1} \right )} & \frac{d}{d \lambda_{1}} f{\left (\lambda_{1} \right )} & f{\left (\lambda_{1} \right )}\end{matrix}\right]$$
In [42]:
J_pow = J_abstract.rhs.subs({f:Lambda(x, x**r)}).applyfunc(lambda i: i.doit().factor().powsimp())
J_pow_first_col_ff = Matrix(m, 1, lambda n, _: lamda_indexed[1]**(r-n) * ff(r, n, evaluate=False) / factorial(n, evaluate=False))
assert J_pow[:,0] == J_pow_first_col_ff.doit()
Eq(Jsym**r * e_sym[0], J_pow_first_col_ff, evaluate=False)
Out[42]:
$$J^{r} \boldsymbol{e}_{0} = \left[\begin{matrix}\frac{{\left(r\right)}_{0} \lambda_{1}^{r}}{0!}\\\frac{{\left(r\right)}_{1}}{1!} \lambda_{1}^{r - 1}\\\frac{{\left(r\right)}_{2}}{2!} \lambda_{1}^{r - 2}\\\frac{{\left(r\right)}_{3}}{3!} \lambda_{1}^{r - 3}\\\frac{{\left(r\right)}_{4}}{4!} \lambda_{1}^{r - 4}\\\frac{{\left(r\right)}_{5}}{5!} \lambda_{1}^{r - 5}\\\frac{{\left(r\right)}_{6}}{6!} \lambda_{1}^{r - 6}\\\frac{{\left(r\right)}_{7}}{7!} \lambda_{1}^{r - 7}\end{matrix}\right]$$
In [43]:
J_inverse = J_abstract.rhs.subs({f:Lambda(x, 1/x)}).applyfunc(lambda i: i.doit().factor())
Eq(Jsym**(-1) * e_sym[0], J_inverse[:,0],evaluate=False)
Out[43]:
$$\frac{\boldsymbol{e}_{0}}{J} = \left[\begin{matrix}\frac{1}{\lambda_{1}}\\- \frac{1}{\lambda_{1}^{2}}\\\frac{1}{\lambda_{1}^{3}}\\- \frac{1}{\lambda_{1}^{4}}\\\frac{1}{\lambda_{1}^{5}}\\- \frac{1}{\lambda_{1}^{6}}\\\frac{1}{\lambda_{1}^{7}}\\- \frac{1}{\lambda_{1}^{8}}\end{matrix}\right]$$
In [44]:
J_sqrt = J_abstract.rhs.subs({f:Lambda(x, sqrt(x))}).applyfunc(lambda i: i.doit())
Eq(sqrt(Jsym)*e_sym[0], J_sqrt[:,0], evaluate=False)
Out[44]:
$$\sqrt{J} \boldsymbol{e}_{0} = \left[\begin{matrix}\sqrt{\lambda_{1}}\\\frac{1}{2 \sqrt{\lambda_{1}}}\\- \frac{1}{8 \lambda_{1}^{\frac{3}{2}}}\\\frac{1}{16 \lambda_{1}^{\frac{5}{2}}}\\- \frac{5}{128 \lambda_{1}^{\frac{7}{2}}}\\\frac{7}{256 \lambda_{1}^{\frac{9}{2}}}\\- \frac{21}{1024 \lambda_{1}^{\frac{11}{2}}}\\\frac{33}{2048 \lambda_{1}^{\frac{13}{2}}}\end{matrix}\right]$$
In [45]:
J_exp = J_abstract.rhs.subs({f:Lambda(x, exp(Symbol(r'\alpha')*x))}).applyfunc(lambda i: i.doit())
Eq(exp(alpha*Jsym)*e_sym[0] ,J_exp[:,0],evaluate=False)
Out[45]:
$$e^{J \alpha} \boldsymbol{e}_{0} = \left[\begin{matrix}e^{\alpha \lambda_{1}}\\\alpha e^{\alpha \lambda_{1}}\\\frac{\alpha^{2}}{2} e^{\alpha \lambda_{1}}\\\frac{\alpha^{3}}{6} e^{\alpha \lambda_{1}}\\\frac{\alpha^{4}}{24} e^{\alpha \lambda_{1}}\\\frac{\alpha^{5}}{120} e^{\alpha \lambda_{1}}\\\frac{\alpha^{6}}{720} e^{\alpha \lambda_{1}}\\\frac{\alpha^{7}}{5040} e^{\alpha \lambda_{1}}\end{matrix}\right]$$
In [46]:
J_log = J_abstract.rhs.subs({f:Lambda(x, log(x))}).applyfunc(lambda i: i.doit())
Eq(log(Jsym)*e_sym[0], J_log[:,0], evaluate=False)
Out[46]:
$$\log{\left (J \right )} \boldsymbol{e}_{0} = \left[\begin{matrix}\log{\left (\lambda_{1} \right )}\\\frac{1}{\lambda_{1}}\\- \frac{1}{2 \lambda_{1}^{2}}\\\frac{1}{3 \lambda_{1}^{3}}\\- \frac{1}{4 \lambda_{1}^{4}}\\\frac{1}{5 \lambda_{1}^{5}}\\- \frac{1}{6 \lambda_{1}^{6}}\\\frac{1}{7 \lambda_{1}^{7}}\end{matrix}\right]$$
In [47]:
J_sin = J_abstract.rhs.subs({f:Lambda(x, sin(x))}).applyfunc(lambda i: i.doit())
Eq(sin(Jsym)*e_sym[0], J_sin[:,0],evaluate=False)
Out[47]:
$$\sin{\left (J \right )} \boldsymbol{e}_{0} = \left[\begin{matrix}\sin{\left (\lambda_{1} \right )}\\\cos{\left (\lambda_{1} \right )}\\- \frac{1}{2} \sin{\left (\lambda_{1} \right )}\\- \frac{1}{6} \cos{\left (\lambda_{1} \right )}\\\frac{1}{24} \sin{\left (\lambda_{1} \right )}\\\frac{1}{120} \cos{\left (\lambda_{1} \right )}\\- \frac{1}{720} \sin{\left (\lambda_{1} \right )}\\- \frac{1}{5040} \cos{\left (\lambda_{1} \right )}\end{matrix}\right]$$
In [48]:
J_cos = J_abstract.rhs.subs({f:Lambda(x, cos(x))}).applyfunc(lambda i: i.doit())
Eq(cos(Jsym)*e_sym[0], J_cos[:,0],evaluate=False)
Out[48]:
$$\cos{\left (J \right )} \boldsymbol{e}_{0} = \left[\begin{matrix}\cos{\left (\lambda_{1} \right )}\\- \sin{\left (\lambda_{1} \right )}\\- \frac{1}{2} \cos{\left (\lambda_{1} \right )}\\\frac{1}{6} \sin{\left (\lambda_{1} \right )}\\\frac{1}{24} \cos{\left (\lambda_{1} \right )}\\- \frac{1}{120} \sin{\left (\lambda_{1} \right )}\\- \frac{1}{720} \cos{\left (\lambda_{1} \right )}\\\frac{1}{5040} \sin{\left (\lambda_{1} \right )}\end{matrix}\right]$$
In [52]:
# previous cells can be computed using the poly g as well
g_pow = g_abstract.subs({f:Lambda(x, x**r)})#.simplify()
with lift_to_matrix_function(g_pow) as G_pow:
J_pow = G_pow(J)
g_pow, J_pow.rhs.applyfunc(lambda i: i.subs(eigenvals).doit().factor())
Out[52]:
$$\left ( \operatorname{f_{ 8 }}{\left (t \right )} = \frac{t^{7}}{5040} \frac{\partial^{7}}{\partial \lambda_{1}^{7}} \lambda_{1}^{r} + t^{6} \left(\frac{1}{720} \frac{\partial^{6}}{\partial \lambda_{1}^{6}} \lambda_{1}^{r} - \frac{1}{720} \frac{\partial^{7}}{\partial \lambda_{1}^{7}} \lambda_{1}^{r}\right) + t^{5} \left(\frac{1}{120} \frac{\partial^{5}}{\partial \lambda_{1}^{5}} \lambda_{1}^{r} - \frac{1}{120} \frac{\partial^{6}}{\partial \lambda_{1}^{6}} \lambda_{1}^{r} + \frac{1}{240} \frac{\partial^{7}}{\partial \lambda_{1}^{7}} \lambda_{1}^{r}\right) + t^{4} \left(\frac{1}{24} \frac{\partial^{4}}{\partial \lambda_{1}^{4}} \lambda_{1}^{r} - \frac{1}{24} \frac{\partial^{5}}{\partial \lambda_{1}^{5}} \lambda_{1}^{r} + \frac{1}{48} \frac{\partial^{6}}{\partial \lambda_{1}^{6}} \lambda_{1}^{r} - \frac{1}{144} \frac{\partial^{7}}{\partial \lambda_{1}^{7}} \lambda_{1}^{r}\right) + t^{3} \left(\frac{1}{6} \frac{\partial^{3}}{\partial \lambda_{1}^{3}} \lambda_{1}^{r} - \frac{1}{6} \frac{\partial^{4}}{\partial \lambda_{1}^{4}} \lambda_{1}^{r} + \frac{1}{12} \frac{\partial^{5}}{\partial \lambda_{1}^{5}} \lambda_{1}^{r} - \frac{1}{36} \frac{\partial^{6}}{\partial \lambda_{1}^{6}} \lambda_{1}^{r} + \frac{1}{144} \frac{\partial^{7}}{\partial \lambda_{1}^{7}} \lambda_{1}^{r}\right) + t^{2} \left(\frac{1}{2} \frac{\partial^{2}}{\partial \lambda_{1}^{2}} \lambda_{1}^{r} - \frac{1}{2} \frac{\partial^{3}}{\partial \lambda_{1}^{3}} \lambda_{1}^{r} + \frac{1}{4} \frac{\partial^{4}}{\partial \lambda_{1}^{4}} \lambda_{1}^{r} - \frac{1}{12} \frac{\partial^{5}}{\partial \lambda_{1}^{5}} \lambda_{1}^{r} + \frac{1}{48} \frac{\partial^{6}}{\partial \lambda_{1}^{6}} \lambda_{1}^{r} - \frac{1}{240} \frac{\partial^{7}}{\partial \lambda_{1}^{7}} \lambda_{1}^{r}\right) + t \left(\frac{\partial}{\partial \lambda_{1}} \lambda_{1}^{r} - \frac{\partial^{2}}{\partial \lambda_{1}^{2}} \lambda_{1}^{r} + \frac{1}{2} \frac{\partial^{3}}{\partial \lambda_{1}^{3}} \lambda_{1}^{r} - \frac{1}{6} \frac{\partial^{4}}{\partial \lambda_{1}^{4}} \lambda_{1}^{r} + \frac{1}{24} \frac{\partial^{5}}{\partial \lambda_{1}^{5}} \lambda_{1}^{r} - \frac{1}{120} \frac{\partial^{6}}{\partial \lambda_{1}^{6}} \lambda_{1}^{r} + \frac{1}{720} \frac{\partial^{7}}{\partial \lambda_{1}^{7}} \lambda_{1}^{r}\right) - \frac{\partial}{\partial \lambda_{1}} \lambda_{1}^{r} + \frac{1}{2} \frac{\partial^{2}}{\partial \lambda_{1}^{2}} \lambda_{1}^{r} - \frac{1}{6} \frac{\partial^{3}}{\partial \lambda_{1}^{3}} \lambda_{1}^{r} + \frac{1}{24} \frac{\partial^{4}}{\partial \lambda_{1}^{4}} \lambda_{1}^{r} - \frac{1}{120} \frac{\partial^{5}}{\partial \lambda_{1}^{5}} \lambda_{1}^{r} + \frac{1}{720} \frac{\partial^{6}}{\partial \lambda_{1}^{6}} \lambda_{1}^{r} - \frac{1}{5040} \frac{\partial^{7}}{\partial \lambda_{1}^{7}} \lambda_{1}^{r} + \lambda_{1}^{r}, \quad \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\r & 1 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{r}{2} \left(r - 1\right) & r & 1 & 0 & 0 & 0 & 0 & 0\\\frac{r}{6} \left(r - 2\right) \left(r - 1\right) & \frac{r}{2} \left(r - 1\right) & r & 1 & 0 & 0 & 0 & 0\\\frac{r}{24} \left(r - 3\right) \left(r - 2\right) \left(r - 1\right) & \frac{r}{6} \left(r - 2\right) \left(r - 1\right) & \frac{r}{2} \left(r - 1\right) & r & 1 & 0 & 0 & 0\\\frac{r}{120} \left(r - 4\right) \left(r - 3\right) \left(r - 2\right) \left(r - 1\right) & \frac{r}{24} \left(r - 3\right) \left(r - 2\right) \left(r - 1\right) & \frac{r}{6} \left(r - 2\right) \left(r - 1\right) & \frac{r}{2} \left(r - 1\right) & r & 1 & 0 & 0\\\frac{r}{720} \left(r - 5\right) \left(r - 4\right) \left(r - 3\right) \left(r - 2\right) \left(r - 1\right) & \frac{r}{120} \left(r - 4\right) \left(r - 3\right) \left(r - 2\right) \left(r - 1\right) & \frac{r}{24} \left(r - 3\right) \left(r - 2\right) \left(r - 1\right) & \frac{r}{6} \left(r - 2\right) \left(r - 1\right) & \frac{r}{2} \left(r - 1\right) & r & 1 & 0\\\frac{r}{5040} \left(r - 6\right) \left(r - 5\right) \left(r - 4\right) \left(r - 3\right) \left(r - 2\right) \left(r - 1\right) & \frac{r}{720} \left(r - 5\right) \left(r - 4\right) \left(r - 3\right) \left(r - 2\right) \left(r - 1\right) & \frac{r}{120} \left(r - 4\right) \left(r - 3\right) \left(r - 2\right) \left(r - 1\right) & \frac{r}{24} \left(r - 3\right) \left(r - 2\right) \left(r - 1\right) & \frac{r}{6} \left(r - 2\right) \left(r - 1\right) & \frac{r}{2} \left(r - 1\right) & r & 1\end{matrix}\right]\right )$$
In [53]:
m=8
P = define(Symbol(r'\mathcal{P}'), Matrix(m,m,binomial))
P
Out[53]:
$$\mathcal{P} = \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 2 & 1 & 0 & 0 & 0 & 0 & 0\\1 & 3 & 3 & 1 & 0 & 0 & 0 & 0\\1 & 4 & 6 & 4 & 1 & 0 & 0 & 0\\1 & 5 & 10 & 10 & 5 & 1 & 0 & 0\\1 & 6 & 15 & 20 & 15 & 6 & 1 & 0\\1 & 7 & 21 & 35 & 35 & 21 & 7 & 1\end{matrix}\right]$$
In [55]:
eigendata = spectrum(P)
data, eigenvals, multiplicities = eigendata.rhs
Phi_polynomials = component_polynomials(eigendata, early_eigenvals_subs=True)
cmatrices = component_matrices(P, Phi_polynomials)
In [56]:
list(cmatrices.values()) # pretty print
Out[56]:
$$\left [ Z^{\left[ \mathcal{P} \right]}_{1,1} = \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\end{matrix}\right], \quad Z^{\left[ \mathcal{P} \right]}_{1,2} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 2 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 3 & 3 & 0 & 0 & 0 & 0 & 0\\1 & 4 & 6 & 4 & 0 & 0 & 0 & 0\\1 & 5 & 10 & 10 & 5 & 0 & 0 & 0\\1 & 6 & 15 & 20 & 15 & 6 & 0 & 0\\1 & 7 & 21 & 35 & 35 & 21 & 7 & 0\end{matrix}\right], \quad Z^{\left[ \mathcal{P} \right]}_{1,3} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\3 & 3 & 0 & 0 & 0 & 0 & 0 & 0\\7 & 12 & 6 & 0 & 0 & 0 & 0 & 0\\15 & 35 & 30 & 10 & 0 & 0 & 0 & 0\\31 & 90 & 105 & 60 & 15 & 0 & 0 & 0\\63 & 217 & 315 & 245 & 105 & 21 & 0 & 0\end{matrix}\right], \quad Z^{\left[ \mathcal{P} \right]}_{1,4} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\6 & 4 & 0 & 0 & 0 & 0 & 0 & 0\\25 & 30 & 10 & 0 & 0 & 0 & 0 & 0\\90 & 150 & 90 & 20 & 0 & 0 & 0 & 0\\301 & 630 & 525 & 210 & 35 & 0 & 0 & 0\end{matrix}\right], \quad Z^{\left[ \mathcal{P} \right]}_{1,5} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\10 & 5 & 0 & 0 & 0 & 0 & 0 & 0\\65 & 60 & 15 & 0 & 0 & 0 & 0 & 0\\350 & 455 & 210 & 35 & 0 & 0 & 0 & 0\end{matrix}\right], \quad Z^{\left[ \mathcal{P} \right]}_{1,6} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\15 & 6 & 0 & 0 & 0 & 0 & 0 & 0\\140 & 105 & 21 & 0 & 0 & 0 & 0 & 0\end{matrix}\right], \quad Z^{\left[ \mathcal{P} \right]}_{1,7} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\21 & 7 & 0 & 0 & 0 & 0 & 0 & 0\end{matrix}\right], \quad Z^{\left[ \mathcal{P} \right]}_{1,8} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\end{matrix}\right]\right ]$$
In [57]:
alpha_vector = Matrix(m, 1, lambda i, _: alpha[i])
M_space_ctor = M_space(cmatrices)
M_space_v = M_space_ctor(alpha_vector)
In [58]:
M_space_v
Out[58]:
$$\left \{ 1 : \left \{ 1 : \boldsymbol{x}_{1,1} = \left[\begin{matrix}\alpha_{0}\\\alpha_{1}\\\alpha_{2}\\\alpha_{3}\\\alpha_{4}\\\alpha_{5}\\\alpha_{6}\\\alpha_{7}\end{matrix}\right], \quad 2 : \boldsymbol{x}_{1,2} = \left[\begin{matrix}0\\\alpha_{0}\\\alpha_{0} + 2 \alpha_{1}\\\alpha_{0} + 3 \alpha_{1} + 3 \alpha_{2}\\\alpha_{0} + 4 \alpha_{1} + 6 \alpha_{2} + 4 \alpha_{3}\\\alpha_{0} + 5 \alpha_{1} + 10 \alpha_{2} + 10 \alpha_{3} + 5 \alpha_{4}\\\alpha_{0} + 6 \alpha_{1} + 15 \alpha_{2} + 20 \alpha_{3} + 15 \alpha_{4} + 6 \alpha_{5}\\\alpha_{0} + 7 \alpha_{1} + 21 \alpha_{2} + 35 \alpha_{3} + 35 \alpha_{4} + 21 \alpha_{5} + 7 \alpha_{6}\end{matrix}\right], \quad 3 : \boldsymbol{x}_{1,3} = \left[\begin{matrix}0\\0\\2 \alpha_{0}\\6 \alpha_{0} + 6 \alpha_{1}\\14 \alpha_{0} + 24 \alpha_{1} + 12 \alpha_{2}\\30 \alpha_{0} + 70 \alpha_{1} + 60 \alpha_{2} + 20 \alpha_{3}\\62 \alpha_{0} + 180 \alpha_{1} + 210 \alpha_{2} + 120 \alpha_{3} + 30 \alpha_{4}\\126 \alpha_{0} + 434 \alpha_{1} + 630 \alpha_{2} + 490 \alpha_{3} + 210 \alpha_{4} + 42 \alpha_{5}\end{matrix}\right], \quad 4 : \boldsymbol{x}_{1,4} = \left[\begin{matrix}0\\0\\0\\6 \alpha_{0}\\36 \alpha_{0} + 24 \alpha_{1}\\150 \alpha_{0} + 180 \alpha_{1} + 60 \alpha_{2}\\540 \alpha_{0} + 900 \alpha_{1} + 540 \alpha_{2} + 120 \alpha_{3}\\1806 \alpha_{0} + 3780 \alpha_{1} + 3150 \alpha_{2} + 1260 \alpha_{3} + 210 \alpha_{4}\end{matrix}\right], \quad 5 : \boldsymbol{x}_{1,5} = \left[\begin{matrix}0\\0\\0\\0\\24 \alpha_{0}\\240 \alpha_{0} + 120 \alpha_{1}\\1560 \alpha_{0} + 1440 \alpha_{1} + 360 \alpha_{2}\\8400 \alpha_{0} + 10920 \alpha_{1} + 5040 \alpha_{2} + 840 \alpha_{3}\end{matrix}\right], \quad 6 : \boldsymbol{x}_{1,6} = \left[\begin{matrix}0\\0\\0\\0\\0\\120 \alpha_{0}\\1800 \alpha_{0} + 720 \alpha_{1}\\16800 \alpha_{0} + 12600 \alpha_{1} + 2520 \alpha_{2}\end{matrix}\right], \quad 7 : \boldsymbol{x}_{1,7} = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\720 \alpha_{0}\\15120 \alpha_{0} + 5040 \alpha_{1}\end{matrix}\right], \quad 8 : \boldsymbol{x}_{1,8} = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\5040 \alpha_{0}\end{matrix}\right]\right \}\right \}$$
In [59]:
[eq for i, xs in M_space_v.items() for eq in xs.values()] # pretty print
Out[59]:
$$\left [ \boldsymbol{x}_{1,1} = \left[\begin{matrix}\alpha_{0}\\\alpha_{1}\\\alpha_{2}\\\alpha_{3}\\\alpha_{4}\\\alpha_{5}\\\alpha_{6}\\\alpha_{7}\end{matrix}\right], \quad \boldsymbol{x}_{1,2} = \left[\begin{matrix}0\\\alpha_{0}\\\alpha_{0} + 2 \alpha_{1}\\\alpha_{0} + 3 \alpha_{1} + 3 \alpha_{2}\\\alpha_{0} + 4 \alpha_{1} + 6 \alpha_{2} + 4 \alpha_{3}\\\alpha_{0} + 5 \alpha_{1} + 10 \alpha_{2} + 10 \alpha_{3} + 5 \alpha_{4}\\\alpha_{0} + 6 \alpha_{1} + 15 \alpha_{2} + 20 \alpha_{3} + 15 \alpha_{4} + 6 \alpha_{5}\\\alpha_{0} + 7 \alpha_{1} + 21 \alpha_{2} + 35 \alpha_{3} + 35 \alpha_{4} + 21 \alpha_{5} + 7 \alpha_{6}\end{matrix}\right], \quad \boldsymbol{x}_{1,3} = \left[\begin{matrix}0\\0\\2 \alpha_{0}\\6 \alpha_{0} + 6 \alpha_{1}\\14 \alpha_{0} + 24 \alpha_{1} + 12 \alpha_{2}\\30 \alpha_{0} + 70 \alpha_{1} + 60 \alpha_{2} + 20 \alpha_{3}\\62 \alpha_{0} + 180 \alpha_{1} + 210 \alpha_{2} + 120 \alpha_{3} + 30 \alpha_{4}\\126 \alpha_{0} + 434 \alpha_{1} + 630 \alpha_{2} + 490 \alpha_{3} + 210 \alpha_{4} + 42 \alpha_{5}\end{matrix}\right], \quad \boldsymbol{x}_{1,4} = \left[\begin{matrix}0\\0\\0\\6 \alpha_{0}\\36 \alpha_{0} + 24 \alpha_{1}\\150 \alpha_{0} + 180 \alpha_{1} + 60 \alpha_{2}\\540 \alpha_{0} + 900 \alpha_{1} + 540 \alpha_{2} + 120 \alpha_{3}\\1806 \alpha_{0} + 3780 \alpha_{1} + 3150 \alpha_{2} + 1260 \alpha_{3} + 210 \alpha_{4}\end{matrix}\right], \quad \boldsymbol{x}_{1,5} = \left[\begin{matrix}0\\0\\0\\0\\24 \alpha_{0}\\240 \alpha_{0} + 120 \alpha_{1}\\1560 \alpha_{0} + 1440 \alpha_{1} + 360 \alpha_{2}\\8400 \alpha_{0} + 10920 \alpha_{1} + 5040 \alpha_{2} + 840 \alpha_{3}\end{matrix}\right], \quad \boldsymbol{x}_{1,6} = \left[\begin{matrix}0\\0\\0\\0\\0\\120 \alpha_{0}\\1800 \alpha_{0} + 720 \alpha_{1}\\16800 \alpha_{0} + 12600 \alpha_{1} + 2520 \alpha_{2}\end{matrix}\right], \quad \boldsymbol{x}_{1,7} = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\720 \alpha_{0}\\15120 \alpha_{0} + 5040 \alpha_{1}\end{matrix}\right], \quad \boldsymbol{x}_{1,8} = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\5040 \alpha_{0}\end{matrix}\right]\right ]$$
In [60]:
P.rhs*alpha_vector
Out[60]:
$$\left[\begin{matrix}\alpha_{0}\\\alpha_{0} + \alpha_{1}\\\alpha_{0} + 2 \alpha_{1} + \alpha_{2}\\\alpha_{0} + 3 \alpha_{1} + 3 \alpha_{2} + \alpha_{3}\\\alpha_{0} + 4 \alpha_{1} + 6 \alpha_{2} + 4 \alpha_{3} + \alpha_{4}\\\alpha_{0} + 5 \alpha_{1} + 10 \alpha_{2} + 10 \alpha_{3} + 5 \alpha_{4} + \alpha_{5}\\\alpha_{0} + 6 \alpha_{1} + 15 \alpha_{2} + 20 \alpha_{3} + 15 \alpha_{4} + 6 \alpha_{5} + \alpha_{6}\\\alpha_{0} + 7 \alpha_{1} + 21 \alpha_{2} + 35 \alpha_{3} + 35 \alpha_{4} + 21 \alpha_{5} + 7 \alpha_{6} + \alpha_{7}\end{matrix}\right]$$
In [61]:
relations = generalized_eigenvectors_relations(eigendata)
eqs = relations(P.rhs, M_space_v)
eqs
Out[61]:
$$\left \{ 1 : \left \{ 1 : \left[\begin{matrix}\alpha_{0}\\\alpha_{0} + \alpha_{1}\\\alpha_{0} + 2 \alpha_{1} + \alpha_{2}\\\alpha_{0} + 3 \alpha_{1} + 3 \alpha_{2} + \alpha_{3}\\\alpha_{0} + 4 \alpha_{1} + 6 \alpha_{2} + 4 \alpha_{3} + \alpha_{4}\\\alpha_{0} + 5 \alpha_{1} + 10 \alpha_{2} + 10 \alpha_{3} + 5 \alpha_{4} + \alpha_{5}\\\alpha_{0} + 6 \alpha_{1} + 15 \alpha_{2} + 20 \alpha_{3} + 15 \alpha_{4} + 6 \alpha_{5} + \alpha_{6}\\\alpha_{0} + 7 \alpha_{1} + 21 \alpha_{2} + 35 \alpha_{3} + 35 \alpha_{4} + 21 \alpha_{5} + 7 \alpha_{6} + \alpha_{7}\end{matrix}\right] = \left[\begin{matrix}\alpha_{0} \lambda_{1}\\\alpha_{0} + \alpha_{1} \lambda_{1}\\\alpha_{0} + 2 \alpha_{1} + \alpha_{2} \lambda_{1}\\\alpha_{0} + 3 \alpha_{1} + 3 \alpha_{2} + \alpha_{3} \lambda_{1}\\\alpha_{0} + 4 \alpha_{1} + 6 \alpha_{2} + 4 \alpha_{3} + \alpha_{4} \lambda_{1}\\\alpha_{0} + 5 \alpha_{1} + 10 \alpha_{2} + 10 \alpha_{3} + 5 \alpha_{4} + \alpha_{5} \lambda_{1}\\\alpha_{0} + 6 \alpha_{1} + 15 \alpha_{2} + 20 \alpha_{3} + 15 \alpha_{4} + 6 \alpha_{5} + \alpha_{6} \lambda_{1}\\\alpha_{0} + 7 \alpha_{1} + 21 \alpha_{2} + 35 \alpha_{3} + 35 \alpha_{4} + 21 \alpha_{5} + 7 \alpha_{6} + \alpha_{7} \lambda_{1}\end{matrix}\right], \quad 2 : \left[\begin{matrix}0\\\alpha_{0}\\3 \alpha_{0} + 2 \alpha_{1}\\7 \alpha_{0} + 9 \alpha_{1} + 3 \alpha_{2}\\15 \alpha_{0} + 28 \alpha_{1} + 18 \alpha_{2} + 4 \alpha_{3}\\31 \alpha_{0} + 75 \alpha_{1} + 70 \alpha_{2} + 30 \alpha_{3} + 5 \alpha_{4}\\63 \alpha_{0} + 186 \alpha_{1} + 225 \alpha_{2} + 140 \alpha_{3} + 45 \alpha_{4} + 6 \alpha_{5}\\127 \alpha_{0} + 441 \alpha_{1} + 651 \alpha_{2} + 525 \alpha_{3} + 245 \alpha_{4} + 63 \alpha_{5} + 7 \alpha_{6}\end{matrix}\right] = \left[\begin{matrix}0\\\alpha_{0} \lambda_{1}\\\left(\alpha_{0} + 2 \alpha_{1}\right) \lambda_{1} + 2 \alpha_{0}\\\left(\alpha_{0} + 3 \alpha_{1} + 3 \alpha_{2}\right) \lambda_{1} + 6 \alpha_{0} + 6 \alpha_{1}\\\left(\alpha_{0} + 4 \alpha_{1} + 6 \alpha_{2} + 4 \alpha_{3}\right) \lambda_{1} + 14 \alpha_{0} + 24 \alpha_{1} + 12 \alpha_{2}\\\left(\alpha_{0} + 5 \alpha_{1} + 10 \alpha_{2} + 10 \alpha_{3} + 5 \alpha_{4}\right) \lambda_{1} + 30 \alpha_{0} + 70 \alpha_{1} + 60 \alpha_{2} + 20 \alpha_{3}\\\left(\alpha_{0} + 6 \alpha_{1} + 15 \alpha_{2} + 20 \alpha_{3} + 15 \alpha_{4} + 6 \alpha_{5}\right) \lambda_{1} + 62 \alpha_{0} + 180 \alpha_{1} + 210 \alpha_{2} + 120 \alpha_{3} + 30 \alpha_{4}\\\left(\alpha_{0} + 7 \alpha_{1} + 21 \alpha_{2} + 35 \alpha_{3} + 35 \alpha_{4} + 21 \alpha_{5} + 7 \alpha_{6}\right) \lambda_{1} + 126 \alpha_{0} + 434 \alpha_{1} + 630 \alpha_{2} + 490 \alpha_{3} + 210 \alpha_{4} + 42 \alpha_{5}\end{matrix}\right], \quad 3 : \left[\begin{matrix}0\\0\\2 \alpha_{0}\\12 \alpha_{0} + 6 \alpha_{1}\\50 \alpha_{0} + 48 \alpha_{1} + 12 \alpha_{2}\\180 \alpha_{0} + 250 \alpha_{1} + 120 \alpha_{2} + 20 \alpha_{3}\\602 \alpha_{0} + 1080 \alpha_{1} + 750 \alpha_{2} + 240 \alpha_{3} + 30 \alpha_{4}\\1932 \alpha_{0} + 4214 \alpha_{1} + 3780 \alpha_{2} + 1750 \alpha_{3} + 420 \alpha_{4} + 42 \alpha_{5}\end{matrix}\right] = \left[\begin{matrix}0\\0\\2 \alpha_{0} \lambda_{1}\\6 \left(\alpha_{0} + \alpha_{1}\right) \lambda_{1} + 6 \alpha_{0}\\2 \left(7 \alpha_{0} + 12 \alpha_{1} + 6 \alpha_{2}\right) \lambda_{1} + 36 \alpha_{0} + 24 \alpha_{1}\\10 \left(3 \alpha_{0} + 7 \alpha_{1} + 6 \alpha_{2} + 2 \alpha_{3}\right) \lambda_{1} + 150 \alpha_{0} + 180 \alpha_{1} + 60 \alpha_{2}\\2 \left(31 \alpha_{0} + 90 \alpha_{1} + 105 \alpha_{2} + 60 \alpha_{3} + 15 \alpha_{4}\right) \lambda_{1} + 540 \alpha_{0} + 900 \alpha_{1} + 540 \alpha_{2} + 120 \alpha_{3}\\14 \left(9 \alpha_{0} + 31 \alpha_{1} + 45 \alpha_{2} + 35 \alpha_{3} + 15 \alpha_{4} + 3 \alpha_{5}\right) \lambda_{1} + 1806 \alpha_{0} + 3780 \alpha_{1} + 3150 \alpha_{2} + 1260 \alpha_{3} + 210 \alpha_{4}\end{matrix}\right], \quad 4 : \left[\begin{matrix}0\\0\\0\\6 \alpha_{0}\\60 \alpha_{0} + 24 \alpha_{1}\\390 \alpha_{0} + 300 \alpha_{1} + 60 \alpha_{2}\\2100 \alpha_{0} + 2340 \alpha_{1} + 900 \alpha_{2} + 120 \alpha_{3}\\10206 \alpha_{0} + 14700 \alpha_{1} + 8190 \alpha_{2} + 2100 \alpha_{3} + 210 \alpha_{4}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\6 \alpha_{0} \lambda_{1}\\12 \left(3 \alpha_{0} + 2 \alpha_{1}\right) \lambda_{1} + 24 \alpha_{0}\\30 \left(5 \alpha_{0} + 6 \alpha_{1} + 2 \alpha_{2}\right) \lambda_{1} + 240 \alpha_{0} + 120 \alpha_{1}\\60 \left(9 \alpha_{0} + 15 \alpha_{1} + 9 \alpha_{2} + 2 \alpha_{3}\right) \lambda_{1} + 1560 \alpha_{0} + 1440 \alpha_{1} + 360 \alpha_{2}\\42 \left(43 \alpha_{0} + 90 \alpha_{1} + 75 \alpha_{2} + 30 \alpha_{3} + 5 \alpha_{4}\right) \lambda_{1} + 8400 \alpha_{0} + 10920 \alpha_{1} + 5040 \alpha_{2} + 840 \alpha_{3}\end{matrix}\right], \quad 5 : \left[\begin{matrix}0\\0\\0\\0\\24 \alpha_{0}\\360 \alpha_{0} + 120 \alpha_{1}\\3360 \alpha_{0} + 2160 \alpha_{1} + 360 \alpha_{2}\\25200 \alpha_{0} + 23520 \alpha_{1} + 7560 \alpha_{2} + 840 \alpha_{3}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\24 \alpha_{0} \lambda_{1}\\120 \left(2 \alpha_{0} + \alpha_{1}\right) \lambda_{1} + 120 \alpha_{0}\\120 \left(13 \alpha_{0} + 12 \alpha_{1} + 3 \alpha_{2}\right) \lambda_{1} + 1800 \alpha_{0} + 720 \alpha_{1}\\840 \left(10 \alpha_{0} + 13 \alpha_{1} + 6 \alpha_{2} + \alpha_{3}\right) \lambda_{1} + 16800 \alpha_{0} + 12600 \alpha_{1} + 2520 \alpha_{2}\end{matrix}\right], \quad 6 : \left[\begin{matrix}0\\0\\0\\0\\0\\120 \alpha_{0}\\2520 \alpha_{0} + 720 \alpha_{1}\\31920 \alpha_{0} + 17640 \alpha_{1} + 2520 \alpha_{2}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\0\\120 \alpha_{0} \lambda_{1}\\360 \left(5 \alpha_{0} + 2 \alpha_{1}\right) \lambda_{1} + 720 \alpha_{0}\\840 \left(20 \alpha_{0} + 15 \alpha_{1} + 3 \alpha_{2}\right) \lambda_{1} + 15120 \alpha_{0} + 5040 \alpha_{1}\end{matrix}\right], \quad 7 : \left[\begin{matrix}0\\0\\0\\0\\0\\0\\720 \alpha_{0}\\20160 \alpha_{0} + 5040 \alpha_{1}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\720 \alpha_{0} \lambda_{1}\\5040 \left(3 \alpha_{0} + \alpha_{1}\right) \lambda_{1} + 5040 \alpha_{0}\end{matrix}\right], \quad 8 : \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\5040 \alpha_{0}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\5040 \alpha_{0} \lambda_{1}\end{matrix}\right]\right \}\right \}$$
In [62]:
miniblocks = Jordan_blocks(eigendata)
X_P, J_P = Jordan_normalform(eigendata, matrices=(P.rhs, M_space_v, miniblocks))
X_P_lambda = Lambda(alpha_vector, X_P.rhs)
In [63]:
X_P
Out[63]:
$$X = \left[\begin{matrix}\alpha_{0} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\alpha_{1} & \alpha_{0} & 0 & 0 & 0 & 0 & 0 & 0\\\alpha_{2} & \alpha_{0} + 2 \alpha_{1} & 2 \alpha_{0} & 0 & 0 & 0 & 0 & 0\\\alpha_{3} & \alpha_{0} + 3 \alpha_{1} + 3 \alpha_{2} & 6 \alpha_{0} + 6 \alpha_{1} & 6 \alpha_{0} & 0 & 0 & 0 & 0\\\alpha_{4} & \alpha_{0} + 4 \alpha_{1} + 6 \alpha_{2} + 4 \alpha_{3} & 14 \alpha_{0} + 24 \alpha_{1} + 12 \alpha_{2} & 36 \alpha_{0} + 24 \alpha_{1} & 24 \alpha_{0} & 0 & 0 & 0\\\alpha_{5} & \alpha_{0} + 5 \alpha_{1} + 10 \alpha_{2} + 10 \alpha_{3} + 5 \alpha_{4} & 30 \alpha_{0} + 70 \alpha_{1} + 60 \alpha_{2} + 20 \alpha_{3} & 150 \alpha_{0} + 180 \alpha_{1} + 60 \alpha_{2} & 240 \alpha_{0} + 120 \alpha_{1} & 120 \alpha_{0} & 0 & 0\\\alpha_{6} & \alpha_{0} + 6 \alpha_{1} + 15 \alpha_{2} + 20 \alpha_{3} + 15 \alpha_{4} + 6 \alpha_{5} & 62 \alpha_{0} + 180 \alpha_{1} + 210 \alpha_{2} + 120 \alpha_{3} + 30 \alpha_{4} & 540 \alpha_{0} + 900 \alpha_{1} + 540 \alpha_{2} + 120 \alpha_{3} & 1560 \alpha_{0} + 1440 \alpha_{1} + 360 \alpha_{2} & 1800 \alpha_{0} + 720 \alpha_{1} & 720 \alpha_{0} & 0\\\alpha_{7} & \alpha_{0} + 7 \alpha_{1} + 21 \alpha_{2} + 35 \alpha_{3} + 35 \alpha_{4} + 21 \alpha_{5} + 7 \alpha_{6} & 126 \alpha_{0} + 434 \alpha_{1} + 630 \alpha_{2} + 490 \alpha_{3} + 210 \alpha_{4} + 42 \alpha_{5} & 1806 \alpha_{0} + 3780 \alpha_{1} + 3150 \alpha_{2} + 1260 \alpha_{3} + 210 \alpha_{4} & 8400 \alpha_{0} + 10920 \alpha_{1} + 5040 \alpha_{2} + 840 \alpha_{3} & 16800 \alpha_{0} + 12600 \alpha_{1} + 2520 \alpha_{2} & 15120 \alpha_{0} + 5040 \alpha_{1} & 5040 \alpha_{0}\end{matrix}\right]$$
In [64]:
J_P
Out[64]:
$$J = \left[\begin{matrix}\lambda_{1} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & \lambda_{1} & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & \lambda_{1} & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & \lambda_{1} & 0 & 0 & 0 & 0\\0 & 0 & 0 & 1 & \lambda_{1} & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & \lambda_{1} & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & \lambda_{1} & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1 & \lambda_{1}\end{matrix}\right]$$
In [65]:
P_inverse_sim = (X_P.rhs * J_inverse * X_P.rhs**(-1)).applyfunc(lambda i: i.simplify().expand())
P_inverse_sim
Out[65]:
$$\left[\begin{matrix}\frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{2}{\lambda_{1}^{3}} & - \frac{2}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{6}{\lambda_{1}^{3}} - \frac{6}{\lambda_{1}^{4}} & - \frac{3}{\lambda_{1}^{2}} + \frac{6}{\lambda_{1}^{3}} & - \frac{3}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{14}{\lambda_{1}^{3}} - \frac{36}{\lambda_{1}^{4}} + \frac{24}{\lambda_{1}^{5}} & - \frac{4}{\lambda_{1}^{2}} + \frac{24}{\lambda_{1}^{3}} - \frac{24}{\lambda_{1}^{4}} & - \frac{6}{\lambda_{1}^{2}} + \frac{12}{\lambda_{1}^{3}} & - \frac{4}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{30}{\lambda_{1}^{3}} - \frac{150}{\lambda_{1}^{4}} + \frac{240}{\lambda_{1}^{5}} - \frac{120}{\lambda_{1}^{6}} & - \frac{5}{\lambda_{1}^{2}} + \frac{70}{\lambda_{1}^{3}} - \frac{180}{\lambda_{1}^{4}} + \frac{120}{\lambda_{1}^{5}} & - \frac{10}{\lambda_{1}^{2}} + \frac{60}{\lambda_{1}^{3}} - \frac{60}{\lambda_{1}^{4}} & - \frac{10}{\lambda_{1}^{2}} + \frac{20}{\lambda_{1}^{3}} & - \frac{5}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{62}{\lambda_{1}^{3}} - \frac{540}{\lambda_{1}^{4}} + \frac{1560}{\lambda_{1}^{5}} - \frac{1800}{\lambda_{1}^{6}} + \frac{720}{\lambda_{1}^{7}} & - \frac{6}{\lambda_{1}^{2}} + \frac{180}{\lambda_{1}^{3}} - \frac{900}{\lambda_{1}^{4}} + \frac{1440}{\lambda_{1}^{5}} - \frac{720}{\lambda_{1}^{6}} & - \frac{15}{\lambda_{1}^{2}} + \frac{210}{\lambda_{1}^{3}} - \frac{540}{\lambda_{1}^{4}} + \frac{360}{\lambda_{1}^{5}} & - \frac{20}{\lambda_{1}^{2}} + \frac{120}{\lambda_{1}^{3}} - \frac{120}{\lambda_{1}^{4}} & - \frac{15}{\lambda_{1}^{2}} + \frac{30}{\lambda_{1}^{3}} & - \frac{6}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{126}{\lambda_{1}^{3}} - \frac{1806}{\lambda_{1}^{4}} + \frac{8400}{\lambda_{1}^{5}} - \frac{16800}{\lambda_{1}^{6}} + \frac{15120}{\lambda_{1}^{7}} - \frac{5040}{\lambda_{1}^{8}} & - \frac{7}{\lambda_{1}^{2}} + \frac{434}{\lambda_{1}^{3}} - \frac{3780}{\lambda_{1}^{4}} + \frac{10920}{\lambda_{1}^{5}} - \frac{12600}{\lambda_{1}^{6}} + \frac{5040}{\lambda_{1}^{7}} & - \frac{21}{\lambda_{1}^{2}} + \frac{630}{\lambda_{1}^{3}} - \frac{3150}{\lambda_{1}^{4}} + \frac{5040}{\lambda_{1}^{5}} - \frac{2520}{\lambda_{1}^{6}} & - \frac{35}{\lambda_{1}^{2}} + \frac{490}{\lambda_{1}^{3}} - \frac{1260}{\lambda_{1}^{4}} + \frac{840}{\lambda_{1}^{5}} & - \frac{35}{\lambda_{1}^{2}} + \frac{210}{\lambda_{1}^{3}} - \frac{210}{\lambda_{1}^{4}} & - \frac{21}{\lambda_{1}^{2}} + \frac{42}{\lambda_{1}^{3}} & - \frac{7}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}}\end{matrix}\right]$$
In [66]:
Eq(symbols(r'J^{-1}'), J_inverse, evaluate=False)
Out[66]:
$$J^{-1} = \left[\begin{matrix}\frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0\\\frac{1}{\lambda_{1}^{3}} & - \frac{1}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{4}} & \frac{1}{\lambda_{1}^{3}} & - \frac{1}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0\\\frac{1}{\lambda_{1}^{5}} & - \frac{1}{\lambda_{1}^{4}} & \frac{1}{\lambda_{1}^{3}} & - \frac{1}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{6}} & \frac{1}{\lambda_{1}^{5}} & - \frac{1}{\lambda_{1}^{4}} & \frac{1}{\lambda_{1}^{3}} & - \frac{1}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0\\\frac{1}{\lambda_{1}^{7}} & - \frac{1}{\lambda_{1}^{6}} & \frac{1}{\lambda_{1}^{5}} & - \frac{1}{\lambda_{1}^{4}} & \frac{1}{\lambda_{1}^{3}} & - \frac{1}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0\\- \frac{1}{\lambda_{1}^{8}} & \frac{1}{\lambda_{1}^{7}} & - \frac{1}{\lambda_{1}^{6}} & \frac{1}{\lambda_{1}^{5}} & - \frac{1}{\lambda_{1}^{4}} & \frac{1}{\lambda_{1}^{3}} & - \frac{1}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}}\end{matrix}\right]$$
In [67]:
X_P_alpha0 = X_P_lambda(*([alpha[0]]+[0]*(m-1)))
Eq(symbols(r'X_{\boldsymbol{\alpha}}'), Mul(alpha[0],X_P_alpha0.applyfunc(lambda i: i/alpha[0]),evaluate=False), evaluate=False)
Out[67]:
$$X_{\boldsymbol{\alpha}} = \alpha_{0} \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 2 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 6 & 6 & 0 & 0 & 0 & 0\\0 & 1 & 14 & 36 & 24 & 0 & 0 & 0\\0 & 1 & 30 & 150 & 240 & 120 & 0 & 0\\0 & 1 & 62 & 540 & 1560 & 1800 & 720 & 0\\0 & 1 & 126 & 1806 & 8400 & 16800 & 15120 & 5040\end{matrix}\right]$$
In [68]:
(X_P_alpha0 * J_inverse * X_P_alpha0**(-1)).expand()
Out[68]:
$$\left[\begin{matrix}\frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{2}{\lambda_{1}^{3}} & - \frac{2}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{6}{\lambda_{1}^{3}} - \frac{6}{\lambda_{1}^{4}} & - \frac{3}{\lambda_{1}^{2}} + \frac{6}{\lambda_{1}^{3}} & - \frac{3}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{14}{\lambda_{1}^{3}} - \frac{36}{\lambda_{1}^{4}} + \frac{24}{\lambda_{1}^{5}} & - \frac{4}{\lambda_{1}^{2}} + \frac{24}{\lambda_{1}^{3}} - \frac{24}{\lambda_{1}^{4}} & - \frac{6}{\lambda_{1}^{2}} + \frac{12}{\lambda_{1}^{3}} & - \frac{4}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{30}{\lambda_{1}^{3}} - \frac{150}{\lambda_{1}^{4}} + \frac{240}{\lambda_{1}^{5}} - \frac{120}{\lambda_{1}^{6}} & - \frac{5}{\lambda_{1}^{2}} + \frac{70}{\lambda_{1}^{3}} - \frac{180}{\lambda_{1}^{4}} + \frac{120}{\lambda_{1}^{5}} & - \frac{10}{\lambda_{1}^{2}} + \frac{60}{\lambda_{1}^{3}} - \frac{60}{\lambda_{1}^{4}} & - \frac{10}{\lambda_{1}^{2}} + \frac{20}{\lambda_{1}^{3}} & - \frac{5}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{62}{\lambda_{1}^{3}} - \frac{540}{\lambda_{1}^{4}} + \frac{1560}{\lambda_{1}^{5}} - \frac{1800}{\lambda_{1}^{6}} + \frac{720}{\lambda_{1}^{7}} & - \frac{6}{\lambda_{1}^{2}} + \frac{180}{\lambda_{1}^{3}} - \frac{900}{\lambda_{1}^{4}} + \frac{1440}{\lambda_{1}^{5}} - \frac{720}{\lambda_{1}^{6}} & - \frac{15}{\lambda_{1}^{2}} + \frac{210}{\lambda_{1}^{3}} - \frac{540}{\lambda_{1}^{4}} + \frac{360}{\lambda_{1}^{5}} & - \frac{20}{\lambda_{1}^{2}} + \frac{120}{\lambda_{1}^{3}} - \frac{120}{\lambda_{1}^{4}} & - \frac{15}{\lambda_{1}^{2}} + \frac{30}{\lambda_{1}^{3}} & - \frac{6}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{126}{\lambda_{1}^{3}} - \frac{1806}{\lambda_{1}^{4}} + \frac{8400}{\lambda_{1}^{5}} - \frac{16800}{\lambda_{1}^{6}} + \frac{15120}{\lambda_{1}^{7}} - \frac{5040}{\lambda_{1}^{8}} & - \frac{7}{\lambda_{1}^{2}} + \frac{434}{\lambda_{1}^{3}} - \frac{3780}{\lambda_{1}^{4}} + \frac{10920}{\lambda_{1}^{5}} - \frac{12600}{\lambda_{1}^{6}} + \frac{5040}{\lambda_{1}^{7}} & - \frac{21}{\lambda_{1}^{2}} + \frac{630}{\lambda_{1}^{3}} - \frac{3150}{\lambda_{1}^{4}} + \frac{5040}{\lambda_{1}^{5}} - \frac{2520}{\lambda_{1}^{6}} & - \frac{35}{\lambda_{1}^{2}} + \frac{490}{\lambda_{1}^{3}} - \frac{1260}{\lambda_{1}^{4}} + \frac{840}{\lambda_{1}^{5}} & - \frac{35}{\lambda_{1}^{2}} + \frac{210}{\lambda_{1}^{3}} - \frac{210}{\lambda_{1}^{4}} & - \frac{21}{\lambda_{1}^{2}} + \frac{42}{\lambda_{1}^{3}} & - \frac{7}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}}\end{matrix}\right]$$
In [69]:
P_inverse_sim.subs(eigenvals)
Out[69]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\-1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\1 & -2 & 1 & 0 & 0 & 0 & 0 & 0\\-1 & 3 & -3 & 1 & 0 & 0 & 0 & 0\\1 & -4 & 6 & -4 & 1 & 0 & 0 & 0\\-1 & 5 & -10 & 10 & -5 & 1 & 0 & 0\\1 & -6 & 15 & -20 & 15 & -6 & 1 & 0\\-1 & 7 & -21 & 35 & -35 & 21 & -7 & 1\end{matrix}\right]$$
In [71]:
P.rhs*P_inverse_sim.subs(eigenvals)
Out[71]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\end{matrix}\right]$$
In [72]:
X_P.rhs * Iexp**(-1)
Out[72]:
$$\left[\begin{matrix}\alpha_{0} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\alpha_{1} & \alpha_{0} & 0 & 0 & 0 & 0 & 0 & 0\\\alpha_{2} & \alpha_{0} + 2 \alpha_{1} & \alpha_{0} & 0 & 0 & 0 & 0 & 0\\\alpha_{3} & \alpha_{0} + 3 \alpha_{1} + 3 \alpha_{2} & 3 \alpha_{0} + 3 \alpha_{1} & \alpha_{0} & 0 & 0 & 0 & 0\\\alpha_{4} & \alpha_{0} + 4 \alpha_{1} + 6 \alpha_{2} + 4 \alpha_{3} & 7 \alpha_{0} + 12 \alpha_{1} + 6 \alpha_{2} & 6 \alpha_{0} + 4 \alpha_{1} & \alpha_{0} & 0 & 0 & 0\\\alpha_{5} & \alpha_{0} + 5 \alpha_{1} + 10 \alpha_{2} + 10 \alpha_{3} + 5 \alpha_{4} & 15 \alpha_{0} + 35 \alpha_{1} + 30 \alpha_{2} + 10 \alpha_{3} & 25 \alpha_{0} + 30 \alpha_{1} + 10 \alpha_{2} & 10 \alpha_{0} + 5 \alpha_{1} & \alpha_{0} & 0 & 0\\\alpha_{6} & \alpha_{0} + 6 \alpha_{1} + 15 \alpha_{2} + 20 \alpha_{3} + 15 \alpha_{4} + 6 \alpha_{5} & 31 \alpha_{0} + 90 \alpha_{1} + 105 \alpha_{2} + 60 \alpha_{3} + 15 \alpha_{4} & 90 \alpha_{0} + 150 \alpha_{1} + 90 \alpha_{2} + 20 \alpha_{3} & 65 \alpha_{0} + 60 \alpha_{1} + 15 \alpha_{2} & 15 \alpha_{0} + 6 \alpha_{1} & \alpha_{0} & 0\\\alpha_{7} & \alpha_{0} + 7 \alpha_{1} + 21 \alpha_{2} + 35 \alpha_{3} + 35 \alpha_{4} + 21 \alpha_{5} + 7 \alpha_{6} & 63 \alpha_{0} + 217 \alpha_{1} + 315 \alpha_{2} + 245 \alpha_{3} + 105 \alpha_{4} + 21 \alpha_{5} & 301 \alpha_{0} + 630 \alpha_{1} + 525 \alpha_{2} + 210 \alpha_{3} + 35 \alpha_{4} & 350 \alpha_{0} + 455 \alpha_{1} + 210 \alpha_{2} + 35 \alpha_{3} & 140 \alpha_{0} + 105 \alpha_{1} + 21 \alpha_{2} & 21 \alpha_{0} + 7 \alpha_{1} & \alpha_{0}\end{matrix}\right]$$
In [73]:
inspect(X_P.rhs)
Out[73]:
nature(is_ordinary=False, is_exponential=False)
In [74]:
inspect((X_P.rhs * Iexp**(-1))[:5, :5])
Out[74]:
nature(is_ordinary=False, is_exponential=True)
In [170]:
selection = [1] + ([0]*(m-1))
X_P_1_0s = X_P_lambda(*selection)# * Iexp**(-1)
X_P_1_0s, Matrix(m, m, columns_symmetry(X_P_1_0s))
Out[170]:
$$\left ( \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 2 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 6 & 6 & 0 & 0 & 0 & 0\\0 & 1 & 14 & 36 & 24 & 0 & 0 & 0\\0 & 1 & 30 & 150 & 240 & 120 & 0 & 0\\0 & 1 & 62 & 540 & 1560 & 1800 & 720 & 0\\0 & 1 & 126 & 1806 & 8400 & 16800 & 15120 & 5040\end{matrix}\right], \quad \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\2 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\6 & 6 & 1 & 0 & 0 & 0 & 0 & 0\\24 & 36 & 14 & 1 & 0 & 0 & 0 & 0\\120 & 240 & 150 & 30 & 1 & 0 & 0 & 0\\720 & 1800 & 1560 & 540 & 62 & 1 & 0 & 0\\5040 & 15120 & 16800 & 8400 & 1806 & 126 & 1 & 0\end{matrix}\right]\right )$$
In [76]:
X_P_1_0s*Iexp**(-1)
Out[76]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 3 & 1 & 0 & 0 & 0 & 0\\0 & 1 & 7 & 6 & 1 & 0 & 0 & 0\\0 & 1 & 15 & 25 & 10 & 1 & 0 & 0\\0 & 1 & 31 & 90 & 65 & 15 & 1 & 0\\0 & 1 & 63 & 301 & 350 & 140 & 21 & 1\end{matrix}\right]$$
In [77]:
X_P_1_0s * J_inverse * X_P_1_0s**(-1)
Out[77]:
$$\left[\begin{matrix}\frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{2}{\lambda_{1}^{3}} & - \frac{2}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{6}{\lambda_{1}^{3}} - \frac{6}{\lambda_{1}^{4}} & - \frac{3}{\lambda_{1}^{2}} + \frac{6}{\lambda_{1}^{3}} & - \frac{3}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{14}{\lambda_{1}^{3}} - \frac{36}{\lambda_{1}^{4}} + \frac{24}{\lambda_{1}^{5}} & - \frac{4}{\lambda_{1}^{2}} + \frac{24}{\lambda_{1}^{3}} - \frac{24}{\lambda_{1}^{4}} & - \frac{6}{\lambda_{1}^{2}} + \frac{12}{\lambda_{1}^{3}} & - \frac{4}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{30}{\lambda_{1}^{3}} - \frac{150}{\lambda_{1}^{4}} + \frac{240}{\lambda_{1}^{5}} - \frac{120}{\lambda_{1}^{6}} & - \frac{5}{\lambda_{1}^{2}} + \frac{70}{\lambda_{1}^{3}} - \frac{180}{\lambda_{1}^{4}} + \frac{120}{\lambda_{1}^{5}} & - \frac{10}{\lambda_{1}^{2}} + \frac{60}{\lambda_{1}^{3}} - \frac{60}{\lambda_{1}^{4}} & - \frac{10}{\lambda_{1}^{2}} + \frac{20}{\lambda_{1}^{3}} & - \frac{5}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{62}{\lambda_{1}^{3}} - \frac{540}{\lambda_{1}^{4}} + \frac{1560}{\lambda_{1}^{5}} - \frac{1800}{\lambda_{1}^{6}} + \frac{720}{\lambda_{1}^{7}} & - \frac{6}{\lambda_{1}^{2}} + \frac{180}{\lambda_{1}^{3}} - \frac{900}{\lambda_{1}^{4}} + \frac{1440}{\lambda_{1}^{5}} - \frac{720}{\lambda_{1}^{6}} & - \frac{15}{\lambda_{1}^{2}} + \frac{210}{\lambda_{1}^{3}} - \frac{540}{\lambda_{1}^{4}} + \frac{360}{\lambda_{1}^{5}} & - \frac{20}{\lambda_{1}^{2}} + \frac{120}{\lambda_{1}^{3}} - \frac{120}{\lambda_{1}^{4}} & - \frac{15}{\lambda_{1}^{2}} + \frac{30}{\lambda_{1}^{3}} & - \frac{6}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{126}{\lambda_{1}^{3}} - \frac{1806}{\lambda_{1}^{4}} + \frac{8400}{\lambda_{1}^{5}} - \frac{16800}{\lambda_{1}^{6}} + \frac{15120}{\lambda_{1}^{7}} - \frac{5040}{\lambda_{1}^{8}} & - \frac{7}{\lambda_{1}^{2}} + \frac{434}{\lambda_{1}^{3}} - \frac{3780}{\lambda_{1}^{4}} + \frac{10920}{\lambda_{1}^{5}} - \frac{12600}{\lambda_{1}^{6}} + \frac{5040}{\lambda_{1}^{7}} & - \frac{21}{\lambda_{1}^{2}} + \frac{630}{\lambda_{1}^{3}} - \frac{3150}{\lambda_{1}^{4}} + \frac{5040}{\lambda_{1}^{5}} - \frac{2520}{\lambda_{1}^{6}} & - \frac{35}{\lambda_{1}^{2}} + \frac{490}{\lambda_{1}^{3}} - \frac{1260}{\lambda_{1}^{4}} + \frac{840}{\lambda_{1}^{5}} & - \frac{35}{\lambda_{1}^{2}} + \frac{210}{\lambda_{1}^{3}} - \frac{210}{\lambda_{1}^{4}} & - \frac{21}{\lambda_{1}^{2}} + \frac{42}{\lambda_{1}^{3}} & - \frac{7}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}}\end{matrix}\right]$$
In [79]:
(Iexp * J_abstract.rhs * Iexp**(-1)).subs({f:Lambda(x, 1/x)}).doit()
Out[79]:
$$\left[\begin{matrix}\frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0\\\frac{2}{\lambda_{1}^{3}} & - \frac{2}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0\\- \frac{6}{\lambda_{1}^{4}} & \frac{6}{\lambda_{1}^{3}} & - \frac{3}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0\\\frac{24}{\lambda_{1}^{5}} & - \frac{24}{\lambda_{1}^{4}} & \frac{12}{\lambda_{1}^{3}} & - \frac{4}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0\\- \frac{120}{\lambda_{1}^{6}} & \frac{120}{\lambda_{1}^{5}} & - \frac{60}{\lambda_{1}^{4}} & \frac{20}{\lambda_{1}^{3}} & - \frac{5}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0\\\frac{720}{\lambda_{1}^{7}} & - \frac{720}{\lambda_{1}^{6}} & \frac{360}{\lambda_{1}^{5}} & - \frac{120}{\lambda_{1}^{4}} & \frac{30}{\lambda_{1}^{3}} & - \frac{6}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0\\- \frac{5040}{\lambda_{1}^{8}} & \frac{5040}{\lambda_{1}^{7}} & - \frac{2520}{\lambda_{1}^{6}} & \frac{840}{\lambda_{1}^{5}} & - \frac{210}{\lambda_{1}^{4}} & \frac{42}{\lambda_{1}^{3}} & - \frac{7}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}}\end{matrix}\right]$$
In [80]:
inspect(_)
Out[80]:
nature(is_ordinary=False, is_exponential=True)
In [81]:
Iexp * Matrix(m, m, identity_matrix()) * Iexp**(-1) # because `Iexp` is diagonal
Out[81]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\end{matrix}\right]$$
In [83]:
(X_P_1_0s * J_inverse * X_P_1_0s**(-1))
Out[83]:
$$\left[\begin{matrix}\frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{2}{\lambda_{1}^{3}} & - \frac{2}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{6}{\lambda_{1}^{3}} - \frac{6}{\lambda_{1}^{4}} & - \frac{3}{\lambda_{1}^{2}} + \frac{6}{\lambda_{1}^{3}} & - \frac{3}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{14}{\lambda_{1}^{3}} - \frac{36}{\lambda_{1}^{4}} + \frac{24}{\lambda_{1}^{5}} & - \frac{4}{\lambda_{1}^{2}} + \frac{24}{\lambda_{1}^{3}} - \frac{24}{\lambda_{1}^{4}} & - \frac{6}{\lambda_{1}^{2}} + \frac{12}{\lambda_{1}^{3}} & - \frac{4}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{30}{\lambda_{1}^{3}} - \frac{150}{\lambda_{1}^{4}} + \frac{240}{\lambda_{1}^{5}} - \frac{120}{\lambda_{1}^{6}} & - \frac{5}{\lambda_{1}^{2}} + \frac{70}{\lambda_{1}^{3}} - \frac{180}{\lambda_{1}^{4}} + \frac{120}{\lambda_{1}^{5}} & - \frac{10}{\lambda_{1}^{2}} + \frac{60}{\lambda_{1}^{3}} - \frac{60}{\lambda_{1}^{4}} & - \frac{10}{\lambda_{1}^{2}} + \frac{20}{\lambda_{1}^{3}} & - \frac{5}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{62}{\lambda_{1}^{3}} - \frac{540}{\lambda_{1}^{4}} + \frac{1560}{\lambda_{1}^{5}} - \frac{1800}{\lambda_{1}^{6}} + \frac{720}{\lambda_{1}^{7}} & - \frac{6}{\lambda_{1}^{2}} + \frac{180}{\lambda_{1}^{3}} - \frac{900}{\lambda_{1}^{4}} + \frac{1440}{\lambda_{1}^{5}} - \frac{720}{\lambda_{1}^{6}} & - \frac{15}{\lambda_{1}^{2}} + \frac{210}{\lambda_{1}^{3}} - \frac{540}{\lambda_{1}^{4}} + \frac{360}{\lambda_{1}^{5}} & - \frac{20}{\lambda_{1}^{2}} + \frac{120}{\lambda_{1}^{3}} - \frac{120}{\lambda_{1}^{4}} & - \frac{15}{\lambda_{1}^{2}} + \frac{30}{\lambda_{1}^{3}} & - \frac{6}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{126}{\lambda_{1}^{3}} - \frac{1806}{\lambda_{1}^{4}} + \frac{8400}{\lambda_{1}^{5}} - \frac{16800}{\lambda_{1}^{6}} + \frac{15120}{\lambda_{1}^{7}} - \frac{5040}{\lambda_{1}^{8}} & - \frac{7}{\lambda_{1}^{2}} + \frac{434}{\lambda_{1}^{3}} - \frac{3780}{\lambda_{1}^{4}} + \frac{10920}{\lambda_{1}^{5}} - \frac{12600}{\lambda_{1}^{6}} + \frac{5040}{\lambda_{1}^{7}} & - \frac{21}{\lambda_{1}^{2}} + \frac{630}{\lambda_{1}^{3}} - \frac{3150}{\lambda_{1}^{4}} + \frac{5040}{\lambda_{1}^{5}} - \frac{2520}{\lambda_{1}^{6}} & - \frac{35}{\lambda_{1}^{2}} + \frac{490}{\lambda_{1}^{3}} - \frac{1260}{\lambda_{1}^{4}} + \frac{840}{\lambda_{1}^{5}} & - \frac{35}{\lambda_{1}^{2}} + \frac{210}{\lambda_{1}^{3}} - \frac{210}{\lambda_{1}^{4}} & - \frac{21}{\lambda_{1}^{2}} + \frac{42}{\lambda_{1}^{3}} & - \frac{7}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}}\end{matrix}\right]$$
In [169]:
selection = [1] * m
X_P_1s = X_P_lambda(*selection) #* Iexp**(-1)
X_P_1s, Matrix(m, m, columns_symmetry(X_P_1s))
Out[169]:
$$\left ( \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 3 & 2 & 0 & 0 & 0 & 0 & 0\\1 & 7 & 12 & 6 & 0 & 0 & 0 & 0\\1 & 15 & 50 & 60 & 24 & 0 & 0 & 0\\1 & 31 & 180 & 390 & 360 & 120 & 0 & 0\\1 & 63 & 602 & 2100 & 3360 & 2520 & 720 & 0\\1 & 127 & 1932 & 10206 & 25200 & 31920 & 20160 & 5040\end{matrix}\right], \quad \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\2 & 3 & 1 & 0 & 0 & 0 & 0 & 0\\6 & 12 & 7 & 1 & 0 & 0 & 0 & 0\\24 & 60 & 50 & 15 & 1 & 0 & 0 & 0\\120 & 360 & 390 & 180 & 31 & 1 & 0 & 0\\720 & 2520 & 3360 & 2100 & 602 & 63 & 1 & 0\\5040 & 20160 & 31920 & 25200 & 10206 & 1932 & 127 & 1\end{matrix}\right]\right )$$
In [164]:
selection = list(range(1,m+1))
X_P_1s = X_P_lambda(*selection) #* Iexp**(-1)
X_P_1s
Out[164]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\2 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\3 & 5 & 2 & 0 & 0 & 0 & 0 & 0\\4 & 16 & 18 & 6 & 0 & 0 & 0 & 0\\5 & 43 & 98 & 84 & 24 & 0 & 0 & 0\\6 & 106 & 430 & 690 & 480 & 120 & 0 & 0\\7 & 249 & 1682 & 4440 & 5520 & 3240 & 720 & 0\\8 & 568 & 6146 & 24906 & 48720 & 49560 & 25200 & 5040\end{matrix}\right]$$
In [85]:
(X_P_1s * J_inverse * X_P_1s**(-1))
Out[85]:
$$\left[\begin{matrix}\frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{2}{\lambda_{1}^{3}} & - \frac{2}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{6}{\lambda_{1}^{3}} - \frac{6}{\lambda_{1}^{4}} & - \frac{3}{\lambda_{1}^{2}} + \frac{6}{\lambda_{1}^{3}} & - \frac{3}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{14}{\lambda_{1}^{3}} - \frac{36}{\lambda_{1}^{4}} + \frac{24}{\lambda_{1}^{5}} & - \frac{4}{\lambda_{1}^{2}} + \frac{24}{\lambda_{1}^{3}} - \frac{24}{\lambda_{1}^{4}} & - \frac{6}{\lambda_{1}^{2}} + \frac{12}{\lambda_{1}^{3}} & - \frac{4}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{30}{\lambda_{1}^{3}} - \frac{150}{\lambda_{1}^{4}} + \frac{240}{\lambda_{1}^{5}} - \frac{120}{\lambda_{1}^{6}} & - \frac{5}{\lambda_{1}^{2}} + \frac{70}{\lambda_{1}^{3}} - \frac{180}{\lambda_{1}^{4}} + \frac{120}{\lambda_{1}^{5}} & - \frac{10}{\lambda_{1}^{2}} + \frac{60}{\lambda_{1}^{3}} - \frac{60}{\lambda_{1}^{4}} & - \frac{10}{\lambda_{1}^{2}} + \frac{20}{\lambda_{1}^{3}} & - \frac{5}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0 & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{62}{\lambda_{1}^{3}} - \frac{540}{\lambda_{1}^{4}} + \frac{1560}{\lambda_{1}^{5}} - \frac{1800}{\lambda_{1}^{6}} + \frac{720}{\lambda_{1}^{7}} & - \frac{6}{\lambda_{1}^{2}} + \frac{180}{\lambda_{1}^{3}} - \frac{900}{\lambda_{1}^{4}} + \frac{1440}{\lambda_{1}^{5}} - \frac{720}{\lambda_{1}^{6}} & - \frac{15}{\lambda_{1}^{2}} + \frac{210}{\lambda_{1}^{3}} - \frac{540}{\lambda_{1}^{4}} + \frac{360}{\lambda_{1}^{5}} & - \frac{20}{\lambda_{1}^{2}} + \frac{120}{\lambda_{1}^{3}} - \frac{120}{\lambda_{1}^{4}} & - \frac{15}{\lambda_{1}^{2}} + \frac{30}{\lambda_{1}^{3}} & - \frac{6}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}} & 0\\- \frac{1}{\lambda_{1}^{2}} + \frac{126}{\lambda_{1}^{3}} - \frac{1806}{\lambda_{1}^{4}} + \frac{8400}{\lambda_{1}^{5}} - \frac{16800}{\lambda_{1}^{6}} + \frac{15120}{\lambda_{1}^{7}} - \frac{5040}{\lambda_{1}^{8}} & - \frac{7}{\lambda_{1}^{2}} + \frac{434}{\lambda_{1}^{3}} - \frac{3780}{\lambda_{1}^{4}} + \frac{10920}{\lambda_{1}^{5}} - \frac{12600}{\lambda_{1}^{6}} + \frac{5040}{\lambda_{1}^{7}} & - \frac{21}{\lambda_{1}^{2}} + \frac{630}{\lambda_{1}^{3}} - \frac{3150}{\lambda_{1}^{4}} + \frac{5040}{\lambda_{1}^{5}} - \frac{2520}{\lambda_{1}^{6}} & - \frac{35}{\lambda_{1}^{2}} + \frac{490}{\lambda_{1}^{3}} - \frac{1260}{\lambda_{1}^{4}} + \frac{840}{\lambda_{1}^{5}} & - \frac{35}{\lambda_{1}^{2}} + \frac{210}{\lambda_{1}^{3}} - \frac{210}{\lambda_{1}^{4}} & - \frac{21}{\lambda_{1}^{2}} + \frac{42}{\lambda_{1}^{3}} & - \frac{7}{\lambda_{1}^{2}} & \frac{1}{\lambda_{1}}\end{matrix}\right]$$
In [86]:
selection = [1] + ([t]*(m-1))
X_P_lambda(*selection) * Iexp**(-1)
Out[86]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\t & 1 & 0 & 0 & 0 & 0 & 0 & 0\\t & 2 t + 1 & 1 & 0 & 0 & 0 & 0 & 0\\t & 6 t + 1 & 3 t + 3 & 1 & 0 & 0 & 0 & 0\\t & 14 t + 1 & 18 t + 7 & 4 t + 6 & 1 & 0 & 0 & 0\\t & 30 t + 1 & 75 t + 15 & 40 t + 25 & 5 t + 10 & 1 & 0 & 0\\t & 62 t + 1 & 270 t + 31 & 260 t + 90 & 75 t + 65 & 6 t + 15 & 1 & 0\\t & 126 t + 1 & 903 t + 63 & 1400 t + 301 & 700 t + 350 & 126 t + 140 & 7 t + 21 & 1\end{matrix}\right]$$
In [87]:
selection = [t**i for i in range(m)]
X_P_lambda(*selection) * Iexp**(-1)
Out[87]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\t & 1 & 0 & 0 & 0 & 0 & 0 & 0\\t^{2} & 2 t + 1 & 1 & 0 & 0 & 0 & 0 & 0\\t^{3} & 3 t^{2} + 3 t + 1 & 3 t + 3 & 1 & 0 & 0 & 0 & 0\\t^{4} & 4 t^{3} + 6 t^{2} + 4 t + 1 & 6 t^{2} + 12 t + 7 & 4 t + 6 & 1 & 0 & 0 & 0\\t^{5} & 5 t^{4} + 10 t^{3} + 10 t^{2} + 5 t + 1 & 10 t^{3} + 30 t^{2} + 35 t + 15 & 10 t^{2} + 30 t + 25 & 5 t + 10 & 1 & 0 & 0\\t^{6} & 6 t^{5} + 15 t^{4} + 20 t^{3} + 15 t^{2} + 6 t + 1 & 15 t^{4} + 60 t^{3} + 105 t^{2} + 90 t + 31 & 20 t^{3} + 90 t^{2} + 150 t + 90 & 15 t^{2} + 60 t + 65 & 6 t + 15 & 1 & 0\\t^{7} & 7 t^{6} + 21 t^{5} + 35 t^{4} + 35 t^{3} + 21 t^{2} + 7 t + 1 & 21 t^{5} + 105 t^{4} + 245 t^{3} + 315 t^{2} + 217 t + 63 & 35 t^{4} + 210 t^{3} + 525 t^{2} + 630 t + 301 & 35 t^{3} + 210 t^{2} + 455 t + 350 & 21 t^{2} + 105 t + 140 & 7 t + 21 & 1\end{matrix}\right]$$
In [88]:
# FX=XJ
assert ((P.rhs*X_P.rhs).applyfunc(lambda i: i.subs(eigenvals).radsimp().expand())==
(X_P.rhs*J_P.rhs).applyfunc(lambda i: i.subs(eigenvals).radsimp().expand()))
In [92]:
C = riordan_matrix_by_convolution(m,
Eq(Function('d')(t), 1),
Eq(Function('h')(t), (exp(t)-1).series(t, n=m).removeO()))
Matrix(m, m, C), Matrix(m, m, riordan_matrix_exponential(C))
Out[92]:
$$\left ( \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{1}{2} & 1 & 0 & 0 & 0 & 0 & 0\\0 & \frac{1}{6} & 1 & 1 & 0 & 0 & 0 & 0\\0 & \frac{1}{24} & \frac{7}{12} & \frac{3}{2} & 1 & 0 & 0 & 0\\0 & \frac{1}{120} & \frac{1}{4} & \frac{5}{4} & 2 & 1 & 0 & 0\\0 & \frac{1}{720} & \frac{31}{360} & \frac{3}{4} & \frac{13}{6} & \frac{5}{2} & 1 & 0\\0 & \frac{1}{5040} & \frac{1}{40} & \frac{43}{120} & \frac{5}{3} & \frac{10}{3} & 3 & 1\end{matrix}\right], \quad \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 3 & 1 & 0 & 0 & 0 & 0\\0 & 1 & 7 & 6 & 1 & 0 & 0 & 0\\0 & 1 & 15 & 25 & 10 & 1 & 0 & 0\\0 & 1 & 31 & 90 & 65 & 15 & 1 & 0\\0 & 1 & 63 & 301 & 350 & 140 & 21 & 1\end{matrix}\right]\right )$$
In [93]:
eta = IndexedBase(r'\eta')
(X_P.rhs**(-1) * Matrix(m,1,lambda n,k: eta[n])).subs({alpha[i]:0 if i else 1 for i in range(m)}).applyfunc(simplify)
Out[93]:
$$\left[\begin{matrix}\eta_{0}\\\eta_{1}\\- \frac{\eta_{1}}{2} + \frac{\eta_{2}}{2}\\\frac{\eta_{1}}{3} - \frac{\eta_{2}}{2} + \frac{\eta_{3}}{6}\\- \frac{\eta_{1}}{4} + \frac{11 \eta_{2}}{24} - \frac{\eta_{3}}{4} + \frac{\eta_{4}}{24}\\\frac{\eta_{1}}{5} - \frac{5 \eta_{2}}{12} + \frac{7 \eta_{3}}{24} - \frac{\eta_{4}}{12} + \frac{\eta_{5}}{120}\\- \frac{\eta_{1}}{6} + \frac{137 \eta_{2}}{360} - \frac{5 \eta_{3}}{16} + \frac{17 \eta_{4}}{144} - \frac{\eta_{5}}{48} + \frac{\eta_{6}}{720}\\\frac{\eta_{1}}{7} - \frac{7 \eta_{2}}{20} + \frac{29 \eta_{3}}{90} - \frac{7 \eta_{4}}{48} + \frac{5 \eta_{5}}{144} - \frac{\eta_{6}}{240} + \frac{\eta_{7}}{5040}\end{matrix}\right]$$
In [94]:
(X_P.rhs**(-1) * Matrix(m,1,lambda n,k: alpha[n])).applyfunc(simplify)
Out[94]:
$$\left[\begin{matrix}1\\0\\0\\0\\0\\0\\0\\0\end{matrix}\right]$$
In [108]:
m = 8
A = Eq(Function('A')(t), 1/(1-t))
C = define(Symbol(r'\mathcal{C}'), Matrix(m, m, riordan_matrix_by_AZ_sequences(m, (A, A))))
C
Out[108]:
$$\mathcal{C} = \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\2 & 2 & 1 & 0 & 0 & 0 & 0 & 0\\5 & 5 & 3 & 1 & 0 & 0 & 0 & 0\\14 & 14 & 9 & 4 & 1 & 0 & 0 & 0\\42 & 42 & 28 & 14 & 5 & 1 & 0 & 0\\132 & 132 & 90 & 48 & 20 & 6 & 1 & 0\\429 & 429 & 297 & 165 & 75 & 27 & 7 & 1\end{matrix}\right]$$
In [112]:
eigendata = spectrum(C)
data, eigenvals, multiplicities = eigendata.rhs
Phi_polynomials = component_polynomials(eigendata, early_eigenvals_subs=True)
cmatrices = component_matrices(C, Phi_polynomials)
In [113]:
cmatrices
Out[113]:
$$\left \{ \left ( 1, \quad 1\right ) : Z^{\left[ \mathcal{C} \right]}_{1,1} = \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\end{matrix}\right], \quad \left ( 1, \quad 2\right ) : Z^{\left[ \mathcal{C} \right]}_{1,2} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\2 & 2 & 0 & 0 & 0 & 0 & 0 & 0\\5 & 5 & 3 & 0 & 0 & 0 & 0 & 0\\14 & 14 & 9 & 4 & 0 & 0 & 0 & 0\\42 & 42 & 28 & 14 & 5 & 0 & 0 & 0\\132 & 132 & 90 & 48 & 20 & 6 & 0 & 0\\429 & 429 & 297 & 165 & 75 & 27 & 7 & 0\end{matrix}\right], \quad \left ( 1, \quad 3\right ) : Z^{\left[ \mathcal{C} \right]}_{1,3} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{11}{2} & 3 & 0 & 0 & 0 & 0 & 0 & 0\\26 & 19 & 6 & 0 & 0 & 0 & 0 & 0\\119 & 98 & \frac{87}{2} & 10 & 0 & 0 & 0 & 0\\542 & 476 & 246 & 82 & 15 & 0 & 0 & 0\\2478 & \frac{4527}{2} & 1278 & 507 & \frac{275}{2} & 21 & 0 & 0\end{matrix}\right], \quad \left ( 1, \quad 4\right ) : Z^{\left[ \mathcal{C} \right]}_{1,4} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{31}{3} & 4 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{235}{3} & \frac{137}{3} & 10 & 0 & 0 & 0 & 0 & 0\\\frac{1588}{3} & \frac{1112}{3} & 127 & 20 & 0 & 0 & 0 & 0\\\frac{20323}{6} & \frac{7898}{3} & \frac{2231}{2} & \frac{844}{3} & 35 & 0 & 0 & 0\end{matrix}\right], \quad \left ( 1, \quad 5\right ) : Z^{\left[ \mathcal{C} \right]}_{1,5} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{197}{12} & 5 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{1087}{6} & \frac{177}{2} & 15 & 0 & 0 & 0 & 0 & 0\\\frac{20281}{12} & \frac{12383}{12} & \frac{1159}{4} & 35 & 0 & 0 & 0 & 0\end{matrix}\right], \quad \left ( 1, \quad 6\right ) : Z^{\left[ \mathcal{C} \right]}_{1,6} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{237}{10} & 6 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{21437}{60} & \frac{1509}{10} & 21 & 0 & 0 & 0 & 0 & 0\end{matrix}\right], \quad \left ( 1, \quad 7\right ) : Z^{\left[ \mathcal{C} \right]}_{1,7} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{643}{20} & 7 & 0 & 0 & 0 & 0 & 0 & 0\end{matrix}\right], \quad \left ( 1, \quad 8\right ) : Z^{\left[ \mathcal{C} \right]}_{1,8} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\end{matrix}\right]\right \}$$
In [114]:
beta_vector = Matrix(m, 1, lambda i, _: beta[i])
M_space_ctor = M_space(cmatrices)
M_space_v = M_space_ctor(beta_vector)
In [115]:
M_space_v
Out[115]:
$$\left \{ 1 : \left \{ 1 : \boldsymbol{x}_{1,1} = \left[\begin{matrix}\beta_{0}\\\beta_{1}\\\beta_{2}\\\beta_{3}\\\beta_{4}\\\beta_{5}\\\beta_{6}\\\beta_{7}\end{matrix}\right], \quad 2 : \boldsymbol{x}_{1,2} = \left[\begin{matrix}0\\\beta_{0}\\2 \beta_{0} + 2 \beta_{1}\\5 \beta_{0} + 5 \beta_{1} + 3 \beta_{2}\\14 \beta_{0} + 14 \beta_{1} + 9 \beta_{2} + 4 \beta_{3}\\42 \beta_{0} + 42 \beta_{1} + 28 \beta_{2} + 14 \beta_{3} + 5 \beta_{4}\\132 \beta_{0} + 132 \beta_{1} + 90 \beta_{2} + 48 \beta_{3} + 20 \beta_{4} + 6 \beta_{5}\\429 \beta_{0} + 429 \beta_{1} + 297 \beta_{2} + 165 \beta_{3} + 75 \beta_{4} + 27 \beta_{5} + 7 \beta_{6}\end{matrix}\right], \quad 3 : \boldsymbol{x}_{1,3} = \left[\begin{matrix}0\\0\\2 \beta_{0}\\11 \beta_{0} + 6 \beta_{1}\\52 \beta_{0} + 38 \beta_{1} + 12 \beta_{2}\\238 \beta_{0} + 196 \beta_{1} + 87 \beta_{2} + 20 \beta_{3}\\1084 \beta_{0} + 952 \beta_{1} + 492 \beta_{2} + 164 \beta_{3} + 30 \beta_{4}\\4956 \beta_{0} + 4527 \beta_{1} + 2556 \beta_{2} + 1014 \beta_{3} + 275 \beta_{4} + 42 \beta_{5}\end{matrix}\right], \quad 4 : \boldsymbol{x}_{1,4} = \left[\begin{matrix}0\\0\\0\\6 \beta_{0}\\62 \beta_{0} + 24 \beta_{1}\\470 \beta_{0} + 274 \beta_{1} + 60 \beta_{2}\\3176 \beta_{0} + 2224 \beta_{1} + 762 \beta_{2} + 120 \beta_{3}\\20323 \beta_{0} + 15796 \beta_{1} + 6693 \beta_{2} + 1688 \beta_{3} + 210 \beta_{4}\end{matrix}\right], \quad 5 : \boldsymbol{x}_{1,5} = \left[\begin{matrix}0\\0\\0\\0\\24 \beta_{0}\\394 \beta_{0} + 120 \beta_{1}\\4348 \beta_{0} + 2124 \beta_{1} + 360 \beta_{2}\\40562 \beta_{0} + 24766 \beta_{1} + 6954 \beta_{2} + 840 \beta_{3}\end{matrix}\right], \quad 6 : \boldsymbol{x}_{1,6} = \left[\begin{matrix}0\\0\\0\\0\\0\\120 \beta_{0}\\2844 \beta_{0} + 720 \beta_{1}\\42874 \beta_{0} + 18108 \beta_{1} + 2520 \beta_{2}\end{matrix}\right], \quad 7 : \boldsymbol{x}_{1,7} = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\720 \beta_{0}\\23148 \beta_{0} + 5040 \beta_{1}\end{matrix}\right], \quad 8 : \boldsymbol{x}_{1,8} = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\5040 \beta_{0}\end{matrix}\right]\right \}\right \}$$
In [116]:
relations = generalized_eigenvectors_relations(eigendata)
eqs = relations(C.rhs, M_space_v)
eqs
Out[116]:
$$\left \{ 1 : \left \{ 1 : \left[\begin{matrix}\beta_{0}\\\beta_{0} + \beta_{1}\\2 \beta_{0} + 2 \beta_{1} + \beta_{2}\\5 \beta_{0} + 5 \beta_{1} + 3 \beta_{2} + \beta_{3}\\14 \beta_{0} + 14 \beta_{1} + 9 \beta_{2} + 4 \beta_{3} + \beta_{4}\\42 \beta_{0} + 42 \beta_{1} + 28 \beta_{2} + 14 \beta_{3} + 5 \beta_{4} + \beta_{5}\\132 \beta_{0} + 132 \beta_{1} + 90 \beta_{2} + 48 \beta_{3} + 20 \beta_{4} + 6 \beta_{5} + \beta_{6}\\429 \beta_{0} + 429 \beta_{1} + 297 \beta_{2} + 165 \beta_{3} + 75 \beta_{4} + 27 \beta_{5} + 7 \beta_{6} + \beta_{7}\end{matrix}\right] = \left[\begin{matrix}\beta_{0} \lambda_{1}\\\beta_{0} + \beta_{1} \lambda_{1}\\2 \beta_{0} + 2 \beta_{1} + \beta_{2} \lambda_{1}\\5 \beta_{0} + 5 \beta_{1} + 3 \beta_{2} + \beta_{3} \lambda_{1}\\14 \beta_{0} + 14 \beta_{1} + 9 \beta_{2} + 4 \beta_{3} + \beta_{4} \lambda_{1}\\42 \beta_{0} + 42 \beta_{1} + 28 \beta_{2} + 14 \beta_{3} + 5 \beta_{4} + \beta_{5} \lambda_{1}\\132 \beta_{0} + 132 \beta_{1} + 90 \beta_{2} + 48 \beta_{3} + 20 \beta_{4} + 6 \beta_{5} + \beta_{6} \lambda_{1}\\429 \beta_{0} + 429 \beta_{1} + 297 \beta_{2} + 165 \beta_{3} + 75 \beta_{4} + 27 \beta_{5} + 7 \beta_{6} + \beta_{7} \lambda_{1}\end{matrix}\right], \quad 2 : \left[\begin{matrix}0\\\beta_{0}\\4 \beta_{0} + 2 \beta_{1}\\16 \beta_{0} + 11 \beta_{1} + 3 \beta_{2}\\66 \beta_{0} + 52 \beta_{1} + 21 \beta_{2} + 4 \beta_{3}\\280 \beta_{0} + 238 \beta_{1} + 115 \beta_{2} + 34 \beta_{3} + 5 \beta_{4}\\1216 \beta_{0} + 1084 \beta_{1} + 582 \beta_{2} + 212 \beta_{3} + 50 \beta_{4} + 6 \beta_{5}\\5385 \beta_{0} + 4956 \beta_{1} + 2853 \beta_{2} + 1179 \beta_{3} + 350 \beta_{4} + 69 \beta_{5} + 7 \beta_{6}\end{matrix}\right] = \left[\begin{matrix}0\\\beta_{0} \lambda_{1}\\2 \left(\beta_{0} + \beta_{1}\right) \lambda_{1} + 2 \beta_{0}\\\left(5 \beta_{0} + 5 \beta_{1} + 3 \beta_{2}\right) \lambda_{1} + 11 \beta_{0} + 6 \beta_{1}\\\left(14 \beta_{0} + 14 \beta_{1} + 9 \beta_{2} + 4 \beta_{3}\right) \lambda_{1} + 52 \beta_{0} + 38 \beta_{1} + 12 \beta_{2}\\\left(42 \beta_{0} + 42 \beta_{1} + 28 \beta_{2} + 14 \beta_{3} + 5 \beta_{4}\right) \lambda_{1} + 238 \beta_{0} + 196 \beta_{1} + 87 \beta_{2} + 20 \beta_{3}\\2 \left(66 \beta_{0} + 66 \beta_{1} + 45 \beta_{2} + 24 \beta_{3} + 10 \beta_{4} + 3 \beta_{5}\right) \lambda_{1} + 1084 \beta_{0} + 952 \beta_{1} + 492 \beta_{2} + 164 \beta_{3} + 30 \beta_{4}\\\left(429 \beta_{0} + 429 \beta_{1} + 297 \beta_{2} + 165 \beta_{3} + 75 \beta_{4} + 27 \beta_{5} + 7 \beta_{6}\right) \lambda_{1} + 4956 \beta_{0} + 4527 \beta_{1} + 2556 \beta_{2} + 1014 \beta_{3} + 275 \beta_{4} + 42 \beta_{5}\end{matrix}\right], \quad 3 : \left[\begin{matrix}0\\0\\2 \beta_{0}\\17 \beta_{0} + 6 \beta_{1}\\114 \beta_{0} + 62 \beta_{1} + 12 \beta_{2}\\708 \beta_{0} + 470 \beta_{1} + 147 \beta_{2} + 20 \beta_{3}\\4260 \beta_{0} + 3176 \beta_{1} + 1254 \beta_{2} + 284 \beta_{3} + 30 \beta_{4}\\25279 \beta_{0} + 20323 \beta_{1} + 9249 \beta_{2} + 2702 \beta_{3} + 485 \beta_{4} + 42 \beta_{5}\end{matrix}\right] = \left[\begin{matrix}0\\0\\2 \beta_{0} \lambda_{1}\\\left(11 \beta_{0} + 6 \beta_{1}\right) \lambda_{1} + 6 \beta_{0}\\2 \left(26 \beta_{0} + 19 \beta_{1} + 6 \beta_{2}\right) \lambda_{1} + 62 \beta_{0} + 24 \beta_{1}\\\left(238 \beta_{0} + 196 \beta_{1} + 87 \beta_{2} + 20 \beta_{3}\right) \lambda_{1} + 470 \beta_{0} + 274 \beta_{1} + 60 \beta_{2}\\2 \left(542 \beta_{0} + 476 \beta_{1} + 246 \beta_{2} + 82 \beta_{3} + 15 \beta_{4}\right) \lambda_{1} + 3176 \beta_{0} + 2224 \beta_{1} + 762 \beta_{2} + 120 \beta_{3}\\\left(4956 \beta_{0} + 4527 \beta_{1} + 2556 \beta_{2} + 1014 \beta_{3} + 275 \beta_{4} + 42 \beta_{5}\right) \lambda_{1} + 20323 \beta_{0} + 15796 \beta_{1} + 6693 \beta_{2} + 1688 \beta_{3} + 210 \beta_{4}\end{matrix}\right], \quad 4 : \left[\begin{matrix}0\\0\\0\\6 \beta_{0}\\86 \beta_{0} + 24 \beta_{1}\\864 \beta_{0} + 394 \beta_{1} + 60 \beta_{2}\\7524 \beta_{0} + 4348 \beta_{1} + 1122 \beta_{2} + 120 \beta_{3}\\60885 \beta_{0} + 40562 \beta_{1} + 13647 \beta_{2} + 2528 \beta_{3} + 210 \beta_{4}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\6 \beta_{0} \lambda_{1}\\2 \left(31 \beta_{0} + 12 \beta_{1}\right) \lambda_{1} + 24 \beta_{0}\\2 \left(235 \beta_{0} + 137 \beta_{1} + 30 \beta_{2}\right) \lambda_{1} + 394 \beta_{0} + 120 \beta_{1}\\2 \left(1588 \beta_{0} + 1112 \beta_{1} + 381 \beta_{2} + 60 \beta_{3}\right) \lambda_{1} + 4348 \beta_{0} + 2124 \beta_{1} + 360 \beta_{2}\\\left(20323 \beta_{0} + 15796 \beta_{1} + 6693 \beta_{2} + 1688 \beta_{3} + 210 \beta_{4}\right) \lambda_{1} + 40562 \beta_{0} + 24766 \beta_{1} + 6954 \beta_{2} + 840 \beta_{3}\end{matrix}\right], \quad 5 : \left[\begin{matrix}0\\0\\0\\0\\24 \beta_{0}\\514 \beta_{0} + 120 \beta_{1}\\7192 \beta_{0} + 2844 \beta_{1} + 360 \beta_{2}\\83436 \beta_{0} + 42874 \beta_{1} + 9474 \beta_{2} + 840 \beta_{3}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\24 \beta_{0} \lambda_{1}\\2 \left(197 \beta_{0} + 60 \beta_{1}\right) \lambda_{1} + 120 \beta_{0}\\4 \left(1087 \beta_{0} + 531 \beta_{1} + 90 \beta_{2}\right) \lambda_{1} + 2844 \beta_{0} + 720 \beta_{1}\\2 \left(20281 \beta_{0} + 12383 \beta_{1} + 3477 \beta_{2} + 420 \beta_{3}\right) \lambda_{1} + 42874 \beta_{0} + 18108 \beta_{1} + 2520 \beta_{2}\end{matrix}\right], \quad 6 : \left[\begin{matrix}0\\0\\0\\0\\0\\120 \beta_{0}\\3564 \beta_{0} + 720 \beta_{1}\\66022 \beta_{0} + 23148 \beta_{1} + 2520 \beta_{2}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\0\\120 \beta_{0} \lambda_{1}\\36 \left(79 \beta_{0} + 20 \beta_{1}\right) \lambda_{1} + 720 \beta_{0}\\2 \left(21437 \beta_{0} + 9054 \beta_{1} + 1260 \beta_{2}\right) \lambda_{1} + 23148 \beta_{0} + 5040 \beta_{1}\end{matrix}\right], \quad 7 : \left[\begin{matrix}0\\0\\0\\0\\0\\0\\720 \beta_{0}\\28188 \beta_{0} + 5040 \beta_{1}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\720 \beta_{0} \lambda_{1}\\36 \left(643 \beta_{0} + 140 \beta_{1}\right) \lambda_{1} + 5040 \beta_{0}\end{matrix}\right], \quad 8 : \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\5040 \beta_{0}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\5040 \beta_{0} \lambda_{1}\end{matrix}\right]\right \}\right \}$$
In [117]:
miniblocks = Jordan_blocks(eigendata)
X_C, J_C = Jordan_normalform(eigendata, matrices=(C.rhs, M_space_v, miniblocks))
X_C_lambda = Lambda(beta_vector, X_C.rhs)
In [118]:
X_C, J_C
Out[118]:
$$\left ( X = \left[\begin{matrix}\beta_{0} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\beta_{1} & \beta_{0} & 0 & 0 & 0 & 0 & 0 & 0\\\beta_{2} & 2 \beta_{0} + 2 \beta_{1} & 2 \beta_{0} & 0 & 0 & 0 & 0 & 0\\\beta_{3} & 5 \beta_{0} + 5 \beta_{1} + 3 \beta_{2} & 11 \beta_{0} + 6 \beta_{1} & 6 \beta_{0} & 0 & 0 & 0 & 0\\\beta_{4} & 14 \beta_{0} + 14 \beta_{1} + 9 \beta_{2} + 4 \beta_{3} & 52 \beta_{0} + 38 \beta_{1} + 12 \beta_{2} & 62 \beta_{0} + 24 \beta_{1} & 24 \beta_{0} & 0 & 0 & 0\\\beta_{5} & 42 \beta_{0} + 42 \beta_{1} + 28 \beta_{2} + 14 \beta_{3} + 5 \beta_{4} & 238 \beta_{0} + 196 \beta_{1} + 87 \beta_{2} + 20 \beta_{3} & 470 \beta_{0} + 274 \beta_{1} + 60 \beta_{2} & 394 \beta_{0} + 120 \beta_{1} & 120 \beta_{0} & 0 & 0\\\beta_{6} & 132 \beta_{0} + 132 \beta_{1} + 90 \beta_{2} + 48 \beta_{3} + 20 \beta_{4} + 6 \beta_{5} & 1084 \beta_{0} + 952 \beta_{1} + 492 \beta_{2} + 164 \beta_{3} + 30 \beta_{4} & 3176 \beta_{0} + 2224 \beta_{1} + 762 \beta_{2} + 120 \beta_{3} & 4348 \beta_{0} + 2124 \beta_{1} + 360 \beta_{2} & 2844 \beta_{0} + 720 \beta_{1} & 720 \beta_{0} & 0\\\beta_{7} & 429 \beta_{0} + 429 \beta_{1} + 297 \beta_{2} + 165 \beta_{3} + 75 \beta_{4} + 27 \beta_{5} + 7 \beta_{6} & 4956 \beta_{0} + 4527 \beta_{1} + 2556 \beta_{2} + 1014 \beta_{3} + 275 \beta_{4} + 42 \beta_{5} & 20323 \beta_{0} + 15796 \beta_{1} + 6693 \beta_{2} + 1688 \beta_{3} + 210 \beta_{4} & 40562 \beta_{0} + 24766 \beta_{1} + 6954 \beta_{2} + 840 \beta_{3} & 42874 \beta_{0} + 18108 \beta_{1} + 2520 \beta_{2} & 23148 \beta_{0} + 5040 \beta_{1} & 5040 \beta_{0}\end{matrix}\right], \quad J = \left[\begin{matrix}\lambda_{1} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & \lambda_{1} & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & \lambda_{1} & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & \lambda_{1} & 0 & 0 & 0 & 0\\0 & 0 & 0 & 1 & \lambda_{1} & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & \lambda_{1} & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & \lambda_{1} & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1 & \lambda_{1}\end{matrix}\right]\right )$$
In [119]:
X_C_beta0 = X_C_lambda(*([beta[0]]+([0]*(m-1))))
Eq(symbols(r'Y_{\boldsymbol{\beta}}'), Mul(beta[0], X_C_beta0.applyfunc(lambda i: i/beta[0]), evaluate=False), evaluate=False)
Out[119]:
$$Y_{\boldsymbol{\beta}} = \beta_{0} \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 2 & 2 & 0 & 0 & 0 & 0 & 0\\0 & 5 & 11 & 6 & 0 & 0 & 0 & 0\\0 & 14 & 52 & 62 & 24 & 0 & 0 & 0\\0 & 42 & 238 & 470 & 394 & 120 & 0 & 0\\0 & 132 & 1084 & 3176 & 4348 & 2844 & 720 & 0\\0 & 429 & 4956 & 20323 & 40562 & 42874 & 23148 & 5040\end{matrix}\right]$$
In [120]:
X_C_inverse = X_C_beta0**(-1)
XY_P_C = X_P_alpha0 * X_C_inverse
Mul(alpha[0]/beta[0], XY_P_C.applyfunc(lambda i: i*beta[0]/alpha[0]), evaluate=False)
Out[120]:
$$\frac{\alpha_{0}}{\beta_{0}} \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & -1 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 1 & - \frac{5}{2} & 1 & 0 & 0 & 0 & 0\\0 & -1 & \frac{29}{6} & - \frac{13}{3} & 1 & 0 & 0 & 0\\0 & 1 & - \frac{613}{72} & \frac{467}{36} & - \frac{77}{12} & 1 & 0 & 0\\0 & -1 & \frac{10331}{720} & - \frac{11989}{360} & \frac{3199}{120} & - \frac{87}{10} & 1 & 0\\0 & 1 & - \frac{1019899}{43200} & \frac{1701701}{21600} & - \frac{656591}{7200} & \frac{28183}{600} & - \frac{223}{20} & 1\end{matrix}\right]$$
In [122]:
XY_P_C**(-1) * P.rhs * XY_P_C
Out[122]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\2 & 2 & 1 & 0 & 0 & 0 & 0 & 0\\5 & 5 & 3 & 1 & 0 & 0 & 0 & 0\\14 & 14 & 9 & 4 & 1 & 0 & 0 & 0\\42 & 42 & 28 & 14 & 5 & 1 & 0 & 0\\132 & 132 & 90 & 48 & 20 & 6 & 1 & 0\\429 & 429 & 297 & 165 & 75 & 27 & 7 & 1\end{matrix}\right]$$
In [123]:
unknowns = {(n,k): beta[n,k] for n in range(m) for k in range(n+1)}
sols = solve(X_P_alpha0- Matrix(m, m, lambda n,k: unknowns.get((n,k), 0))*Iexp, list(unknowns.values()))
Matrix(m, m, lambda n,k: sols.get(beta[n,k], 0))
Out[123]:
$$\left[\begin{matrix}\alpha_{0} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & \alpha_{0} & 0 & 0 & 0 & 0 & 0 & 0\\0 & \alpha_{0} & \alpha_{0} & 0 & 0 & 0 & 0 & 0\\0 & \alpha_{0} & 3 \alpha_{0} & \alpha_{0} & 0 & 0 & 0 & 0\\0 & \alpha_{0} & 7 \alpha_{0} & 6 \alpha_{0} & \alpha_{0} & 0 & 0 & 0\\0 & \alpha_{0} & 15 \alpha_{0} & 25 \alpha_{0} & 10 \alpha_{0} & \alpha_{0} & 0 & 0\\0 & \alpha_{0} & 31 \alpha_{0} & 90 \alpha_{0} & 65 \alpha_{0} & 15 \alpha_{0} & \alpha_{0} & 0\\0 & \alpha_{0} & 63 \alpha_{0} & 301 \alpha_{0} & 350 \alpha_{0} & 140 \alpha_{0} & 21 \alpha_{0} & \alpha_{0}\end{matrix}\right]$$
In [124]:
unknowns = {(n,k): beta[n,k] for n in range(m) for k in range(n+1)}
sols = solve(X_C.rhs- Matrix(m, m, lambda n,k: unknowns.get((n,k), 0))*Iexp, list(unknowns.values()))
Matrix(m, m, lambda n,k: sols.get(beta[n,k], 0))
Out[124]:
$$\left[\begin{matrix}\beta_{0} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\beta_{1} & \beta_{0} & 0 & 0 & 0 & 0 & 0 & 0\\\beta_{2} & 2 \beta_{0} + 2 \beta_{1} & \beta_{0} & 0 & 0 & 0 & 0 & 0\\\beta_{3} & 5 \beta_{0} + 5 \beta_{1} + 3 \beta_{2} & \frac{11 \beta_{0}}{2} + 3 \beta_{1} & \beta_{0} & 0 & 0 & 0 & 0\\\beta_{4} & 14 \beta_{0} + 14 \beta_{1} + 9 \beta_{2} + 4 \beta_{3} & 26 \beta_{0} + 19 \beta_{1} + 6 \beta_{2} & \frac{31 \beta_{0}}{3} + 4 \beta_{1} & \beta_{0} & 0 & 0 & 0\\\beta_{5} & 42 \beta_{0} + 42 \beta_{1} + 28 \beta_{2} + 14 \beta_{3} + 5 \beta_{4} & 119 \beta_{0} + 98 \beta_{1} + \frac{87 \beta_{2}}{2} + 10 \beta_{3} & \frac{235 \beta_{0}}{3} + \frac{137 \beta_{1}}{3} + 10 \beta_{2} & \frac{197 \beta_{0}}{12} + 5 \beta_{1} & \beta_{0} & 0 & 0\\\beta_{6} & 132 \beta_{0} + 132 \beta_{1} + 90 \beta_{2} + 48 \beta_{3} + 20 \beta_{4} + 6 \beta_{5} & 542 \beta_{0} + 476 \beta_{1} + 246 \beta_{2} + 82 \beta_{3} + 15 \beta_{4} & \frac{1588 \beta_{0}}{3} + \frac{1112 \beta_{1}}{3} + 127 \beta_{2} + 20 \beta_{3} & \frac{1087 \beta_{0}}{6} + \frac{177 \beta_{1}}{2} + 15 \beta_{2} & \frac{237 \beta_{0}}{10} + 6 \beta_{1} & \beta_{0} & 0\\\beta_{7} & 429 \beta_{0} + 429 \beta_{1} + 297 \beta_{2} + 165 \beta_{3} + 75 \beta_{4} + 27 \beta_{5} + 7 \beta_{6} & 2478 \beta_{0} + \frac{4527 \beta_{1}}{2} + 1278 \beta_{2} + 507 \beta_{3} + \frac{275 \beta_{4}}{2} + 21 \beta_{5} & \frac{20323 \beta_{0}}{6} + \frac{7898 \beta_{1}}{3} + \frac{2231 \beta_{2}}{2} + \frac{844 \beta_{3}}{3} + 35 \beta_{4} & \frac{20281 \beta_{0}}{12} + \frac{12383 \beta_{1}}{12} + \frac{1159 \beta_{2}}{4} + 35 \beta_{3} & \frac{21437 \beta_{0}}{60} + \frac{1509 \beta_{1}}{10} + 21 \beta_{2} & \frac{643 \beta_{0}}{20} + 7 \beta_{1} & \beta_{0}\end{matrix}\right]$$
In [125]:
_.subs({beta[i]:0 if i else 1 for i in range(m)})
Out[125]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 2 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 5 & \frac{11}{2} & 1 & 0 & 0 & 0 & 0\\0 & 14 & 26 & \frac{31}{3} & 1 & 0 & 0 & 0\\0 & 42 & 119 & \frac{235}{3} & \frac{197}{12} & 1 & 0 & 0\\0 & 132 & 542 & \frac{1588}{3} & \frac{1087}{6} & \frac{237}{10} & 1 & 0\\0 & 429 & 2478 & \frac{20323}{6} & \frac{20281}{12} & \frac{21437}{60} & \frac{643}{20} & 1\end{matrix}\right]$$
In [127]:
assert (XY_P_C**(-1) * P.rhs**r * XY_P_C).simplify() == (C.rhs**r).applyfunc(simplify)
In [128]:
YX_C_P = X_C_beta0 * X_P_alpha0**(-1)
Mul(beta[0]/alpha[0], YX_C_P.applyfunc(lambda i: i*alpha[0]/beta[0]), evaluate=False)
Out[128]:
$$\frac{\beta_{0}}{\alpha_{0}} \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 1 & 0 & 0 & 0 & 0 & 0\\0 & \frac{3}{2} & \frac{5}{2} & 1 & 0 & 0 & 0 & 0\\0 & \frac{8}{3} & 6 & \frac{13}{3} & 1 & 0 & 0 & 0\\0 & \frac{31}{6} & \frac{175}{12} & \frac{89}{6} & \frac{77}{12} & 1 & 0 & 0\\0 & \frac{157}{15} & \frac{215}{6} & \frac{281}{6} & \frac{175}{6} & \frac{87}{10} & 1 & 0\\0 & \frac{649}{30} & \frac{1767}{20} & \frac{851}{6} & 115 & \frac{1501}{30} & \frac{223}{20} & 1\end{matrix}\right]$$
In [131]:
assert YX_C_P**(-1)*C.rhs*YX_C_P == P.rhs
In [136]:
assert XY_P_C * YX_C_P == Matrix(m, m, identity_matrix())
In [137]:
selection = [1] + ([0]*(m-1))
X_C_lambda(*selection) * Iexp**(-1)
Out[137]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 2 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 5 & \frac{11}{2} & 1 & 0 & 0 & 0 & 0\\0 & 14 & 26 & \frac{31}{3} & 1 & 0 & 0 & 0\\0 & 42 & 119 & \frac{235}{3} & \frac{197}{12} & 1 & 0 & 0\\0 & 132 & 542 & \frac{1588}{3} & \frac{1087}{6} & \frac{237}{10} & 1 & 0\\0 & 429 & 2478 & \frac{20323}{6} & \frac{20281}{12} & \frac{21437}{60} & \frac{643}{20} & 1\end{matrix}\right]$$
In [138]:
selection = [1] * m
X_C_lambda(*selection) * Iexp**(-1)
Out[138]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 4 & 1 & 0 & 0 & 0 & 0 & 0\\1 & 13 & \frac{17}{2} & 1 & 0 & 0 & 0 & 0\\1 & 41 & 51 & \frac{43}{3} & 1 & 0 & 0 & 0\\1 & 131 & \frac{541}{2} & 134 & \frac{257}{12} & 1 & 0 & 0\\1 & 428 & 1361 & 1047 & \frac{854}{3} & \frac{297}{10} & 1 & 0\\1 & 1429 & 6685 & \frac{22355}{3} & \frac{12187}{4} & \frac{31751}{60} & \frac{783}{20} & 1\end{matrix}\right]$$
In [139]:
selection = [1] + ([t]*(m-1))
X_C_lambda(*selection) * Iexp**(-1)
Out[139]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\t & 1 & 0 & 0 & 0 & 0 & 0 & 0\\t & 2 t + 2 & 1 & 0 & 0 & 0 & 0 & 0\\t & 8 t + 5 & 3 t + \frac{11}{2} & 1 & 0 & 0 & 0 & 0\\t & 27 t + 14 & 25 t + 26 & 4 t + \frac{31}{3} & 1 & 0 & 0 & 0\\t & 89 t + 42 & \frac{303 t}{2} + 119 & \frac{167 t}{3} + \frac{235}{3} & 5 t + \frac{197}{12} & 1 & 0 & 0\\t & 296 t + 132 & 819 t + 542 & \frac{1553 t}{3} + \frac{1588}{3} & \frac{207 t}{2} + \frac{1087}{6} & 6 t + \frac{237}{10} & 1 & 0\\t & 1000 t + 429 & 4207 t + 2478 & \frac{8129 t}{2} + \frac{20323}{6} & \frac{4070 t}{3} + \frac{20281}{12} & \frac{1719 t}{10} + \frac{21437}{60} & 7 t + \frac{643}{20} & 1\end{matrix}\right]$$
In [140]:
selection = [t**i for i in range(m)]
X_C_lambda(*selection) * Iexp**(-1)
Out[140]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\t & 1 & 0 & 0 & 0 & 0 & 0 & 0\\t^{2} & 2 t + 2 & 1 & 0 & 0 & 0 & 0 & 0\\t^{3} & 3 t^{2} + 5 t + 5 & 3 t + \frac{11}{2} & 1 & 0 & 0 & 0 & 0\\t^{4} & 4 t^{3} + 9 t^{2} + 14 t + 14 & 6 t^{2} + 19 t + 26 & 4 t + \frac{31}{3} & 1 & 0 & 0 & 0\\t^{5} & 5 t^{4} + 14 t^{3} + 28 t^{2} + 42 t + 42 & 10 t^{3} + \frac{87 t^{2}}{2} + 98 t + 119 & 10 t^{2} + \frac{137 t}{3} + \frac{235}{3} & 5 t + \frac{197}{12} & 1 & 0 & 0\\t^{6} & 6 t^{5} + 20 t^{4} + 48 t^{3} + 90 t^{2} + 132 t + 132 & 15 t^{4} + 82 t^{3} + 246 t^{2} + 476 t + 542 & 20 t^{3} + 127 t^{2} + \frac{1112 t}{3} + \frac{1588}{3} & 15 t^{2} + \frac{177 t}{2} + \frac{1087}{6} & 6 t + \frac{237}{10} & 1 & 0\\t^{7} & 7 t^{6} + 27 t^{5} + 75 t^{4} + 165 t^{3} + 297 t^{2} + 429 t + 429 & 21 t^{5} + \frac{275 t^{4}}{2} + 507 t^{3} + 1278 t^{2} + \frac{4527 t}{2} + 2478 & 35 t^{4} + \frac{844 t^{3}}{3} + \frac{2231 t^{2}}{2} + \frac{7898 t}{3} + \frac{20323}{6} & 35 t^{3} + \frac{1159 t^{2}}{4} + \frac{12383 t}{12} + \frac{20281}{12} & 21 t^{2} + \frac{1509 t}{10} + \frac{21437}{60} & 7 t + \frac{643}{20} & 1\end{matrix}\right]$$
In [141]:
# FX=XJ
assert ((C.rhs*X_C.rhs).applyfunc(lambda i: i.subs(eigenvals).radsimp().expand())==
(X_C.rhs*J_C.rhs).applyfunc(lambda i: i.subs(eigenvals).radsimp().expand()))
In [142]:
from sympy.functions.combinatorial.numbers import stirling
In [143]:
m=8
S2 = define(Symbol(r'\mathcal{S}'), Matrix(m, m, lambda n,k: stirling(n,k, kind=2)))
S2
Out[143]:
$$\mathcal{S} = \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 3 & 1 & 0 & 0 & 0 & 0\\0 & 1 & 7 & 6 & 1 & 0 & 0 & 0\\0 & 1 & 15 & 25 & 10 & 1 & 0 & 0\\0 & 1 & 31 & 90 & 65 & 15 & 1 & 0\\0 & 1 & 63 & 301 & 350 & 140 & 21 & 1\end{matrix}\right]$$
In [145]:
eigendata = spectrum(S2)
data, eigenvals, multiplicities = eigendata.rhs
Phi_polynomials = component_polynomials(eigendata, early_eigenvals_subs=True)
cmatrices = component_matrices(S2, Phi_polynomials)
In [146]:
cmatrices
Out[146]:
$$\left \{ \left ( 1, \quad 1\right ) : Z^{\left[ \mathcal{S} \right]}_{1,1} = \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\end{matrix}\right], \quad \left ( 1, \quad 2\right ) : Z^{\left[ \mathcal{S} \right]}_{1,2} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 3 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 7 & 6 & 0 & 0 & 0 & 0\\0 & 1 & 15 & 25 & 10 & 0 & 0 & 0\\0 & 1 & 31 & 90 & 65 & 15 & 0 & 0\\0 & 1 & 63 & 301 & 350 & 140 & 21 & 0\end{matrix}\right], \quad \left ( 1, \quad 3\right ) : Z^{\left[ \mathcal{S} \right]}_{1,3} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{3}{2} & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{13}{2} & 9 & 0 & 0 & 0 & 0 & 0\\0 & 25 & \frac{145}{2} & 30 & 0 & 0 & 0 & 0\\0 & \frac{201}{2} & 475 & \frac{765}{2} & 75 & 0 & 0 & 0\\0 & \frac{875}{2} & 3052 & 3745 & \frac{2765}{2} & \frac{315}{2} & 0 & 0\end{matrix}\right], \quad \left ( 1, \quad 4\right ) : Z^{\left[ \mathcal{S} \right]}_{1,4} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 3 & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{205}{6} & 30 & 0 & 0 & 0 & 0 & 0\\0 & \frac{1865}{6} & \frac{1115}{2} & 150 & 0 & 0 & 0 & 0\\0 & 2779 & \frac{23275}{3} & \frac{8155}{2} & 525 & 0 & 0 & 0\end{matrix}\right], \quad \left ( 1, \quad 5\right ) : Z^{\left[ \mathcal{S} \right]}_{1,5} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{15}{2} & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{1415}{8} & \frac{225}{2} & 0 & 0 & 0 & 0 & 0\\0 & \frac{74165}{24} & \frac{31815}{8} & \frac{1575}{2} & 0 & 0 & 0 & 0\end{matrix}\right], \quad \left ( 1, \quad 6\right ) : Z^{\left[ \mathcal{S} \right]}_{1,6} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{45}{2} & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{7623}{8} & \frac{945}{2} & 0 & 0 & 0 & 0 & 0\end{matrix}\right], \quad \left ( 1, \quad 7\right ) : Z^{\left[ \mathcal{S} \right]}_{1,7} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & \frac{315}{4} & 0 & 0 & 0 & 0 & 0 & 0\end{matrix}\right], \quad \left ( 1, \quad 8\right ) : Z^{\left[ \mathcal{S} \right]}_{1,8} = \left[\begin{matrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\end{matrix}\right]\right \}$$
In [147]:
gamma = IndexedBase(r'\gamma')
gamma_vector = Matrix(m, 1, lambda i, _: gamma[i])
M_space_ctor = M_space(cmatrices)
M_space_v = M_space_ctor(gamma_vector)
In [148]:
M_space_v
Out[148]:
$$\left \{ 1 : \left \{ 1 : \boldsymbol{x}_{1,1} = \left[\begin{matrix}\gamma_{0}\\\gamma_{1}\\\gamma_{2}\\\gamma_{3}\\\gamma_{4}\\\gamma_{5}\\\gamma_{6}\\\gamma_{7}\end{matrix}\right], \quad 2 : \boldsymbol{x}_{1,2} = \left[\begin{matrix}0\\0\\\gamma_{1}\\\gamma_{1} + 3 \gamma_{2}\\\gamma_{1} + 7 \gamma_{2} + 6 \gamma_{3}\\\gamma_{1} + 15 \gamma_{2} + 25 \gamma_{3} + 10 \gamma_{4}\\\gamma_{1} + 31 \gamma_{2} + 90 \gamma_{3} + 65 \gamma_{4} + 15 \gamma_{5}\\\gamma_{1} + 63 \gamma_{2} + 301 \gamma_{3} + 350 \gamma_{4} + 140 \gamma_{5} + 21 \gamma_{6}\end{matrix}\right], \quad 3 : \boldsymbol{x}_{1,3} = \left[\begin{matrix}0\\0\\0\\3 \gamma_{1}\\13 \gamma_{1} + 18 \gamma_{2}\\50 \gamma_{1} + 145 \gamma_{2} + 60 \gamma_{3}\\201 \gamma_{1} + 950 \gamma_{2} + 765 \gamma_{3} + 150 \gamma_{4}\\875 \gamma_{1} + 6104 \gamma_{2} + 7490 \gamma_{3} + 2765 \gamma_{4} + 315 \gamma_{5}\end{matrix}\right], \quad 4 : \boldsymbol{x}_{1,4} = \left[\begin{matrix}0\\0\\0\\0\\18 \gamma_{1}\\205 \gamma_{1} + 180 \gamma_{2}\\1865 \gamma_{1} + 3345 \gamma_{2} + 900 \gamma_{3}\\16674 \gamma_{1} + 46550 \gamma_{2} + 24465 \gamma_{3} + 3150 \gamma_{4}\end{matrix}\right], \quad 5 : \boldsymbol{x}_{1,5} = \left[\begin{matrix}0\\0\\0\\0\\0\\180 \gamma_{1}\\4245 \gamma_{1} + 2700 \gamma_{2}\\74165 \gamma_{1} + 95445 \gamma_{2} + 18900 \gamma_{3}\end{matrix}\right], \quad 6 : \boldsymbol{x}_{1,6} = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\2700 \gamma_{1}\\114345 \gamma_{1} + 56700 \gamma_{2}\end{matrix}\right], \quad 7 : \boldsymbol{x}_{1,7} = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\56700 \gamma_{1}\end{matrix}\right], \quad 8 : \boldsymbol{x}_{1,8} = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\0\end{matrix}\right]\right \}\right \}$$
In [149]:
relations = generalized_eigenvectors_relations(eigendata)
eqs = relations(S2.rhs, M_space_v, check=True)
eqs
Out[149]:
$$\left \{ 1 : \left \{ 1 : \left[\begin{matrix}\gamma_{0}\\\gamma_{1}\\\gamma_{1} + \gamma_{2}\\\gamma_{1} + 3 \gamma_{2} + \gamma_{3}\\\gamma_{1} + 7 \gamma_{2} + 6 \gamma_{3} + \gamma_{4}\\\gamma_{1} + 15 \gamma_{2} + 25 \gamma_{3} + 10 \gamma_{4} + \gamma_{5}\\\gamma_{1} + 31 \gamma_{2} + 90 \gamma_{3} + 65 \gamma_{4} + 15 \gamma_{5} + \gamma_{6}\\\gamma_{1} + 63 \gamma_{2} + 301 \gamma_{3} + 350 \gamma_{4} + 140 \gamma_{5} + 21 \gamma_{6} + \gamma_{7}\end{matrix}\right] = \left[\begin{matrix}\gamma_{0} \lambda_{1}\\\gamma_{1} \lambda_{1}\\\gamma_{1} + \gamma_{2} \lambda_{1}\\\gamma_{1} + 3 \gamma_{2} + \gamma_{3} \lambda_{1}\\\gamma_{1} + 7 \gamma_{2} + 6 \gamma_{3} + \gamma_{4} \lambda_{1}\\\gamma_{1} + 15 \gamma_{2} + 25 \gamma_{3} + 10 \gamma_{4} + \gamma_{5} \lambda_{1}\\\gamma_{1} + 31 \gamma_{2} + 90 \gamma_{3} + 65 \gamma_{4} + 15 \gamma_{5} + \gamma_{6} \lambda_{1}\\\gamma_{1} + 63 \gamma_{2} + 301 \gamma_{3} + 350 \gamma_{4} + 140 \gamma_{5} + 21 \gamma_{6} + \gamma_{7} \lambda_{1}\end{matrix}\right], \quad 2 : \left[\begin{matrix}0\\0\\\gamma_{1}\\4 \gamma_{1} + 3 \gamma_{2}\\14 \gamma_{1} + 25 \gamma_{2} + 6 \gamma_{3}\\51 \gamma_{1} + 160 \gamma_{2} + 85 \gamma_{3} + 10 \gamma_{4}\\202 \gamma_{1} + 981 \gamma_{2} + 855 \gamma_{3} + 215 \gamma_{4} + 15 \gamma_{5}\\876 \gamma_{1} + 6167 \gamma_{2} + 7791 \gamma_{3} + 3115 \gamma_{4} + 455 \gamma_{5} + 21 \gamma_{6}\end{matrix}\right] = \left[\begin{matrix}0\\0\\\gamma_{1} \lambda_{1}\\\left(\gamma_{1} + 3 \gamma_{2}\right) \lambda_{1} + 3 \gamma_{1}\\\left(\gamma_{1} + 7 \gamma_{2} + 6 \gamma_{3}\right) \lambda_{1} + 13 \gamma_{1} + 18 \gamma_{2}\\\left(\gamma_{1} + 15 \gamma_{2} + 25 \gamma_{3} + 10 \gamma_{4}\right) \lambda_{1} + 50 \gamma_{1} + 145 \gamma_{2} + 60 \gamma_{3}\\\left(\gamma_{1} + 31 \gamma_{2} + 90 \gamma_{3} + 65 \gamma_{4} + 15 \gamma_{5}\right) \lambda_{1} + 201 \gamma_{1} + 950 \gamma_{2} + 765 \gamma_{3} + 150 \gamma_{4}\\\left(\gamma_{1} + 63 \gamma_{2} + 301 \gamma_{3} + 350 \gamma_{4} + 140 \gamma_{5} + 21 \gamma_{6}\right) \lambda_{1} + 875 \gamma_{1} + 6104 \gamma_{2} + 7490 \gamma_{3} + 2765 \gamma_{4} + 315 \gamma_{5}\end{matrix}\right], \quad 3 : \left[\begin{matrix}0\\0\\0\\3 \gamma_{1}\\31 \gamma_{1} + 18 \gamma_{2}\\255 \gamma_{1} + 325 \gamma_{2} + 60 \gamma_{3}\\2066 \gamma_{1} + 4295 \gamma_{2} + 1665 \gamma_{3} + 150 \gamma_{4}\\17549 \gamma_{1} + 52654 \gamma_{2} + 31955 \gamma_{3} + 5915 \gamma_{4} + 315 \gamma_{5}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\3 \gamma_{1} \lambda_{1}\\\left(13 \gamma_{1} + 18 \gamma_{2}\right) \lambda_{1} + 18 \gamma_{1}\\5 \left(10 \gamma_{1} + 29 \gamma_{2} + 12 \gamma_{3}\right) \lambda_{1} + 205 \gamma_{1} + 180 \gamma_{2}\\\left(201 \gamma_{1} + 950 \gamma_{2} + 765 \gamma_{3} + 150 \gamma_{4}\right) \lambda_{1} + 1865 \gamma_{1} + 3345 \gamma_{2} + 900 \gamma_{3}\\7 \left(125 \gamma_{1} + 872 \gamma_{2} + 1070 \gamma_{3} + 395 \gamma_{4} + 45 \gamma_{5}\right) \lambda_{1} + 16674 \gamma_{1} + 46550 \gamma_{2} + 24465 \gamma_{3} + 3150 \gamma_{4}\end{matrix}\right], \quad 4 : \left[\begin{matrix}0\\0\\0\\0\\18 \gamma_{1}\\385 \gamma_{1} + 180 \gamma_{2}\\6110 \gamma_{1} + 6045 \gamma_{2} + 900 \gamma_{3}\\90839 \gamma_{1} + 141995 \gamma_{2} + 43365 \gamma_{3} + 3150 \gamma_{4}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\18 \gamma_{1} \lambda_{1}\\5 \left(41 \gamma_{1} + 36 \gamma_{2}\right) \lambda_{1} + 180 \gamma_{1}\\5 \left(373 \gamma_{1} + 669 \gamma_{2} + 180 \gamma_{3}\right) \lambda_{1} + 4245 \gamma_{1} + 2700 \gamma_{2}\\7 \left(2382 \gamma_{1} + 6650 \gamma_{2} + 3495 \gamma_{3} + 450 \gamma_{4}\right) \lambda_{1} + 74165 \gamma_{1} + 95445 \gamma_{2} + 18900 \gamma_{3}\end{matrix}\right], \quad 5 : \left[\begin{matrix}0\\0\\0\\0\\0\\180 \gamma_{1}\\6945 \gamma_{1} + 2700 \gamma_{2}\\188510 \gamma_{1} + 152145 \gamma_{2} + 18900 \gamma_{3}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\0\\180 \gamma_{1} \lambda_{1}\\15 \left(283 \gamma_{1} + 180 \gamma_{2}\right) \lambda_{1} + 2700 \gamma_{1}\\35 \left(2119 \gamma_{1} + 2727 \gamma_{2} + 540 \gamma_{3}\right) \lambda_{1} + 114345 \gamma_{1} + 56700 \gamma_{2}\end{matrix}\right], \quad 6 : \left[\begin{matrix}0\\0\\0\\0\\0\\0\\2700 \gamma_{1}\\171045 \gamma_{1} + 56700 \gamma_{2}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\2700 \gamma_{1} \lambda_{1}\\945 \left(121 \gamma_{1} + 60 \gamma_{2}\right) \lambda_{1} + 56700 \gamma_{1}\end{matrix}\right], \quad 7 : \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\56700 \gamma_{1}\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\56700 \gamma_{1} \lambda_{1}\end{matrix}\right], \quad 8 : \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\0\end{matrix}\right] = \left[\begin{matrix}0\\0\\0\\0\\0\\0\\0\\0\end{matrix}\right]\right \}\right \}$$
In [150]:
miniblocks = Jordan_blocks(eigendata)
X_S2, J_S2 = Jordan_normalform(eigendata, matrices=(S2.rhs, M_space_v, miniblocks))
X_S2_lambda = Lambda(gamma_vector, X_S2.rhs)
In [151]:
X_S2, J_S2
Out[151]:
$$\left ( X = \left[\begin{matrix}\gamma_{0} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\gamma_{1} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\gamma_{2} & \gamma_{1} & 0 & 0 & 0 & 0 & 0 & 0\\\gamma_{3} & \gamma_{1} + 3 \gamma_{2} & 3 \gamma_{1} & 0 & 0 & 0 & 0 & 0\\\gamma_{4} & \gamma_{1} + 7 \gamma_{2} + 6 \gamma_{3} & 13 \gamma_{1} + 18 \gamma_{2} & 18 \gamma_{1} & 0 & 0 & 0 & 0\\\gamma_{5} & \gamma_{1} + 15 \gamma_{2} + 25 \gamma_{3} + 10 \gamma_{4} & 50 \gamma_{1} + 145 \gamma_{2} + 60 \gamma_{3} & 205 \gamma_{1} + 180 \gamma_{2} & 180 \gamma_{1} & 0 & 0 & 0\\\gamma_{6} & \gamma_{1} + 31 \gamma_{2} + 90 \gamma_{3} + 65 \gamma_{4} + 15 \gamma_{5} & 201 \gamma_{1} + 950 \gamma_{2} + 765 \gamma_{3} + 150 \gamma_{4} & 1865 \gamma_{1} + 3345 \gamma_{2} + 900 \gamma_{3} & 4245 \gamma_{1} + 2700 \gamma_{2} & 2700 \gamma_{1} & 0 & 0\\\gamma_{7} & \gamma_{1} + 63 \gamma_{2} + 301 \gamma_{3} + 350 \gamma_{4} + 140 \gamma_{5} + 21 \gamma_{6} & 875 \gamma_{1} + 6104 \gamma_{2} + 7490 \gamma_{3} + 2765 \gamma_{4} + 315 \gamma_{5} & 16674 \gamma_{1} + 46550 \gamma_{2} + 24465 \gamma_{3} + 3150 \gamma_{4} & 74165 \gamma_{1} + 95445 \gamma_{2} + 18900 \gamma_{3} & 114345 \gamma_{1} + 56700 \gamma_{2} & 56700 \gamma_{1} & 0\end{matrix}\right], \quad J = \left[\begin{matrix}\lambda_{1} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & \lambda_{1} & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & \lambda_{1} & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & \lambda_{1} & 0 & 0 & 0 & 0\\0 & 0 & 0 & 1 & \lambda_{1} & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & \lambda_{1} & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & \lambda_{1} & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1 & \lambda_{1}\end{matrix}\right]\right )$$
In [152]:
selection = [1] + ([0]*(m-1))
X_S2_lambda(*selection) * Iexp**(-1)
Out[152]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\end{matrix}\right]$$
In [155]:
selection = [1,1] + ([0]*(m-2))
X_S2_lambda(*selection) * Iexp**(-1)
Out[155]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & \frac{3}{2} & 0 & 0 & 0 & 0 & 0\\0 & 1 & \frac{13}{2} & 3 & 0 & 0 & 0 & 0\\0 & 1 & 25 & \frac{205}{6} & \frac{15}{2} & 0 & 0 & 0\\0 & 1 & \frac{201}{2} & \frac{1865}{6} & \frac{1415}{8} & \frac{45}{2} & 0 & 0\\0 & 1 & \frac{875}{2} & 2779 & \frac{74165}{24} & \frac{7623}{8} & \frac{315}{4} & 0\end{matrix}\right]$$
In [156]:
selection = [1] * m
X_S2_lambda(*selection) * Iexp**(-1)
Out[156]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 4 & \frac{3}{2} & 0 & 0 & 0 & 0 & 0\\1 & 14 & \frac{31}{2} & 3 & 0 & 0 & 0 & 0\\1 & 51 & \frac{255}{2} & \frac{385}{6} & \frac{15}{2} & 0 & 0 & 0\\1 & 202 & 1033 & \frac{3055}{3} & \frac{2315}{8} & \frac{45}{2} & 0 & 0\\1 & 876 & \frac{17549}{2} & \frac{90839}{6} & \frac{94255}{12} & \frac{11403}{8} & \frac{315}{4} & 0\end{matrix}\right]$$
In [157]:
selection = [1] + ([t]*(m-1))
X_S2_lambda(*selection) * Iexp**(-1)
Out[157]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\t & 0 & 0 & 0 & 0 & 0 & 0 & 0\\t & t & 0 & 0 & 0 & 0 & 0 & 0\\t & 4 t & \frac{3 t}{2} & 0 & 0 & 0 & 0 & 0\\t & 14 t & \frac{31 t}{2} & 3 t & 0 & 0 & 0 & 0\\t & 51 t & \frac{255 t}{2} & \frac{385 t}{6} & \frac{15 t}{2} & 0 & 0 & 0\\t & 202 t & 1033 t & \frac{3055 t}{3} & \frac{2315 t}{8} & \frac{45 t}{2} & 0 & 0\\t & 876 t & \frac{17549 t}{2} & \frac{90839 t}{6} & \frac{94255 t}{12} & \frac{11403 t}{8} & \frac{315 t}{4} & 0\end{matrix}\right]$$
In [158]:
selection = [t**i for i in range(m)]
X_S2_lambda(*selection) * Iexp**(-1)
Out[158]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\t & 0 & 0 & 0 & 0 & 0 & 0 & 0\\t^{2} & t & 0 & 0 & 0 & 0 & 0 & 0\\t^{3} & 3 t^{2} + t & \frac{3 t}{2} & 0 & 0 & 0 & 0 & 0\\t^{4} & 6 t^{3} + 7 t^{2} + t & 9 t^{2} + \frac{13 t}{2} & 3 t & 0 & 0 & 0 & 0\\t^{5} & 10 t^{4} + 25 t^{3} + 15 t^{2} + t & 30 t^{3} + \frac{145 t^{2}}{2} + 25 t & 30 t^{2} + \frac{205 t}{6} & \frac{15 t}{2} & 0 & 0 & 0\\t^{6} & 15 t^{5} + 65 t^{4} + 90 t^{3} + 31 t^{2} + t & 75 t^{4} + \frac{765 t^{3}}{2} + 475 t^{2} + \frac{201 t}{2} & 150 t^{3} + \frac{1115 t^{2}}{2} + \frac{1865 t}{6} & \frac{225 t^{2}}{2} + \frac{1415 t}{8} & \frac{45 t}{2} & 0 & 0\\t^{7} & 21 t^{6} + 140 t^{5} + 350 t^{4} + 301 t^{3} + 63 t^{2} + t & \frac{315 t^{5}}{2} + \frac{2765 t^{4}}{2} + 3745 t^{3} + 3052 t^{2} + \frac{875 t}{2} & 525 t^{4} + \frac{8155 t^{3}}{2} + \frac{23275 t^{2}}{3} + 2779 t & \frac{1575 t^{3}}{2} + \frac{31815 t^{2}}{8} + \frac{74165 t}{24} & \frac{945 t^{2}}{2} + \frac{7623 t}{8} & \frac{315 t}{4} & 0\end{matrix}\right]$$
In [159]:
# FX=XJ
assert ((P.rhs*X_P.rhs).applyfunc(lambda i: i.subs(eigenvals).radsimp().expand())==
(X_P.rhs*J_P.rhs).applyfunc(lambda i: i.subs(eigenvals).radsimp().expand()))
In [161]:
(X_P.rhs*X_C.rhs**(-1)*C.rhs*X_C.rhs*X_P.rhs**(-1)).applyfunc(simplify)
Out[161]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 2 & 1 & 0 & 0 & 0 & 0 & 0\\1 & 3 & 3 & 1 & 0 & 0 & 0 & 0\\1 & 4 & 6 & 4 & 1 & 0 & 0 & 0\\1 & 5 & 10 & 10 & 5 & 1 & 0 & 0\\1 & 6 & 15 & 20 & 15 & 6 & 1 & 0\\1 & 7 & 21 & 35 & 35 & 21 & 7 & 1\end{matrix}\right]$$
In [162]:
(X_C.rhs*X_P.rhs**(-1)*P.rhs*X_P.rhs*X_C.rhs**(-1)).applyfunc(simplify)
Out[162]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\2 & 2 & 1 & 0 & 0 & 0 & 0 & 0\\5 & 5 & 3 & 1 & 0 & 0 & 0 & 0\\14 & 14 & 9 & 4 & 1 & 0 & 0 & 0\\42 & 42 & 28 & 14 & 5 & 1 & 0 & 0\\132 & 132 & 90 & 48 & 20 & 6 & 1 & 0\\429 & 429 & 297 & 165 & 75 & 27 & 7 & 1\end{matrix}\right]$$
In [171]:
(X_S2.rhs*X_P.rhs**(-1)*P.rhs*X_P.rhs*X_S2.rhs**(-1)).applyfunc(simplify)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-171-99f0bb055cde> in <module>()
----> 1 (X_S2.rhs*X_P.rhs**(-1)*P.rhs*X_P.rhs*X_S2.rhs**(-1)).applyfunc(simplify)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sympy/core/decorators.py in binary_op_wrapper(self, other)
130 else:
131 return f(self)
--> 132 return func(self, other)
133 return binary_op_wrapper
134 return priority_decorator
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sympy/matrices/common.py in __pow__(self, num)
2039 if num < 0:
2040 num = -num
-> 2041 a = a.inv()
2042 # When certain conditions are met,
2043 # Jordan block algorithm is faster than
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sympy/matrices/matrices.py in inv(self, method, **kwargs)
2779 if method is not None:
2780 kwargs['method'] = method
-> 2781 return self._eval_inverse(**kwargs)
2782
2783 def is_nilpotent(self):
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sympy/matrices/dense.py in _eval_inverse(self, **kwargs)
258 M = self.as_mutable()
259 if method == "GE":
--> 260 rv = M.inverse_GE(iszerofunc=iszerofunc)
261 elif method == "LU":
262 rv = M.inverse_LU(iszerofunc=iszerofunc)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sympy/matrices/matrices.py in inverse_GE(self, iszerofunc)
2694 red = big.rref(iszerofunc=iszerofunc, simplify=True)[0]
2695 if any(iszerofunc(red[j, j]) for j in range(red.rows)):
-> 2696 raise ValueError("Matrix det == 0; not invertible.")
2697
2698 return self._new(red[:, big.rows:])
ValueError: Matrix det == 0; not invertible.
In [172]:
X_CP = (X_C.rhs*X_P.rhs**(-1)).applyfunc(simplify)
In [ ]:
inspect(X_CP) # takes long to evaluate
In [175]:
L = Lambda(list(alpha_vector)+list(beta_vector), X_CP)
In [176]:
X_CP_v = L(*([1]+[0]*(m-1)+[1]+[0]*(m-1)))
X_CP_v, production_matrix(X_CP_v), production_matrix(X_CP_v, exp=True)
Out[176]:
$$\left ( \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 1 & 0 & 0 & 0 & 0 & 0\\0 & \frac{3}{2} & \frac{5}{2} & 1 & 0 & 0 & 0 & 0\\0 & \frac{8}{3} & 6 & \frac{13}{3} & 1 & 0 & 0 & 0\\0 & \frac{31}{6} & \frac{175}{12} & \frac{89}{6} & \frac{77}{12} & 1 & 0 & 0\\0 & \frac{157}{15} & \frac{215}{6} & \frac{281}{6} & \frac{175}{6} & \frac{87}{10} & 1 & 0\\0 & \frac{649}{30} & \frac{1767}{20} & \frac{851}{6} & 115 & \frac{1501}{30} & \frac{223}{20} & 1\end{matrix}\right], \quad \left[\begin{matrix}0 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 1 & 0 & 0 & 0 & 0\\0 & \frac{1}{2} & \frac{3}{2} & 1 & 0 & 0 & 0\\0 & - \frac{1}{12} & \frac{3}{4} & \frac{11}{6} & 1 & 0 & 0\\0 & - \frac{5}{36} & - \frac{1}{3} & \frac{8}{9} & \frac{25}{12} & 1 & 0\\0 & \frac{293}{2160} & - \frac{7}{36} & - \frac{35}{54} & \frac{139}{144} & \frac{137}{60} & 1\\0 & \frac{509}{21600} & \frac{19}{45} & - \frac{4}{27} & - \frac{1433}{1440} & \frac{601}{600} & \frac{49}{20}\end{matrix}\right], \quad \left[\begin{matrix}0 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 2 & 0 & 0 & 0 & 0\\0 & \frac{1}{4} & \frac{3}{2} & 3 & 0 & 0 & 0\\0 & - \frac{1}{72} & \frac{1}{4} & \frac{11}{6} & 4 & 0 & 0\\0 & - \frac{5}{864} & - \frac{1}{36} & \frac{2}{9} & \frac{25}{12} & 5 & 0\\0 & \frac{293}{259200} & - \frac{7}{2160} & - \frac{7}{216} & \frac{139}{720} & \frac{137}{60} & 6\\0 & \frac{509}{15552000} & \frac{19}{16200} & - \frac{1}{810} & - \frac{1433}{43200} & \frac{601}{3600} & \frac{49}{20}\end{matrix}\right]\right )$$
In [178]:
X_CP_v * P.rhs * X_CP_v**(-1)
Out[178]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\2 & 2 & 1 & 0 & 0 & 0 & 0 & 0\\5 & 5 & 3 & 1 & 0 & 0 & 0 & 0\\14 & 14 & 9 & 4 & 1 & 0 & 0 & 0\\42 & 42 & 28 & 14 & 5 & 1 & 0 & 0\\132 & 132 & 90 & 48 & 20 & 6 & 1 & 0\\429 & 429 & 297 & 165 & 75 & 27 & 7 & 1\end{matrix}\right]$$
In [179]:
X_CP_v = L(*([x]*(2*m)))
X_CP_v, production_matrix(X_CP_v), production_matrix(X_CP_v, exp=True)
Out[179]:
$$\left ( \left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\-1 & 1 & 1 & 0 & 0 & 0 & 0 & 0\\-1 & - \frac{3}{2} & \frac{5}{2} & 1 & 0 & 0 & 0 & 0\\0 & - \frac{13}{3} & 0 & \frac{13}{3} & 1 & 0 & 0 & 0\\1 & - \frac{10}{3} & - \frac{107}{12} & \frac{29}{6} & \frac{77}{12} & 1 & 0 & 0\\1 & \frac{37}{15} & - \frac{97}{6} & - \frac{61}{6} & \frac{85}{6} & \frac{87}{10} & 1 & 0\\0 & \frac{127}{15} & - \frac{37}{5} & - \frac{83}{2} & \frac{1}{4} & \frac{871}{30} & \frac{223}{20} & 1\end{matrix}\right], \quad \left[\begin{matrix}0 & 1 & 0 & 0 & 0 & 0 & 0\\-1 & 1 & 1 & 0 & 0 & 0 & 0\\0 & - \frac{3}{2} & \frac{3}{2} & 1 & 0 & 0 & 0\\- \frac{3}{2} & \frac{23}{12} & - \frac{9}{4} & \frac{11}{6} & 1 & 0 & 0\\\frac{19}{6} & - \frac{263}{36} & \frac{31}{6} & - \frac{28}{9} & \frac{25}{12} & 1 & 0\\- \frac{1109}{72} & \frac{62723}{2160} & - \frac{1565}{72} & \frac{266}{27} & - \frac{581}{144} & \frac{137}{60} & 1\\\frac{54979}{720} & - \frac{3216301}{21600} & \frac{77341}{720} & - \frac{26099}{540} & \frac{23047}{1440} & - \frac{2999}{600} & \frac{49}{20}\end{matrix}\right], \quad \left[\begin{matrix}0 & 1 & 0 & 0 & 0 & 0 & 0\\-1 & 1 & 2 & 0 & 0 & 0 & 0\\0 & - \frac{3}{4} & \frac{3}{2} & 3 & 0 & 0 & 0\\- \frac{1}{4} & \frac{23}{72} & - \frac{3}{4} & \frac{11}{6} & 4 & 0 & 0\\\frac{19}{144} & - \frac{263}{864} & \frac{31}{72} & - \frac{7}{9} & \frac{25}{12} & 5 & 0\\- \frac{1109}{8640} & \frac{62723}{259200} & - \frac{313}{864} & \frac{133}{270} & - \frac{581}{720} & \frac{137}{60} & 6\\\frac{54979}{518400} & - \frac{3216301}{15552000} & \frac{77341}{259200} & - \frac{26099}{64800} & \frac{23047}{43200} & - \frac{2999}{3600} & \frac{49}{20}\end{matrix}\right]\right )$$
In [180]:
X_CP_v * P.rhs * X_CP_v**(-1)
Out[180]:
$$\left[\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\2 & 2 & 1 & 0 & 0 & 0 & 0 & 0\\5 & 5 & 3 & 1 & 0 & 0 & 0 & 0\\14 & 14 & 9 & 4 & 1 & 0 & 0 & 0\\42 & 42 & 28 & 14 & 5 & 1 & 0 & 0\\132 & 132 & 90 & 48 & 20 & 6 & 1 & 0\\429 & 429 & 297 & 165 & 75 & 27 & 7 & 1\end{matrix}\right]$$
In [181]:
((X_P.rhs*X_C.rhs**(-1))**(-1)).applyfunc(simplify)
Out[181]:
$$\left[\begin{matrix}\frac{\beta_{0}}{\alpha_{0}} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{1}{\alpha_{0}^{2}} \left(\alpha_{0} \beta_{1} - \alpha_{1} \beta_{0}\right) & \frac{\beta_{0}}{\alpha_{0}} & 0 & 0 & 0 & 0 & 0 & 0\\\frac{1}{\alpha_{0}^{3}} \left(\alpha_{0}^{2} \beta_{2} - \alpha_{0} \alpha_{1} \beta_{0} - 2 \alpha_{0} \alpha_{1} \beta_{1} - \alpha_{0} \alpha_{2} \beta_{0} + 2 \alpha_{1}^{2} \beta_{0}\right) & \frac{1}{\alpha_{0}^{2}} \left(\alpha_{0} \beta_{0} + 2 \alpha_{0} \beta_{1} - 2 \alpha_{1} \beta_{0}\right) & \frac{\beta_{0}}{\alpha_{0}} & 0 & 0 & 0 & 0 & 0\\\frac{1}{\alpha_{0}^{4}} \left(\alpha_{0}^{3} \beta_{3} - \frac{3 \alpha_{0}^{2}}{2} \alpha_{1} \beta_{0} - 2 \alpha_{0}^{2} \alpha_{1} \beta_{1} - 3 \alpha_{0}^{2} \alpha_{1} \beta_{2} - \frac{5 \alpha_{0}^{2}}{2} \alpha_{2} \beta_{0} - 3 \alpha_{0}^{2} \alpha_{2} \beta_{1} - \alpha_{0}^{2} \alpha_{3} \beta_{0} + 5 \alpha_{0} \alpha_{1}^{2} \beta_{0} + 6 \alpha_{0} \alpha_{1}^{2} \beta_{1} + 6 \alpha_{0} \alpha_{1} \alpha_{2} \beta_{0} - 6 \alpha_{1}^{3} \beta_{0}\right) & \frac{1}{2 \alpha_{0}^{3}} \left(3 \alpha_{0}^{2} \beta_{0} + 4 \alpha_{0}^{2} \beta_{1} + 6 \alpha_{0}^{2} \beta_{2} - 10 \alpha_{0} \alpha_{1} \beta_{0} - 12 \alpha_{0} \alpha_{1} \beta_{1} - 6 \alpha_{0} \alpha_{2} \beta_{0} + 12 \alpha_{1}^{2} \beta_{0}\right) & \frac{1}{2 \alpha_{0}^{2}} \left(5 \alpha_{0} \beta_{0} + 6 \alpha_{0} \beta_{1} - 6 \alpha_{1} \beta_{0}\right) & \frac{\beta_{0}}{\alpha_{0}} & 0 & 0 & 0 & 0\\\frac{1}{\alpha_{0}^{5}} \left(\alpha_{0}^{4} \beta_{4} - \frac{8 \alpha_{0}^{3}}{3} \alpha_{1} \beta_{0} - 3 \alpha_{0}^{3} \alpha_{1} \beta_{1} - 3 \alpha_{0}^{3} \alpha_{1} \beta_{2} - 4 \alpha_{0}^{3} \alpha_{1} \beta_{3} - 6 \alpha_{0}^{3} \alpha_{2} \beta_{0} - 7 \alpha_{0}^{3} \alpha_{2} \beta_{1} - 6 \alpha_{0}^{3} \alpha_{2} \beta_{2} - \frac{13 \alpha_{0}^{3}}{3} \alpha_{3} \beta_{0} - 4 \alpha_{0}^{3} \alpha_{3} \beta_{1} - \alpha_{0}^{3} \alpha_{4} \beta_{0} + 12 \alpha_{0}^{2} \alpha_{1}^{2} \beta_{0} + 14 \alpha_{0}^{2} \alpha_{1}^{2} \beta_{1} + 12 \alpha_{0}^{2} \alpha_{1}^{2} \beta_{2} + 26 \alpha_{0}^{2} \alpha_{1} \alpha_{2} \beta_{0} + 24 \alpha_{0}^{2} \alpha_{1} \alpha_{2} \beta_{1} + 8 \alpha_{0}^{2} \alpha_{1} \alpha_{3} \beta_{0} + 6 \alpha_{0}^{2} \alpha_{2}^{2} \beta_{0} - 26 \alpha_{0} \alpha_{1}^{3} \beta_{0} - 24 \alpha_{0} \alpha_{1}^{3} \beta_{1} - 36 \alpha_{0} \alpha_{1}^{2} \alpha_{2} \beta_{0} + 24 \alpha_{1}^{4} \beta_{0}\right) & \frac{8 \beta_{0}}{3 \alpha_{0}} + \frac{3 \beta_{1}}{\alpha_{0}} + \frac{3 \beta_{2}}{\alpha_{0}} + \frac{4 \beta_{3}}{\alpha_{0}} - \frac{12 \alpha_{1}}{\alpha_{0}^{2}} \beta_{0} - \frac{14 \alpha_{1}}{\alpha_{0}^{2}} \beta_{1} - \frac{12 \alpha_{1}}{\alpha_{0}^{2}} \beta_{2} - \frac{13 \alpha_{2}}{\alpha_{0}^{2}} \beta_{0} - \frac{12 \alpha_{2}}{\alpha_{0}^{2}} \beta_{1} - \frac{4 \alpha_{3}}{\alpha_{0}^{2}} \beta_{0} + \frac{26 \alpha_{1}^{2}}{\alpha_{0}^{3}} \beta_{0} + \frac{24 \alpha_{1}^{2}}{\alpha_{0}^{3}} \beta_{1} + \frac{24 \alpha_{1}}{\alpha_{0}^{3}} \alpha_{2} \beta_{0} - \frac{24 \alpha_{1}^{3}}{\alpha_{0}^{4}} \beta_{0} & \frac{1}{\alpha_{0}^{3}} \left(6 \alpha_{0}^{2} \beta_{0} + 7 \alpha_{0}^{2} \beta_{1} + 6 \alpha_{0}^{2} \beta_{2} - 13 \alpha_{0} \alpha_{1} \beta_{0} - 12 \alpha_{0} \alpha_{1} \beta_{1} - 6 \alpha_{0} \alpha_{2} \beta_{0} + 12 \alpha_{1}^{2} \beta_{0}\right) & \frac{1}{3 \alpha_{0}^{2}} \left(13 \alpha_{0} \beta_{0} + 12 \alpha_{0} \beta_{1} - 12 \alpha_{1} \beta_{0}\right) & \frac{\beta_{0}}{\alpha_{0}} & 0 & 0 & 0\\\frac{1}{12 \alpha_{0}^{6}} \left(12 \alpha_{0}^{5} \beta_{5} - 62 \alpha_{0}^{4} \alpha_{1} \beta_{0} - 64 \alpha_{0}^{4} \alpha_{1} \beta_{1} - 54 \alpha_{0}^{4} \alpha_{1} \beta_{2} - 48 \alpha_{0}^{4} \alpha_{1} \beta_{3} - 60 \alpha_{0}^{4} \alpha_{1} \beta_{4} - 175 \alpha_{0}^{4} \alpha_{2} \beta_{0} - 192 \alpha_{0}^{4} \alpha_{2} \beta_{1} - 162 \alpha_{0}^{4} \alpha_{2} \beta_{2} - 120 \alpha_{0}^{4} \alpha_{2} \beta_{3} - 178 \alpha_{0}^{4} \alpha_{3} \beta_{0} - 188 \alpha_{0}^{4} \alpha_{3} \beta_{1} - 120 \alpha_{0}^{4} \alpha_{3} \beta_{2} - 77 \alpha_{0}^{4} \alpha_{4} \beta_{0} - 60 \alpha_{0}^{4} \alpha_{4} \beta_{1} - 12 \alpha_{0}^{4} \alpha_{5} \beta_{0} + 350 \alpha_{0}^{3} \alpha_{1}^{2} \beta_{0} + 384 \alpha_{0}^{3} \alpha_{1}^{2} \beta_{1} + 324 \alpha_{0}^{3} \alpha_{1}^{2} \beta_{2} + 240 \alpha_{0}^{3} \alpha_{1}^{2} \beta_{3} + 1068 \alpha_{0}^{3} \alpha_{1} \alpha_{2} \beta_{0} + 1128 \alpha_{0}^{3} \alpha_{1} \alpha_{2} \beta_{1} + 720 \alpha_{0}^{3} \alpha_{1} \alpha_{2} \beta_{2} + 616 \alpha_{0}^{3} \alpha_{1} \alpha_{3} \beta_{0} + 480 \alpha_{0}^{3} \alpha_{1} \alpha_{3} \beta_{1} + 120 \alpha_{0}^{3} \alpha_{1} \alpha_{4} \beta_{0} + 462 \alpha_{0}^{3} \alpha_{2}^{2} \beta_{0} + 360 \alpha_{0}^{3} \alpha_{2}^{2} \beta_{1} + 240 \alpha_{0}^{3} \alpha_{2} \alpha_{3} \beta_{0} - 1068 \alpha_{0}^{2} \alpha_{1}^{3} \beta_{0} - 1128 \alpha_{0}^{2} \alpha_{1}^{3} \beta_{1} - 720 \alpha_{0}^{2} \alpha_{1}^{3} \beta_{2} - 2772 \alpha_{0}^{2} \alpha_{1}^{2} \alpha_{2} \beta_{0} - 2160 \alpha_{0}^{2} \alpha_{1}^{2} \alpha_{2} \beta_{1} - 720 \alpha_{0}^{2} \alpha_{1}^{2} \alpha_{3} \beta_{0} - 1080 \alpha_{0}^{2} \alpha_{1} \alpha_{2}^{2} \beta_{0} + 1848 \alpha_{0} \alpha_{1}^{4} \beta_{0} + 1440 \alpha_{0} \alpha_{1}^{4} \beta_{1} + 2880 \alpha_{0} \alpha_{1}^{3} \alpha_{2} \beta_{0} - 1440 \alpha_{1}^{5} \beta_{0}\right) & \frac{1}{6 \alpha_{0}^{5}} \left(31 \alpha_{0}^{4} \beta_{0} + 32 \alpha_{0}^{4} \beta_{1} + 27 \alpha_{0}^{4} \beta_{2} + 24 \alpha_{0}^{4} \beta_{3} + 30 \alpha_{0}^{4} \beta_{4} - 175 \alpha_{0}^{3} \alpha_{1} \beta_{0} - 192 \alpha_{0}^{3} \alpha_{1} \beta_{1} - 162 \alpha_{0}^{3} \alpha_{1} \beta_{2} - 120 \alpha_{0}^{3} \alpha_{1} \beta_{3} - 267 \alpha_{0}^{3} \alpha_{2} \beta_{0} - 282 \alpha_{0}^{3} \alpha_{2} \beta_{1} - 180 \alpha_{0}^{3} \alpha_{2} \beta_{2} - 154 \alpha_{0}^{3} \alpha_{3} \beta_{0} - 120 \alpha_{0}^{3} \alpha_{3} \beta_{1} - 30 \alpha_{0}^{3} \alpha_{4} \beta_{0} + 534 \alpha_{0}^{2} \alpha_{1}^{2} \beta_{0} + 564 \alpha_{0}^{2} \alpha_{1}^{2} \beta_{1} + 360 \alpha_{0}^{2} \alpha_{1}^{2} \beta_{2} + 924 \alpha_{0}^{2} \alpha_{1} \alpha_{2} \beta_{0} + 720 \alpha_{0}^{2} \alpha_{1} \alpha_{2} \beta_{1} + 240 \alpha_{0}^{2} \alpha_{1} \alpha_{3} \beta_{0} + 180 \alpha_{0}^{2} \alpha_{2}^{2} \beta_{0} - 924 \alpha_{0} \alpha_{1}^{3} \beta_{0} - 720 \alpha_{0} \alpha_{1}^{3} \beta_{1} - 1080 \alpha_{0} \alpha_{1}^{2} \alpha_{2} \beta_{0} + 720 \alpha_{1}^{4} \beta_{0}\right) & \frac{1}{12 \alpha_{0}^{4}} \left(175 \alpha_{0}^{3} \beta_{0} + 192 \alpha_{0}^{3} \beta_{1} + 162 \alpha_{0}^{3} \beta_{2} + 120 \alpha_{0}^{3} \beta_{3} - 534 \alpha_{0}^{2} \alpha_{1} \beta_{0} - 564 \alpha_{0}^{2} \alpha_{1} \beta_{1} - 360 \alpha_{0}^{2} \alpha_{1} \beta_{2} - 462 \alpha_{0}^{2} \alpha_{2} \beta_{0} - 360 \alpha_{0}^{2} \alpha_{2} \beta_{1} - 120 \alpha_{0}^{2} \alpha_{3} \beta_{0} + 924 \alpha_{0} \alpha_{1}^{2} \beta_{0} + 720 \alpha_{0} \alpha_{1}^{2} \beta_{1} + 720 \alpha_{0} \alpha_{1} \alpha_{2} \beta_{0} - 720 \alpha_{1}^{3} \beta_{0}\right) & \frac{1}{6 \alpha_{0}^{3}} \left(89 \alpha_{0}^{2} \beta_{0} + 94 \alpha_{0}^{2} \beta_{1} + 60 \alpha_{0}^{2} \beta_{2} - 154 \alpha_{0} \alpha_{1} \beta_{0} - 120 \alpha_{0} \alpha_{1} \beta_{1} - 60 \alpha_{0} \alpha_{2} \beta_{0} + 120 \alpha_{1}^{2} \beta_{0}\right) & \frac{1}{12 \alpha_{0}^{2}} \left(77 \alpha_{0} \beta_{0} + 60 \alpha_{0} \beta_{1} - 60 \alpha_{1} \beta_{0}\right) & \frac{\beta_{0}}{\alpha_{0}} & 0 & 0\\\frac{1}{30 \alpha_{0}^{7}} \left(30 \alpha_{0}^{6} \beta_{6} - 314 \alpha_{0}^{5} \alpha_{1} \beta_{0} - 310 \alpha_{0}^{5} \alpha_{1} \beta_{1} - 240 \alpha_{0}^{5} \alpha_{1} \beta_{2} - 180 \alpha_{0}^{5} \alpha_{1} \beta_{3} - 150 \alpha_{0}^{5} \alpha_{1} \beta_{4} - 180 \alpha_{0}^{5} \alpha_{1} \beta_{5} - 1075 \alpha_{0}^{5} \alpha_{2} \beta_{0} - 1125 \alpha_{0}^{5} \alpha_{2} \beta_{1} - 900 \alpha_{0}^{5} \alpha_{2} \beta_{2} - 660 \alpha_{0}^{5} \alpha_{2} \beta_{3} - 450 \alpha_{0}^{5} \alpha_{2} \beta_{4} - 1405 \alpha_{0}^{5} \alpha_{3} \beta_{0} - 1490 \alpha_{0}^{5} \alpha_{3} \beta_{1} - 1110 \alpha_{0}^{5} \alpha_{3} \beta_{2} - 600 \alpha_{0}^{5} \alpha_{3} \beta_{3} - 875 \alpha_{0}^{5} \alpha_{4} \beta_{0} - 855 \alpha_{0}^{5} \alpha_{4} \beta_{1} - 450 \alpha_{0}^{5} \alpha_{4} \beta_{2} - 261 \alpha_{0}^{5} \alpha_{5} \beta_{0} - 180 \alpha_{0}^{5} \alpha_{5} \beta_{1} - 30 \alpha_{0}^{5} \alpha_{6} \beta_{0} + 2150 \alpha_{0}^{4} \alpha_{1}^{2} \beta_{0} + 2250 \alpha_{0}^{4} \alpha_{1}^{2} \beta_{1} + 1800 \alpha_{0}^{4} \alpha_{1}^{2} \beta_{2} + 1320 \alpha_{0}^{4} \alpha_{1}^{2} \beta_{3} + 900 \alpha_{0}^{4} \alpha_{1}^{2} \beta_{4} + 8430 \alpha_{0}^{4} \alpha_{1} \alpha_{2} \beta_{0} + 8940 \alpha_{0}^{4} \alpha_{1} \alpha_{2} \beta_{1} + 6660 \alpha_{0}^{4} \alpha_{1} \alpha_{2} \beta_{2} + 3600 \alpha_{0}^{4} \alpha_{1} \alpha_{2} \beta_{3} + 7000 \alpha_{0}^{4} \alpha_{1} \alpha_{3} \beta_{0} + 6840 \alpha_{0}^{4} \alpha_{1} \alpha_{3} \beta_{1} + 3600 \alpha_{0}^{4} \alpha_{1} \alpha_{3} \beta_{2} + 2610 \alpha_{0}^{4} \alpha_{1} \alpha_{4} \beta_{0} + 1800 \alpha_{0}^{4} \alpha_{1} \alpha_{4} \beta_{1} + 360 \alpha_{0}^{4} \alpha_{1} \alpha_{5} \beta_{0} + 5250 \alpha_{0}^{4} \alpha_{2}^{2} \beta_{0} + 5130 \alpha_{0}^{4} \alpha_{2}^{2} \beta_{1} + 2700 \alpha_{0}^{4} \alpha_{2}^{2} \beta_{2} + 5220 \alpha_{0}^{4} \alpha_{2} \alpha_{3} \beta_{0} + 3600 \alpha_{0}^{4} \alpha_{2} \alpha_{3} \beta_{1} + 900 \alpha_{0}^{4} \alpha_{2} \alpha_{4} \beta_{0} + 600 \alpha_{0}^{4} \alpha_{3}^{2} \beta_{0} - 8430 \alpha_{0}^{3} \alpha_{1}^{3} \beta_{0} - 8940 \alpha_{0}^{3} \alpha_{1}^{3} \beta_{1} - 6660 \alpha_{0}^{3} \alpha_{1}^{3} \beta_{2} - 3600 \alpha_{0}^{3} \alpha_{1}^{3} \beta_{3} - 31500 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{2} \beta_{0} - 30780 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{2} \beta_{1} - 16200 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{2} \beta_{2} - 15660 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{3} \beta_{0} - 10800 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{3} \beta_{1} - 2700 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{4} \beta_{0} - 23490 \alpha_{0}^{3} \alpha_{1} \alpha_{2}^{2} \beta_{0} - 16200 \alpha_{0}^{3} \alpha_{1} \alpha_{2}^{2} \beta_{1} - 10800 \alpha_{0}^{3} \alpha_{1} \alpha_{2} \alpha_{3} \beta_{0} - 2700 \alpha_{0}^{3} \alpha_{2}^{3} \beta_{0} + 21000 \alpha_{0}^{2} \alpha_{1}^{4} \beta_{0} + 20520 \alpha_{0}^{2} \alpha_{1}^{4} \beta_{1} + 10800 \alpha_{0}^{2} \alpha_{1}^{4} \beta_{2} + 62640 \alpha_{0}^{2} \alpha_{1}^{3} \alpha_{2} \beta_{0} + 43200 \alpha_{0}^{2} \alpha_{1}^{3} \alpha_{2} \beta_{1} + 14400 \alpha_{0}^{2} \alpha_{1}^{3} \alpha_{3} \beta_{0} + 32400 \alpha_{0}^{2} \alpha_{1}^{2} \alpha_{2}^{2} \beta_{0} - 31320 \alpha_{0} \alpha_{1}^{5} \beta_{0} - 21600 \alpha_{0} \alpha_{1}^{5} \beta_{1} - 54000 \alpha_{0} \alpha_{1}^{4} \alpha_{2} \beta_{0} + 21600 \alpha_{1}^{6} \beta_{0}\right) & \frac{1}{30 \alpha_{0}^{6}} \left(314 \alpha_{0}^{5} \beta_{0} + 310 \alpha_{0}^{5} \beta_{1} + 240 \alpha_{0}^{5} \beta_{2} + 180 \alpha_{0}^{5} \beta_{3} + 150 \alpha_{0}^{5} \beta_{4} + 180 \alpha_{0}^{5} \beta_{5} - 2150 \alpha_{0}^{4} \alpha_{1} \beta_{0} - 2250 \alpha_{0}^{4} \alpha_{1} \beta_{1} - 1800 \alpha_{0}^{4} \alpha_{1} \beta_{2} - 1320 \alpha_{0}^{4} \alpha_{1} \beta_{3} - 900 \alpha_{0}^{4} \alpha_{1} \beta_{4} - 4215 \alpha_{0}^{4} \alpha_{2} \beta_{0} - 4470 \alpha_{0}^{4} \alpha_{2} \beta_{1} - 3330 \alpha_{0}^{4} \alpha_{2} \beta_{2} - 1800 \alpha_{0}^{4} \alpha_{2} \beta_{3} - 3500 \alpha_{0}^{4} \alpha_{3} \beta_{0} - 3420 \alpha_{0}^{4} \alpha_{3} \beta_{1} - 1800 \alpha_{0}^{4} \alpha_{3} \beta_{2} - 1305 \alpha_{0}^{4} \alpha_{4} \beta_{0} - 900 \alpha_{0}^{4} \alpha_{4} \beta_{1} - 180 \alpha_{0}^{4} \alpha_{5} \beta_{0} + 8430 \alpha_{0}^{3} \alpha_{1}^{2} \beta_{0} + 8940 \alpha_{0}^{3} \alpha_{1}^{2} \beta_{1} + 6660 \alpha_{0}^{3} \alpha_{1}^{2} \beta_{2} + 3600 \alpha_{0}^{3} \alpha_{1}^{2} \beta_{3} + 21000 \alpha_{0}^{3} \alpha_{1} \alpha_{2} \beta_{0} + 20520 \alpha_{0}^{3} \alpha_{1} \alpha_{2} \beta_{1} + 10800 \alpha_{0}^{3} \alpha_{1} \alpha_{2} \beta_{2} + 10440 \alpha_{0}^{3} \alpha_{1} \alpha_{3} \beta_{0} + 7200 \alpha_{0}^{3} \alpha_{1} \alpha_{3} \beta_{1} + 1800 \alpha_{0}^{3} \alpha_{1} \alpha_{4} \beta_{0} + 7830 \alpha_{0}^{3} \alpha_{2}^{2} \beta_{0} + 5400 \alpha_{0}^{3} \alpha_{2}^{2} \beta_{1} + 3600 \alpha_{0}^{3} \alpha_{2} \alpha_{3} \beta_{0} - 21000 \alpha_{0}^{2} \alpha_{1}^{3} \beta_{0} - 20520 \alpha_{0}^{2} \alpha_{1}^{3} \beta_{1} - 10800 \alpha_{0}^{2} \alpha_{1}^{3} \beta_{2} - 46980 \alpha_{0}^{2} \alpha_{1}^{2} \alpha_{2} \beta_{0} - 32400 \alpha_{0}^{2} \alpha_{1}^{2} \alpha_{2} \beta_{1} - 10800 \alpha_{0}^{2} \alpha_{1}^{2} \alpha_{3} \beta_{0} - 16200 \alpha_{0}^{2} \alpha_{1} \alpha_{2}^{2} \beta_{0} + 31320 \alpha_{0} \alpha_{1}^{4} \beta_{0} + 21600 \alpha_{0} \alpha_{1}^{4} \beta_{1} + 43200 \alpha_{0} \alpha_{1}^{3} \alpha_{2} \beta_{0} - 21600 \alpha_{1}^{5} \beta_{0}\right) & \frac{1}{6 \alpha_{0}^{5}} \left(215 \alpha_{0}^{4} \beta_{0} + 225 \alpha_{0}^{4} \beta_{1} + 180 \alpha_{0}^{4} \beta_{2} + 132 \alpha_{0}^{4} \beta_{3} + 90 \alpha_{0}^{4} \beta_{4} - 843 \alpha_{0}^{3} \alpha_{1} \beta_{0} - 894 \alpha_{0}^{3} \alpha_{1} \beta_{1} - 666 \alpha_{0}^{3} \alpha_{1} \beta_{2} - 360 \alpha_{0}^{3} \alpha_{1} \beta_{3} - 1050 \alpha_{0}^{3} \alpha_{2} \beta_{0} - 1026 \alpha_{0}^{3} \alpha_{2} \beta_{1} - 540 \alpha_{0}^{3} \alpha_{2} \beta_{2} - 522 \alpha_{0}^{3} \alpha_{3} \beta_{0} - 360 \alpha_{0}^{3} \alpha_{3} \beta_{1} - 90 \alpha_{0}^{3} \alpha_{4} \beta_{0} + 2100 \alpha_{0}^{2} \alpha_{1}^{2} \beta_{0} + 2052 \alpha_{0}^{2} \alpha_{1}^{2} \beta_{1} + 1080 \alpha_{0}^{2} \alpha_{1}^{2} \beta_{2} + 3132 \alpha_{0}^{2} \alpha_{1} \alpha_{2} \beta_{0} + 2160 \alpha_{0}^{2} \alpha_{1} \alpha_{2} \beta_{1} + 720 \alpha_{0}^{2} \alpha_{1} \alpha_{3} \beta_{0} + 540 \alpha_{0}^{2} \alpha_{2}^{2} \beta_{0} - 3132 \alpha_{0} \alpha_{1}^{3} \beta_{0} - 2160 \alpha_{0} \alpha_{1}^{3} \beta_{1} - 3240 \alpha_{0} \alpha_{1}^{2} \alpha_{2} \beta_{0} + 2160 \alpha_{1}^{4} \beta_{0}\right) & \frac{1}{6 \alpha_{0}^{4}} \left(281 \alpha_{0}^{3} \beta_{0} + 298 \alpha_{0}^{3} \beta_{1} + 222 \alpha_{0}^{3} \beta_{2} + 120 \alpha_{0}^{3} \beta_{3} - 700 \alpha_{0}^{2} \alpha_{1} \beta_{0} - 684 \alpha_{0}^{2} \alpha_{1} \beta_{1} - 360 \alpha_{0}^{2} \alpha_{1} \beta_{2} - 522 \alpha_{0}^{2} \alpha_{2} \beta_{0} - 360 \alpha_{0}^{2} \alpha_{2} \beta_{1} - 120 \alpha_{0}^{2} \alpha_{3} \beta_{0} + 1044 \alpha_{0} \alpha_{1}^{2} \beta_{0} + 720 \alpha_{0} \alpha_{1}^{2} \beta_{1} + 720 \alpha_{0} \alpha_{1} \alpha_{2} \beta_{0} - 720 \alpha_{1}^{3} \beta_{0}\right) & \frac{1}{6 \alpha_{0}^{3}} \left(175 \alpha_{0}^{2} \beta_{0} + 171 \alpha_{0}^{2} \beta_{1} + 90 \alpha_{0}^{2} \beta_{2} - 261 \alpha_{0} \alpha_{1} \beta_{0} - 180 \alpha_{0} \alpha_{1} \beta_{1} - 90 \alpha_{0} \alpha_{2} \beta_{0} + 180 \alpha_{1}^{2} \beta_{0}\right) & \frac{3}{10 \alpha_{0}^{2}} \left(29 \alpha_{0} \beta_{0} + 20 \alpha_{0} \beta_{1} - 20 \alpha_{1} \beta_{0}\right) & \frac{\beta_{0}}{\alpha_{0}} & 0\\\frac{1}{60 \alpha_{0}^{8}} \left(60 \alpha_{0}^{7} \beta_{7} - 1298 \alpha_{0}^{6} \alpha_{1} \beta_{0} - 1256 \alpha_{0}^{6} \alpha_{1} \beta_{1} - 930 \alpha_{0}^{6} \alpha_{1} \beta_{2} - 640 \alpha_{0}^{6} \alpha_{1} \beta_{3} - 450 \alpha_{0}^{6} \alpha_{1} \beta_{4} - 360 \alpha_{0}^{6} \alpha_{1} \beta_{5} - 420 \alpha_{0}^{6} \alpha_{1} \beta_{6} - 5301 \alpha_{0}^{6} \alpha_{2} \beta_{0} - 5375 \alpha_{0}^{6} \alpha_{2} \beta_{1} - 4125 \alpha_{0}^{6} \alpha_{2} \beta_{2} - 2880 \alpha_{0}^{6} \alpha_{2} \beta_{3} - 1950 \alpha_{0}^{6} \alpha_{2} \beta_{4} - 1260 \alpha_{0}^{6} \alpha_{2} \beta_{5} - 8510 \alpha_{0}^{6} \alpha_{3} \beta_{0} - 8860 \alpha_{0}^{6} \alpha_{3} \beta_{1} - 6720 \alpha_{0}^{6} \alpha_{3} \beta_{2} - 4280 \alpha_{0}^{6} \alpha_{3} \beta_{3} - 2100 \alpha_{0}^{6} \alpha_{3} \beta_{4} - 6900 \alpha_{0}^{6} \alpha_{4} \beta_{0} - 7075 \alpha_{0}^{6} \alpha_{4} \beta_{1} - 4785 \alpha_{0}^{6} \alpha_{4} \beta_{2} - 2100 \alpha_{0}^{6} \alpha_{4} \beta_{3} - 3002 \alpha_{0}^{6} \alpha_{5} \beta_{0} - 2754 \alpha_{0}^{6} \alpha_{5} \beta_{1} - 1260 \alpha_{0}^{6} \alpha_{5} \beta_{2} - 669 \alpha_{0}^{6} \alpha_{6} \beta_{0} - 420 \alpha_{0}^{6} \alpha_{6} \beta_{1} - 60 \alpha_{0}^{6} \alpha_{7} \beta_{0} + 10602 \alpha_{0}^{5} \alpha_{1}^{2} \beta_{0} + 10750 \alpha_{0}^{5} \alpha_{1}^{2} \beta_{1} + 8250 \alpha_{0}^{5} \alpha_{1}^{2} \beta_{2} + 5760 \alpha_{0}^{5} \alpha_{1}^{2} \beta_{3} + 3900 \alpha_{0}^{5} \alpha_{1}^{2} \beta_{4} + 2520 \alpha_{0}^{5} \alpha_{1}^{2} \beta_{5} + 51060 \alpha_{0}^{5} \alpha_{1} \alpha_{2} \beta_{0} + 53160 \alpha_{0}^{5} \alpha_{1} \alpha_{2} \beta_{1} + 40320 \alpha_{0}^{5} \alpha_{1} \alpha_{2} \beta_{2} + 25680 \alpha_{0}^{5} \alpha_{1} \alpha_{2} \beta_{3} + 12600 \alpha_{0}^{5} \alpha_{1} \alpha_{2} \beta_{4} + 55200 \alpha_{0}^{5} \alpha_{1} \alpha_{3} \beta_{0} + 56600 \alpha_{0}^{5} \alpha_{1} \alpha_{3} \beta_{1} + 38280 \alpha_{0}^{5} \alpha_{1} \alpha_{3} \beta_{2} + 16800 \alpha_{0}^{5} \alpha_{1} \alpha_{3} \beta_{3} + 30020 \alpha_{0}^{5} \alpha_{1} \alpha_{4} \beta_{0} + 27540 \alpha_{0}^{5} \alpha_{1} \alpha_{4} \beta_{1} + 12600 \alpha_{0}^{5} \alpha_{1} \alpha_{4} \beta_{2} + 8028 \alpha_{0}^{5} \alpha_{1} \alpha_{5} \beta_{0} + 5040 \alpha_{0}^{5} \alpha_{1} \alpha_{5} \beta_{1} + 840 \alpha_{0}^{5} \alpha_{1} \alpha_{6} \beta_{0} + 41400 \alpha_{0}^{5} \alpha_{2}^{2} \beta_{0} + 42450 \alpha_{0}^{5} \alpha_{2}^{2} \beta_{1} + 28710 \alpha_{0}^{5} \alpha_{2}^{2} \beta_{2} + 12600 \alpha_{0}^{5} \alpha_{2}^{2} \beta_{3} + 60040 \alpha_{0}^{5} \alpha_{2} \alpha_{3} \beta_{0} + 55080 \alpha_{0}^{5} \alpha_{2} \alpha_{3} \beta_{1} + 25200 \alpha_{0}^{5} \alpha_{2} \alpha_{3} \beta_{2} + 20070 \alpha_{0}^{5} \alpha_{2} \alpha_{4} \beta_{0} + 12600 \alpha_{0}^{5} \alpha_{2} \alpha_{4} \beta_{1} + 2520 \alpha_{0}^{5} \alpha_{2} \alpha_{5} \beta_{0} + 13380 \alpha_{0}^{5} \alpha_{3}^{2} \beta_{0} + 8400 \alpha_{0}^{5} \alpha_{3}^{2} \beta_{1} + 4200 \alpha_{0}^{5} \alpha_{3} \alpha_{4} \beta_{0} - 51060 \alpha_{0}^{4} \alpha_{1}^{3} \beta_{0} - 53160 \alpha_{0}^{4} \alpha_{1}^{3} \beta_{1} - 40320 \alpha_{0}^{4} \alpha_{1}^{3} \beta_{2} - 25680 \alpha_{0}^{4} \alpha_{1}^{3} \beta_{3} - 12600 \alpha_{0}^{4} \alpha_{1}^{3} \beta_{4} - 248400 \alpha_{0}^{4} \alpha_{1}^{2} \alpha_{2} \beta_{0} - 254700 \alpha_{0}^{4} \alpha_{1}^{2} \alpha_{2} \beta_{1} - 172260 \alpha_{0}^{4} \alpha_{1}^{2} \alpha_{2} \beta_{2} - 75600 \alpha_{0}^{4} \alpha_{1}^{2} \alpha_{2} \beta_{3} - 180120 \alpha_{0}^{4} \alpha_{1}^{2} \alpha_{3} \beta_{0} - 165240 \alpha_{0}^{4} \alpha_{1}^{2} \alpha_{3} \beta_{1} - 75600 \alpha_{0}^{4} \alpha_{1}^{2} \alpha_{3} \beta_{2} - 60210 \alpha_{0}^{4} \alpha_{1}^{2} \alpha_{4} \beta_{0} - 37800 \alpha_{0}^{4} \alpha_{1}^{2} \alpha_{4} \beta_{1} - 7560 \alpha_{0}^{4} \alpha_{1}^{2} \alpha_{5} \beta_{0} - 270180 \alpha_{0}^{4} \alpha_{1} \alpha_{2}^{2} \beta_{0} - 247860 \alpha_{0}^{4} \alpha_{1} \alpha_{2}^{2} \beta_{1} - 113400 \alpha_{0}^{4} \alpha_{1} \alpha_{2}^{2} \beta_{2} - 240840 \alpha_{0}^{4} \alpha_{1} \alpha_{2} \alpha_{3} \beta_{0} - 151200 \alpha_{0}^{4} \alpha_{1} \alpha_{2} \alpha_{3} \beta_{1} - 37800 \alpha_{0}^{4} \alpha_{1} \alpha_{2} \alpha_{4} \beta_{0} - 25200 \alpha_{0}^{4} \alpha_{1} \alpha_{3}^{2} \beta_{0} - 60210 \alpha_{0}^{4} \alpha_{2}^{3} \beta_{0} - 37800 \alpha_{0}^{4} \alpha_{2}^{3} \beta_{1} - 37800 \alpha_{0}^{4} \alpha_{2}^{2} \alpha_{3} \beta_{0} + 165600 \alpha_{0}^{3} \alpha_{1}^{4} \beta_{0} + 169800 \alpha_{0}^{3} \alpha_{1}^{4} \beta_{1} + 114840 \alpha_{0}^{3} \alpha_{1}^{4} \beta_{2} + 50400 \alpha_{0}^{3} \alpha_{1}^{4} \beta_{3} + 720480 \alpha_{0}^{3} \alpha_{1}^{3} \alpha_{2} \beta_{0} + 660960 \alpha_{0}^{3} \alpha_{1}^{3} \alpha_{2} \beta_{1} + 302400 \alpha_{0}^{3} \alpha_{1}^{3} \alpha_{2} \beta_{2} + 321120 \alpha_{0}^{3} \alpha_{1}^{3} \alpha_{3} \beta_{0} + 201600 \alpha_{0}^{3} \alpha_{1}^{3} \alpha_{3} \beta_{1} + 50400 \alpha_{0}^{3} \alpha_{1}^{3} \alpha_{4} \beta_{0} + 722520 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{2}^{2} \beta_{0} + 453600 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{2}^{2} \beta_{1} + 302400 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{2} \alpha_{3} \beta_{0} + 151200 \alpha_{0}^{3} \alpha_{1} \alpha_{2}^{3} \beta_{0} - 360240 \alpha_{0}^{2} \alpha_{1}^{5} \beta_{0} - 330480 \alpha_{0}^{2} \alpha_{1}^{5} \beta_{1} - 151200 \alpha_{0}^{2} \alpha_{1}^{5} \beta_{2} - 1204200 \alpha_{0}^{2} \alpha_{1}^{4} \alpha_{2} \beta_{0} - 756000 \alpha_{0}^{2} \alpha_{1}^{4} \alpha_{2} \beta_{1} - 252000 \alpha_{0}^{2} \alpha_{1}^{4} \alpha_{3} \beta_{0} - 756000 \alpha_{0}^{2} \alpha_{1}^{3} \alpha_{2}^{2} \beta_{0} + 481680 \alpha_{0} \alpha_{1}^{6} \beta_{0} + 302400 \alpha_{0} \alpha_{1}^{6} \beta_{1} + 907200 \alpha_{0} \alpha_{1}^{5} \alpha_{2} \beta_{0} - 302400 \alpha_{1}^{7} \beta_{0}\right) & \frac{1}{30 \alpha_{0}^{7}} \left(649 \alpha_{0}^{6} \beta_{0} + 628 \alpha_{0}^{6} \beta_{1} + 465 \alpha_{0}^{6} \beta_{2} + 320 \alpha_{0}^{6} \beta_{3} + 225 \alpha_{0}^{6} \beta_{4} + 180 \alpha_{0}^{6} \beta_{5} + 210 \alpha_{0}^{6} \beta_{6} - 5301 \alpha_{0}^{5} \alpha_{1} \beta_{0} - 5375 \alpha_{0}^{5} \alpha_{1} \beta_{1} - 4125 \alpha_{0}^{5} \alpha_{1} \beta_{2} - 2880 \alpha_{0}^{5} \alpha_{1} \beta_{3} - 1950 \alpha_{0}^{5} \alpha_{1} \beta_{4} - 1260 \alpha_{0}^{5} \alpha_{1} \beta_{5} - 12765 \alpha_{0}^{5} \alpha_{2} \beta_{0} - 13290 \alpha_{0}^{5} \alpha_{2} \beta_{1} - 10080 \alpha_{0}^{5} \alpha_{2} \beta_{2} - 6420 \alpha_{0}^{5} \alpha_{2} \beta_{3} - 3150 \alpha_{0}^{5} \alpha_{2} \beta_{4} - 13800 \alpha_{0}^{5} \alpha_{3} \beta_{0} - 14150 \alpha_{0}^{5} \alpha_{3} \beta_{1} - 9570 \alpha_{0}^{5} \alpha_{3} \beta_{2} - 4200 \alpha_{0}^{5} \alpha_{3} \beta_{3} - 7505 \alpha_{0}^{5} \alpha_{4} \beta_{0} - 6885 \alpha_{0}^{5} \alpha_{4} \beta_{1} - 3150 \alpha_{0}^{5} \alpha_{4} \beta_{2} - 2007 \alpha_{0}^{5} \alpha_{5} \beta_{0} - 1260 \alpha_{0}^{5} \alpha_{5} \beta_{1} - 210 \alpha_{0}^{5} \alpha_{6} \beta_{0} + 25530 \alpha_{0}^{4} \alpha_{1}^{2} \beta_{0} + 26580 \alpha_{0}^{4} \alpha_{1}^{2} \beta_{1} + 20160 \alpha_{0}^{4} \alpha_{1}^{2} \beta_{2} + 12840 \alpha_{0}^{4} \alpha_{1}^{2} \beta_{3} + 6300 \alpha_{0}^{4} \alpha_{1}^{2} \beta_{4} + 82800 \alpha_{0}^{4} \alpha_{1} \alpha_{2} \beta_{0} + 84900 \alpha_{0}^{4} \alpha_{1} \alpha_{2} \beta_{1} + 57420 \alpha_{0}^{4} \alpha_{1} \alpha_{2} \beta_{2} + 25200 \alpha_{0}^{4} \alpha_{1} \alpha_{2} \beta_{3} + 60040 \alpha_{0}^{4} \alpha_{1} \alpha_{3} \beta_{0} + 55080 \alpha_{0}^{4} \alpha_{1} \alpha_{3} \beta_{1} + 25200 \alpha_{0}^{4} \alpha_{1} \alpha_{3} \beta_{2} + 20070 \alpha_{0}^{4} \alpha_{1} \alpha_{4} \beta_{0} + 12600 \alpha_{0}^{4} \alpha_{1} \alpha_{4} \beta_{1} + 2520 \alpha_{0}^{4} \alpha_{1} \alpha_{5} \beta_{0} + 45030 \alpha_{0}^{4} \alpha_{2}^{2} \beta_{0} + 41310 \alpha_{0}^{4} \alpha_{2}^{2} \beta_{1} + 18900 \alpha_{0}^{4} \alpha_{2}^{2} \beta_{2} + 40140 \alpha_{0}^{4} \alpha_{2} \alpha_{3} \beta_{0} + 25200 \alpha_{0}^{4} \alpha_{2} \alpha_{3} \beta_{1} + 6300 \alpha_{0}^{4} \alpha_{2} \alpha_{4} \beta_{0} + 4200 \alpha_{0}^{4} \alpha_{3}^{2} \beta_{0} - 82800 \alpha_{0}^{3} \alpha_{1}^{3} \beta_{0} - 84900 \alpha_{0}^{3} \alpha_{1}^{3} \beta_{1} - 57420 \alpha_{0}^{3} \alpha_{1}^{3} \beta_{2} - 25200 \alpha_{0}^{3} \alpha_{1}^{3} \beta_{3} - 270180 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{2} \beta_{0} - 247860 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{2} \beta_{1} - 113400 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{2} \beta_{2} - 120420 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{3} \beta_{0} - 75600 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{3} \beta_{1} - 18900 \alpha_{0}^{3} \alpha_{1}^{2} \alpha_{4} \beta_{0} - 180630 \alpha_{0}^{3} \alpha_{1} \alpha_{2}^{2} \beta_{0} - 113400 \alpha_{0}^{3} \alpha_{1} \alpha_{2}^{2} \beta_{1} - 75600 \alpha_{0}^{3} \alpha_{1} \alpha_{2} \alpha_{3} \beta_{0} - 18900 \alpha_{0}^{3} \alpha_{2}^{3} \beta_{0} + 180120 \alpha_{0}^{2} \alpha_{1}^{4} \beta_{0} + 165240 \alpha_{0}^{2} \alpha_{1}^{4} \beta_{1} + 75600 \alpha_{0}^{2} \alpha_{1}^{4} \beta_{2} + 481680 \alpha_{0}^{2} \alpha_{1}^{3} \alpha_{2} \beta_{0} + 302400 \alpha_{0}^{2} \alpha_{1}^{3} \alpha_{2} \beta_{1} + 100800 \alpha_{0}^{2} \alpha_{1}^{3} \alpha_{3} \beta_{0} + 226800 \alpha_{0}^{2} \alpha_{1}^{2} \alpha_{2}^{2} \beta_{0} - 240840 \alpha_{0} \alpha_{1}^{5} \beta_{0} - 151200 \alpha_{0} \alpha_{1}^{5} \beta_{1} - 378000 \alpha_{0} \alpha_{1}^{4} \alpha_{2} \beta_{0} + 151200 \alpha_{1}^{6} \beta_{0}\right) & \frac{1}{60 \alpha_{0}^{6}} \left(5301 \alpha_{0}^{5} \beta_{0} + 5375 \alpha_{0}^{5} \beta_{1} + 4125 \alpha_{0}^{5} \beta_{2} + 2880 \alpha_{0}^{5} \beta_{3} + 1950 \alpha_{0}^{5} \beta_{4} + 1260 \alpha_{0}^{5} \beta_{5} - 25530 \alpha_{0}^{4} \alpha_{1} \beta_{0} - 26580 \alpha_{0}^{4} \alpha_{1} \beta_{1} - 20160 \alpha_{0}^{4} \alpha_{1} \beta_{2} - 12840 \alpha_{0}^{4} \alpha_{1} \beta_{3} - 6300 \alpha_{0}^{4} \alpha_{1} \beta_{4} - 41400 \alpha_{0}^{4} \alpha_{2} \beta_{0} - 42450 \alpha_{0}^{4} \alpha_{2} \beta_{1} - 28710 \alpha_{0}^{4} \alpha_{2} \beta_{2} - 12600 \alpha_{0}^{4} \alpha_{2} \beta_{3} - 30020 \alpha_{0}^{4} \alpha_{3} \beta_{0} - 27540 \alpha_{0}^{4} \alpha_{3} \beta_{1} - 12600 \alpha_{0}^{4} \alpha_{3} \beta_{2} - 10035 \alpha_{0}^{4} \alpha_{4} \beta_{0} - 6300 \alpha_{0}^{4} \alpha_{4} \beta_{1} - 1260 \alpha_{0}^{4} \alpha_{5} \beta_{0} + 82800 \alpha_{0}^{3} \alpha_{1}^{2} \beta_{0} + 84900 \alpha_{0}^{3} \alpha_{1}^{2} \beta_{1} + 57420 \alpha_{0}^{3} \alpha_{1}^{2} \beta_{2} + 25200 \alpha_{0}^{3} \alpha_{1}^{2} \beta_{3} + 180120 \alpha_{0}^{3} \alpha_{1} \alpha_{2} \beta_{0} + 165240 \alpha_{0}^{3} \alpha_{1} \alpha_{2} \beta_{1} + 75600 \alpha_{0}^{3} \alpha_{1} \alpha_{2} \beta_{2} + 80280 \alpha_{0}^{3} \alpha_{1} \alpha_{3} \beta_{0} + 50400 \alpha_{0}^{3} \alpha_{1} \alpha_{3} \beta_{1} + 12600 \alpha_{0}^{3} \alpha_{1} \alpha_{4} \beta_{0} + 60210 \alpha_{0}^{3} \alpha_{2}^{2} \beta_{0} + 37800 \alpha_{0}^{3} \alpha_{2}^{2} \beta_{1} + 25200 \alpha_{0}^{3} \alpha_{2} \alpha_{3} \beta_{0} - 180120 \alpha_{0}^{2} \alpha_{1}^{3} \beta_{0} - 165240 \alpha_{0}^{2} \alpha_{1}^{3} \beta_{1} - 75600 \alpha_{0}^{2} \alpha_{1}^{3} \beta_{2} - 361260 \alpha_{0}^{2} \alpha_{1}^{2} \alpha_{2} \beta_{0} - 226800 \alpha_{0}^{2} \alpha_{1}^{2} \alpha_{2} \beta_{1} - 75600 \alpha_{0}^{2} \alpha_{1}^{2} \alpha_{3} \beta_{0} - 113400 \alpha_{0}^{2} \alpha_{1} \alpha_{2}^{2} \beta_{0} + 240840 \alpha_{0} \alpha_{1}^{4} \beta_{0} + 151200 \alpha_{0} \alpha_{1}^{4} \beta_{1} + 302400 \alpha_{0} \alpha_{1}^{3} \alpha_{2} \beta_{0} - 151200 \alpha_{1}^{5} \beta_{0}\right) & \frac{1}{6 \alpha_{0}^{5}} \left(851 \alpha_{0}^{4} \beta_{0} + 886 \alpha_{0}^{4} \beta_{1} + 672 \alpha_{0}^{4} \beta_{2} + 428 \alpha_{0}^{4} \beta_{3} + 210 \alpha_{0}^{4} \beta_{4} - 2760 \alpha_{0}^{3} \alpha_{1} \beta_{0} - 2830 \alpha_{0}^{3} \alpha_{1} \beta_{1} - 1914 \alpha_{0}^{3} \alpha_{1} \beta_{2} - 840 \alpha_{0}^{3} \alpha_{1} \beta_{3} - 3002 \alpha_{0}^{3} \alpha_{2} \beta_{0} - 2754 \alpha_{0}^{3} \alpha_{2} \beta_{1} - 1260 \alpha_{0}^{3} \alpha_{2} \beta_{2} - 1338 \alpha_{0}^{3} \alpha_{3} \beta_{0} - 840 \alpha_{0}^{3} \alpha_{3} \beta_{1} - 210 \alpha_{0}^{3} \alpha_{4} \beta_{0} + 6004 \alpha_{0}^{2} \alpha_{1}^{2} \beta_{0} + 5508 \alpha_{0}^{2} \alpha_{1}^{2} \beta_{1} + 2520 \alpha_{0}^{2} \alpha_{1}^{2} \beta_{2} + 8028 \alpha_{0}^{2} \alpha_{1} \alpha_{2} \beta_{0} + 5040 \alpha_{0}^{2} \alpha_{1} \alpha_{2} \beta_{1} + 1680 \alpha_{0}^{2} \alpha_{1} \alpha_{3} \beta_{0} + 1260 \alpha_{0}^{2} \alpha_{2}^{2} \beta_{0} - 8028 \alpha_{0} \alpha_{1}^{3} \beta_{0} - 5040 \alpha_{0} \alpha_{1}^{3} \beta_{1} - 7560 \alpha_{0} \alpha_{1}^{2} \alpha_{2} \beta_{0} + 5040 \alpha_{1}^{4} \beta_{0}\right) & \frac{1}{12 \alpha_{0}^{4}} \left(1380 \alpha_{0}^{3} \beta_{0} + 1415 \alpha_{0}^{3} \beta_{1} + 957 \alpha_{0}^{3} \beta_{2} + 420 \alpha_{0}^{3} \beta_{3} - 3002 \alpha_{0}^{2} \alpha_{1} \beta_{0} - 2754 \alpha_{0}^{2} \alpha_{1} \beta_{1} - 1260 \alpha_{0}^{2} \alpha_{1} \beta_{2} - 2007 \alpha_{0}^{2} \alpha_{2} \beta_{0} - 1260 \alpha_{0}^{2} \alpha_{2} \beta_{1} - 420 \alpha_{0}^{2} \alpha_{3} \beta_{0} + 4014 \alpha_{0} \alpha_{1}^{2} \beta_{0} + 2520 \alpha_{0} \alpha_{1}^{2} \beta_{1} + 2520 \alpha_{0} \alpha_{1} \alpha_{2} \beta_{0} - 2520 \alpha_{1}^{3} \beta_{0}\right) & \frac{1}{30 \alpha_{0}^{3}} \left(1501 \alpha_{0}^{2} \beta_{0} + 1377 \alpha_{0}^{2} \beta_{1} + 630 \alpha_{0}^{2} \beta_{2} - 2007 \alpha_{0} \alpha_{1} \beta_{0} - 1260 \alpha_{0} \alpha_{1} \beta_{1} - 630 \alpha_{0} \alpha_{2} \beta_{0} + 1260 \alpha_{1}^{2} \beta_{0}\right) & \frac{1}{20 \alpha_{0}^{2}} \left(223 \alpha_{0} \beta_{0} + 140 \alpha_{0} \beta_{1} - 140 \alpha_{1} \beta_{0}\right) & \frac{\beta_{0}}{\alpha_{0}}\end{matrix}\right]$$
In [182]:
((X_C.rhs*X_P.rhs**(-1))**(-1)).applyfunc(simplify)
Out[182]:
$$\left[\begin{matrix}\frac{\alpha_{0}}{\beta_{0}} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\\frac{1}{\beta_{0}^{2}} \left(- \alpha_{0} \beta_{1} + \alpha_{1} \beta_{0}\right) & \frac{\alpha_{0}}{\beta_{0}} & 0 & 0 & 0 & 0 & 0 & 0\\\frac{1}{\beta_{0}^{3}} \left(\alpha_{0} \beta_{0} \beta_{1} - \alpha_{0} \beta_{0} \beta_{2} + 2 \alpha_{0} \beta_{1}^{2} - 2 \alpha_{1} \beta_{0} \beta_{1} + \alpha_{2} \beta_{0}^{2}\right) & \frac{1}{\beta_{0}^{2}} \left(\left(\alpha_{0} + 2 \alpha_{1}\right) \beta_{0} - 2 \left(\beta_{0} + \beta_{1}\right) \alpha_{0}\right) & \frac{\alpha_{0}}{\beta_{0}} & 0 & 0 & 0 & 0 & 0\\\frac{1}{\beta_{0}^{4}} \left(- \alpha_{0} \beta_{0}^{2} \beta_{1} + \frac{5 \beta_{0}^{2}}{2} \alpha_{0} \beta_{2} - \alpha_{0} \beta_{0}^{2} \beta_{3} - 6 \alpha_{0} \beta_{0} \beta_{1}^{2} + 6 \alpha_{0} \beta_{0} \beta_{1} \beta_{2} - 6 \alpha_{0} \beta_{1}^{3} + 3 \alpha_{1} \beta_{0}^{2} \beta_{1} - 3 \alpha_{1} \beta_{0}^{2} \beta_{2} + 6 \alpha_{1} \beta_{0} \beta_{1}^{2} - 3 \alpha_{2} \beta_{0}^{2} \beta_{1} + \alpha_{3} \beta_{0}^{3}\right) & \frac{1}{\beta_{0}^{3}} \left(\alpha_{0} \beta_{0}^{2} + 6 \alpha_{0} \beta_{0} \beta_{1} - 3 \alpha_{0} \beta_{0} \beta_{2} + 6 \alpha_{0} \beta_{1}^{2} - 3 \alpha_{1} \beta_{0}^{2} - 6 \alpha_{1} \beta_{0} \beta_{1} + 3 \alpha_{2} \beta_{0}^{2}\right) & \frac{1}{2 \beta_{0}^{2}} \left(6 \left(\alpha_{0} + \alpha_{1}\right) \beta_{0} - \left(11 \beta_{0} + 6 \beta_{1}\right) \alpha_{0}\right) & \frac{\alpha_{0}}{\beta_{0}} & 0 & 0 & 0 & 0\\\frac{1}{\beta_{0}^{5}} \left(\alpha_{0} \beta_{0}^{3} \beta_{1} - \frac{29 \beta_{0}^{3}}{6} \alpha_{0} \beta_{2} + \frac{13 \beta_{0}^{3}}{3} \alpha_{0} \beta_{3} - \alpha_{0} \beta_{0}^{3} \beta_{4} + 14 \alpha_{0} \beta_{0}^{2} \beta_{1}^{2} - 32 \alpha_{0} \beta_{0}^{2} \beta_{1} \beta_{2} + 8 \alpha_{0} \beta_{0}^{2} \beta_{1} \beta_{3} + 6 \alpha_{0} \beta_{0}^{2} \beta_{2}^{2} + 36 \alpha_{0} \beta_{0} \beta_{1}^{3} - 36 \alpha_{0} \beta_{0} \beta_{1}^{2} \beta_{2} + 24 \alpha_{0} \beta_{1}^{4} - 4 \alpha_{1} \beta_{0}^{3} \beta_{1} + 10 \alpha_{1} \beta_{0}^{3} \beta_{2} - 4 \alpha_{1} \beta_{0}^{3} \beta_{3} - 24 \alpha_{1} \beta_{0}^{2} \beta_{1}^{2} + 24 \alpha_{1} \beta_{0}^{2} \beta_{1} \beta_{2} - 24 \alpha_{1} \beta_{0} \beta_{1}^{3} + 6 \alpha_{2} \beta_{0}^{3} \beta_{1} - 6 \alpha_{2} \beta_{0}^{3} \beta_{2} + 12 \alpha_{2} \beta_{0}^{2} \beta_{1}^{2} - 4 \alpha_{3} \beta_{0}^{3} \beta_{1} + \alpha_{4} \beta_{0}^{4}\right) & - \frac{\alpha_{0}}{\beta_{0}} - \frac{14 \alpha_{0}}{\beta_{0}^{2}} \beta_{1} + \frac{16 \alpha_{0}}{\beta_{0}^{2}} \beta_{2} - \frac{4 \alpha_{0}}{\beta_{0}^{2}} \beta_{3} - \frac{36 \beta_{1}^{2}}{\beta_{0}^{3}} \alpha_{0} + \frac{24 \alpha_{0}}{\beta_{0}^{3}} \beta_{1} \beta_{2} - \frac{24 \beta_{1}^{3}}{\beta_{0}^{4}} \alpha_{0} + \frac{4 \alpha_{1}}{\beta_{0}} + \frac{24 \alpha_{1}}{\beta_{0}^{2}} \beta_{1} - \frac{12 \alpha_{1}}{\beta_{0}^{2}} \beta_{2} + \frac{24 \beta_{1}^{2}}{\beta_{0}^{3}} \alpha_{1} - \frac{6 \alpha_{2}}{\beta_{0}} - \frac{12 \alpha_{2}}{\beta_{0}^{2}} \beta_{1} + \frac{4 \alpha_{3}}{\beta_{0}} & \frac{1}{6 \beta_{0}^{3}} \left(29 \alpha_{0} \beta_{0}^{2} + 96 \alpha_{0} \beta_{0} \beta_{1} - 36 \alpha_{0} \beta_{0} \beta_{2} + 72 \alpha_{0} \beta_{1}^{2} - 60 \alpha_{1} \beta_{0}^{2} - 72 \alpha_{1} \beta_{0} \beta_{1} + 36 \alpha_{2} \beta_{0}^{2}\right) & \frac{1}{\beta_{0}^{2}} \left(- \frac{13 \alpha_{0}}{3} \beta_{0} - 4 \alpha_{0} \beta_{1} + 4 \alpha_{1} \beta_{0}\right) & \frac{\alpha_{0}}{\beta_{0}} & 0 & 0 & 0\\- \frac{1}{72 \beta_{0}^{6}} \left(72 \alpha_{0} \beta_{0}^{4} \beta_{1} - 613 \alpha_{0} \beta_{0}^{4} \beta_{2} + 934 \alpha_{0} \beta_{0}^{4} \beta_{3} - 462 \alpha_{0} \beta_{0}^{4} \beta_{4} + 72 \alpha_{0} \beta_{0}^{4} \beta_{5} + 2160 \alpha_{0} \beta_{0}^{3} \beta_{1}^{2} - 8520 \alpha_{0} \beta_{0}^{3} \beta_{1} \beta_{2} + 4560 \alpha_{0} \beta_{0}^{3} \beta_{1} \beta_{3} - 720 \alpha_{0} \beta_{0}^{3} \beta_{1} \beta_{4} + 3600 \alpha_{0} \beta_{0}^{3} \beta_{2}^{2} - 1440 \alpha_{0} \beta_{0}^{3} \beta_{2} \beta_{3} + 10800 \alpha_{0} \beta_{0}^{2} \beta_{1}^{3} - 23760 \alpha_{0} \beta_{0}^{2} \beta_{1}^{2} \beta_{2} + 4320 \alpha_{0} \beta_{0}^{2} \beta_{1}^{2} \beta_{3} + 6480 \alpha_{0} \beta_{0}^{2} \beta_{1} \beta_{2}^{2} + 17280 \alpha_{0} \beta_{0} \beta_{1}^{4} - 17280 \alpha_{0} \beta_{0} \beta_{1}^{3} \beta_{2} + 8640 \alpha_{0} \beta_{1}^{5} - 360 \alpha_{1} \beta_{0}^{4} \beta_{1} + 1740 \alpha_{1} \beta_{0}^{4} \beta_{2} - 1560 \alpha_{1} \beta_{0}^{4} \beta_{3} + 360 \alpha_{1} \beta_{0}^{4} \beta_{4} - 5040 \alpha_{1} \beta_{0}^{3} \beta_{1}^{2} + 11520 \alpha_{1} \beta_{0}^{3} \beta_{1} \beta_{2} - 2880 \alpha_{1} \beta_{0}^{3} \beta_{1} \beta_{3} - 2160 \alpha_{1} \beta_{0}^{3} \beta_{2}^{2} - 12960 \alpha_{1} \beta_{0}^{2} \beta_{1}^{3} + 12960 \alpha_{1} \beta_{0}^{2} \beta_{1}^{2} \beta_{2} - 8640 \alpha_{1} \beta_{0} \beta_{1}^{4} + 720 \alpha_{2} \beta_{0}^{4} \beta_{1} - 1800 \alpha_{2} \beta_{0}^{4} \beta_{2} + 720 \alpha_{2} \beta_{0}^{4} \beta_{3} + 4320 \alpha_{2} \beta_{0}^{3} \beta_{1}^{2} - 4320 \alpha_{2} \beta_{0}^{3} \beta_{1} \beta_{2} + 4320 \alpha_{2} \beta_{0}^{2} \beta_{1}^{3} - 720 \alpha_{3} \beta_{0}^{4} \beta_{1} + 720 \alpha_{3} \beta_{0}^{4} \beta_{2} - 1440 \alpha_{3} \beta_{0}^{3} \beta_{1}^{2} + 360 \alpha_{4} \beta_{0}^{4} \beta_{1} - 72 \alpha_{5} \beta_{0}^{5}\right) & \frac{\alpha_{0}}{\beta_{0}} + \frac{30 \alpha_{0}}{\beta_{0}^{2}} \beta_{1} - \frac{355 \alpha_{0} \beta_{2}}{6 \beta_{0}^{2}} + \frac{95 \alpha_{0} \beta_{3}}{3 \beta_{0}^{2}} - \frac{5 \alpha_{0}}{\beta_{0}^{2}} \beta_{4} + \frac{150 \beta_{1}^{2}}{\beta_{0}^{3}} \alpha_{0} - \frac{220 \alpha_{0}}{\beta_{0}^{3}} \beta_{1} \beta_{2} + \frac{40 \alpha_{0}}{\beta_{0}^{3}} \beta_{1} \beta_{3} + \frac{30 \beta_{2}^{2}}{\beta_{0}^{3}} \alpha_{0} + \frac{240 \beta_{1}^{3}}{\beta_{0}^{4}} \alpha_{0} - \frac{180 \beta_{1}^{2}}{\beta_{0}^{4}} \alpha_{0} \beta_{2} + \frac{120 \beta_{1}^{4}}{\beta_{0}^{5}} \alpha_{0} - \frac{5 \alpha_{1}}{\beta_{0}} - \frac{70 \alpha_{1}}{\beta_{0}^{2}} \beta_{1} + \frac{80 \alpha_{1}}{\beta_{0}^{2}} \beta_{2} - \frac{20 \alpha_{1}}{\beta_{0}^{2}} \beta_{3} - \frac{180 \beta_{1}^{2}}{\beta_{0}^{3}} \alpha_{1} + \frac{120 \alpha_{1}}{\beta_{0}^{3}} \beta_{1} \beta_{2} - \frac{120 \beta_{1}^{3}}{\beta_{0}^{4}} \alpha_{1} + \frac{10 \alpha_{2}}{\beta_{0}} + \frac{60 \alpha_{2}}{\beta_{0}^{2}} \beta_{1} - \frac{30 \alpha_{2}}{\beta_{0}^{2}} \beta_{2} + \frac{60 \beta_{1}^{2}}{\beta_{0}^{3}} \alpha_{2} - \frac{10 \alpha_{3}}{\beta_{0}} - \frac{20 \alpha_{3}}{\beta_{0}^{2}} \beta_{1} + \frac{5 \alpha_{4}}{\beta_{0}} & - \frac{1}{72 \beta_{0}^{4}} \left(613 \alpha_{0} \beta_{0}^{3} + 4260 \alpha_{0} \beta_{0}^{2} \beta_{1} - 3600 \alpha_{0} \beta_{0}^{2} \beta_{2} + 720 \alpha_{0} \beta_{0}^{2} \beta_{3} + 7920 \alpha_{0} \beta_{0} \beta_{1}^{2} - 4320 \alpha_{0} \beta_{0} \beta_{1} \beta_{2} + 4320 \alpha_{0} \beta_{1}^{3} - 1740 \alpha_{1} \beta_{0}^{3} - 5760 \alpha_{1} \beta_{0}^{2} \beta_{1} + 2160 \alpha_{1} \beta_{0}^{2} \beta_{2} - 4320 \alpha_{1} \beta_{0} \beta_{1}^{2} + 1800 \alpha_{2} \beta_{0}^{3} + 2160 \alpha_{2} \beta_{0}^{2} \beta_{1} - 720 \alpha_{3} \beta_{0}^{3}\right) & \frac{1}{36 \beta_{0}^{3}} \left(467 \alpha_{0} \beta_{0}^{2} + 1140 \alpha_{0} \beta_{0} \beta_{1} - 360 \alpha_{0} \beta_{0} \beta_{2} + 720 \alpha_{0} \beta_{1}^{2} - 780 \alpha_{1} \beta_{0}^{2} - 720 \alpha_{1} \beta_{0} \beta_{1} + 360 \alpha_{2} \beta_{0}^{2}\right) & \frac{1}{\beta_{0}^{2}} \left(- \frac{77 \alpha_{0}}{12} \beta_{0} - 5 \alpha_{0} \beta_{1} + 5 \alpha_{1} \beta_{0}\right) & \frac{\alpha_{0}}{\beta_{0}} & 0 & 0\\\frac{1}{720 \beta_{0}^{7}} \left(720 \alpha_{0} \beta_{0}^{5} \beta_{1} - 10331 \alpha_{0} \beta_{0}^{5} \beta_{2} + 23978 \alpha_{0} \beta_{0}^{5} \beta_{3} - 19194 \alpha_{0} \beta_{0}^{5} \beta_{4} + 6264 \alpha_{0} \beta_{0}^{5} \beta_{5} - 720 \alpha_{0} \beta_{0}^{5} \beta_{6} + 44640 \alpha_{0} \beta_{0}^{4} \beta_{1}^{2} - 271560 \alpha_{0} \beta_{0}^{4} \beta_{1} \beta_{2} + 234480 \alpha_{0} \beta_{0}^{4} \beta_{1} \beta_{3} - 77040 \alpha_{0} \beta_{0}^{4} \beta_{1} \beta_{4} + 8640 \alpha_{0} \beta_{0}^{4} \beta_{1} \beta_{5} + 194400 \alpha_{0} \beta_{0}^{4} \beta_{2}^{2} - 165600 \alpha_{0} \beta_{0}^{4} \beta_{2} \beta_{3} + 21600 \alpha_{0} \beta_{0}^{4} \beta_{2} \beta_{4} + 14400 \alpha_{0} \beta_{0}^{4} \beta_{3}^{2} + 388800 \alpha_{0} \beta_{0}^{3} \beta_{1}^{3} - 1414800 \alpha_{0} \beta_{0}^{3} \beta_{1}^{2} \beta_{2} + 540000 \alpha_{0} \beta_{0}^{3} \beta_{1}^{2} \beta_{3} - 64800 \alpha_{0} \beta_{0}^{3} \beta_{1}^{2} \beta_{4} + 842400 \alpha_{0} \beta_{0}^{3} \beta_{1} \beta_{2}^{2} - 259200 \alpha_{0} \beta_{0}^{3} \beta_{1} \beta_{2} \beta_{3} - 64800 \alpha_{0} \beta_{0}^{3} \beta_{2}^{3} + 1123200 \alpha_{0} \beta_{0}^{2} \beta_{1}^{4} - 2419200 \alpha_{0} \beta_{0}^{2} \beta_{1}^{3} \beta_{2} + 345600 \alpha_{0} \beta_{0}^{2} \beta_{1}^{3} \beta_{3} + 777600 \alpha_{0} \beta_{0}^{2} \beta_{1}^{2} \beta_{2}^{2} + 1296000 \alpha_{0} \beta_{0} \beta_{1}^{5} - 1296000 \alpha_{0} \beta_{0} \beta_{1}^{4} \beta_{2} + 518400 \alpha_{0} \beta_{1}^{6} - 4320 \alpha_{1} \beta_{0}^{5} \beta_{1} + 36780 \alpha_{1} \beta_{0}^{5} \beta_{2} - 56040 \alpha_{1} \beta_{0}^{5} \beta_{3} + 27720 \alpha_{1} \beta_{0}^{5} \beta_{4} - 4320 \alpha_{1} \beta_{0}^{5} \beta_{5} - 129600 \alpha_{1} \beta_{0}^{4} \beta_{1}^{2} + 511200 \alpha_{1} \beta_{0}^{4} \beta_{1} \beta_{2} - 273600 \alpha_{1} \beta_{0}^{4} \beta_{1} \beta_{3} + 43200 \alpha_{1} \beta_{0}^{4} \beta_{1} \beta_{4} - 216000 \alpha_{1} \beta_{0}^{4} \beta_{2}^{2} + 86400 \alpha_{1} \beta_{0}^{4} \beta_{2} \beta_{3} - 648000 \alpha_{1} \beta_{0}^{3} \beta_{1}^{3} + 1425600 \alpha_{1} \beta_{0}^{3} \beta_{1}^{2} \beta_{2} - 259200 \alpha_{1} \beta_{0}^{3} \beta_{1}^{2} \beta_{3} - 388800 \alpha_{1} \beta_{0}^{3} \beta_{1} \beta_{2}^{2} - 1036800 \alpha_{1} \beta_{0}^{2} \beta_{1}^{4} + 1036800 \alpha_{1} \beta_{0}^{2} \beta_{1}^{3} \beta_{2} - 518400 \alpha_{1} \beta_{0} \beta_{1}^{5} + 10800 \alpha_{2} \beta_{0}^{5} \beta_{1} - 52200 \alpha_{2} \beta_{0}^{5} \beta_{2} + 46800 \alpha_{2} \beta_{0}^{5} \beta_{3} - 10800 \alpha_{2} \beta_{0}^{5} \beta_{4} + 151200 \alpha_{2} \beta_{0}^{4} \beta_{1}^{2} - 345600 \alpha_{2} \beta_{0}^{4} \beta_{1} \beta_{2} + 86400 \alpha_{2} \beta_{0}^{4} \beta_{1} \beta_{3} + 64800 \alpha_{2} \beta_{0}^{4} \beta_{2}^{2} + 388800 \alpha_{2} \beta_{0}^{3} \beta_{1}^{3} - 388800 \alpha_{2} \beta_{0}^{3} \beta_{1}^{2} \beta_{2} + 259200 \alpha_{2} \beta_{0}^{2} \beta_{1}^{4} - 14400 \alpha_{3} \beta_{0}^{5} \beta_{1} + 36000 \alpha_{3} \beta_{0}^{5} \beta_{2} - 14400 \alpha_{3} \beta_{0}^{5} \beta_{3} - 86400 \alpha_{3} \beta_{0}^{4} \beta_{1}^{2} + 86400 \alpha_{3} \beta_{0}^{4} \beta_{1} \beta_{2} - 86400 \alpha_{3} \beta_{0}^{3} \beta_{1}^{3} + 10800 \alpha_{4} \beta_{0}^{5} \beta_{1} - 10800 \alpha_{4} \beta_{0}^{5} \beta_{2} + 21600 \alpha_{4} \beta_{0}^{4} \beta_{1}^{2} - 4320 \alpha_{5} \beta_{0}^{5} \beta_{1} + 720 \alpha_{6} \beta_{0}^{6}\right) & - \frac{\alpha_{0}}{\beta_{0}} - \frac{62 \alpha_{0}}{\beta_{0}^{2}} \beta_{1} + \frac{2263 \alpha_{0} \beta_{2}}{12 \beta_{0}^{2}} - \frac{977 \alpha_{0} \beta_{3}}{6 \beta_{0}^{2}} + \frac{107 \alpha_{0} \beta_{4}}{2 \beta_{0}^{2}} - \frac{6 \alpha_{0}}{\beta_{0}^{2}} \beta_{5} - \frac{540 \beta_{1}^{2}}{\beta_{0}^{3}} \alpha_{0} + \frac{1310 \alpha_{0}}{\beta_{0}^{3}} \beta_{1} \beta_{2} - \frac{500 \alpha_{0}}{\beta_{0}^{3}} \beta_{1} \beta_{3} + \frac{60 \alpha_{0}}{\beta_{0}^{3}} \beta_{1} \beta_{4} - \frac{390 \beta_{2}^{2}}{\beta_{0}^{3}} \alpha_{0} + \frac{120 \alpha_{0}}{\beta_{0}^{3}} \beta_{2} \beta_{3} - \frac{1560 \beta_{1}^{3}}{\beta_{0}^{4}} \alpha_{0} + \frac{2520 \beta_{1}^{2}}{\beta_{0}^{4}} \alpha_{0} \beta_{2} - \frac{360 \beta_{1}^{2}}{\beta_{0}^{4}} \alpha_{0} \beta_{3} - \frac{540 \beta_{2}^{2}}{\beta_{0}^{4}} \alpha_{0} \beta_{1} - \frac{1800 \beta_{1}^{4}}{\beta_{0}^{5}} \alpha_{0} + \frac{1440 \beta_{1}^{3}}{\beta_{0}^{5}} \alpha_{0} \beta_{2} - \frac{720 \beta_{1}^{5}}{\beta_{0}^{6}} \alpha_{0} + \frac{6 \alpha_{1}}{\beta_{0}} + \frac{180 \alpha_{1}}{\beta_{0}^{2}} \beta_{1} - \frac{355 \alpha_{1}}{\beta_{0}^{2}} \beta_{2} + \frac{190 \alpha_{1}}{\beta_{0}^{2}} \beta_{3} - \frac{30 \alpha_{1}}{\beta_{0}^{2}} \beta_{4} + \frac{900 \beta_{1}^{2}}{\beta_{0}^{3}} \alpha_{1} - \frac{1320 \alpha_{1}}{\beta_{0}^{3}} \beta_{1} \beta_{2} + \frac{240 \alpha_{1}}{\beta_{0}^{3}} \beta_{1} \beta_{3} + \frac{180 \beta_{2}^{2}}{\beta_{0}^{3}} \alpha_{1} + \frac{1440 \beta_{1}^{3}}{\beta_{0}^{4}} \alpha_{1} - \frac{1080 \beta_{1}^{2}}{\beta_{0}^{4}} \alpha_{1} \beta_{2} + \frac{720 \beta_{1}^{4}}{\beta_{0}^{5}} \alpha_{1} - \frac{15 \alpha_{2}}{\beta_{0}} - \frac{210 \alpha_{2}}{\beta_{0}^{2}} \beta_{1} + \frac{240 \alpha_{2}}{\beta_{0}^{2}} \beta_{2} - \frac{60 \alpha_{2}}{\beta_{0}^{2}} \beta_{3} - \frac{540 \beta_{1}^{2}}{\beta_{0}^{3}} \alpha_{2} + \frac{360 \alpha_{2}}{\beta_{0}^{3}} \beta_{1} \beta_{2} - \frac{360 \beta_{1}^{3}}{\beta_{0}^{4}} \alpha_{2} + \frac{20 \alpha_{3}}{\beta_{0}} + \frac{120 \alpha_{3}}{\beta_{0}^{2}} \beta_{1} - \frac{60 \alpha_{3}}{\beta_{0}^{2}} \beta_{2} + \frac{120 \beta_{1}^{2}}{\beta_{0}^{3}} \alpha_{3} - \frac{15 \alpha_{4}}{\beta_{0}} - \frac{30 \alpha_{4}}{\beta_{0}^{2}} \beta_{1} + \frac{6 \alpha_{5}}{\beta_{0}} & \frac{1}{720 \beta_{0}^{5}} \left(10331 \alpha_{0} \beta_{0}^{4} + 135780 \alpha_{0} \beta_{0}^{3} \beta_{1} - 194400 \alpha_{0} \beta_{0}^{3} \beta_{2} + 82800 \alpha_{0} \beta_{0}^{3} \beta_{3} - 10800 \alpha_{0} \beta_{0}^{3} \beta_{4} + 471600 \alpha_{0} \beta_{0}^{2} \beta_{1}^{2} - 561600 \alpha_{0} \beta_{0}^{2} \beta_{1} \beta_{2} + 86400 \alpha_{0} \beta_{0}^{2} \beta_{1} \beta_{3} + 64800 \alpha_{0} \beta_{0}^{2} \beta_{2}^{2} + 604800 \alpha_{0} \beta_{0} \beta_{1}^{3} - 388800 \alpha_{0} \beta_{0} \beta_{1}^{2} \beta_{2} + 259200 \alpha_{0} \beta_{1}^{4} - 36780 \alpha_{1} \beta_{0}^{4} - 255600 \alpha_{1} \beta_{0}^{3} \beta_{1} + 216000 \alpha_{1} \beta_{0}^{3} \beta_{2} - 43200 \alpha_{1} \beta_{0}^{3} \beta_{3} - 475200 \alpha_{1} \beta_{0}^{2} \beta_{1}^{2} + 259200 \alpha_{1} \beta_{0}^{2} \beta_{1} \beta_{2} - 259200 \alpha_{1} \beta_{0} \beta_{1}^{3} + 52200 \alpha_{2} \beta_{0}^{4} + 172800 \alpha_{2} \beta_{0}^{3} \beta_{1} - 64800 \alpha_{2} \beta_{0}^{3} \beta_{2} + 129600 \alpha_{2} \beta_{0}^{2} \beta_{1}^{2} - 36000 \alpha_{3} \beta_{0}^{4} - 43200 \alpha_{3} \beta_{0}^{3} \beta_{1} + 10800 \alpha_{4} \beta_{0}^{4}\right) & - \frac{1}{360 \beta_{0}^{4}} \left(11989 \alpha_{0} \beta_{0}^{3} + 58620 \alpha_{0} \beta_{0}^{2} \beta_{1} - 41400 \alpha_{0} \beta_{0}^{2} \beta_{2} + 7200 \alpha_{0} \beta_{0}^{2} \beta_{3} + 90000 \alpha_{0} \beta_{0} \beta_{1}^{2} - 43200 \alpha_{0} \beta_{0} \beta_{1} \beta_{2} + 43200 \alpha_{0} \beta_{1}^{3} - 28020 \alpha_{1} \beta_{0}^{3} - 68400 \alpha_{1} \beta_{0}^{2} \beta_{1} + 21600 \alpha_{1} \beta_{0}^{2} \beta_{2} - 43200 \alpha_{1} \beta_{0} \beta_{1}^{2} + 23400 \alpha_{2} \beta_{0}^{3} + 21600 \alpha_{2} \beta_{0}^{2} \beta_{1} - 7200 \alpha_{3} \beta_{0}^{3}\right) & \frac{1}{120 \beta_{0}^{3}} \left(3199 \alpha_{0} \beta_{0}^{2} + 6420 \alpha_{0} \beta_{0} \beta_{1} - 1800 \alpha_{0} \beta_{0} \beta_{2} + 3600 \alpha_{0} \beta_{1}^{2} - 4620 \alpha_{1} \beta_{0}^{2} - 3600 \alpha_{1} \beta_{0} \beta_{1} + 1800 \alpha_{2} \beta_{0}^{2}\right) & \frac{1}{\beta_{0}^{2}} \left(- \frac{87 \alpha_{0}}{10} \beta_{0} - 6 \alpha_{0} \beta_{1} + 6 \alpha_{1} \beta_{0}\right) & \frac{\alpha_{0}}{\beta_{0}} & 0\\- \frac{1}{43200 \beta_{0}^{8}} \left(43200 \alpha_{0} \beta_{0}^{6} \beta_{1} - 1019899 \alpha_{0} \beta_{0}^{6} \beta_{2} + 3403402 \alpha_{0} \beta_{0}^{6} \beta_{3} - 3939546 \alpha_{0} \beta_{0}^{6} \beta_{4} + 2029176 \alpha_{0} \beta_{0}^{6} \beta_{5} - 481680 \alpha_{0} \beta_{0}^{6} \beta_{6} + 43200 \alpha_{0} \beta_{0}^{6} \beta_{7} + 5443200 \alpha_{0} \beta_{0}^{5} \beta_{1}^{2} - 48116040 \alpha_{0} \beta_{0}^{5} \beta_{1} \beta_{2} + 59806320 \alpha_{0} \beta_{0}^{5} \beta_{1} \beta_{3} - 30789360 \alpha_{0} \beta_{0}^{5} \beta_{1} \beta_{4} + 7076160 \alpha_{0} \beta_{0}^{5} \beta_{1} \beta_{5} - 604800 \alpha_{0} \beta_{0}^{5} \beta_{1} \beta_{6} + 51987600 \alpha_{0} \beta_{0}^{5} \beta_{2}^{2} - 70912800 \alpha_{0} \beta_{0}^{5} \beta_{2} \beta_{3} + 19202400 \alpha_{0} \beta_{0}^{5} \beta_{2} \beta_{4} - 1814400 \alpha_{0} \beta_{0}^{5} \beta_{2} \beta_{5} + 13104000 \alpha_{0} \beta_{0}^{5} \beta_{3}^{2} - 3024000 \alpha_{0} \beta_{0}^{5} \beta_{3} \beta_{4} + 78019200 \alpha_{0} \beta_{0}^{4} \beta_{1}^{3} - 418294800 \alpha_{0} \beta_{0}^{4} \beta_{1}^{2} \beta_{2} + 252050400 \alpha_{0} \beta_{0}^{4} \beta_{1}^{2} \beta_{3} - 62143200 \alpha_{0} \beta_{0}^{4} \beta_{1}^{2} \beta_{4} + 5443200 \alpha_{0} \beta_{0}^{4} \beta_{1}^{2} \beta_{5} + 408240000 \alpha_{0} \beta_{0}^{4} \beta_{1} \beta_{2}^{2} - 263088000 \alpha_{0} \beta_{0}^{4} \beta_{1} \beta_{2} \beta_{3} + 27216000 \alpha_{0} \beta_{0}^{4} \beta_{1} \beta_{2} \beta_{4} + 18144000 \alpha_{0} \beta_{0}^{4} \beta_{1} \beta_{3}^{2} - 68040000 \alpha_{0} \beta_{0}^{4} \beta_{2}^{3} + 27216000 \alpha_{0} \beta_{0}^{4} \beta_{2}^{2} \beta_{3} + 362880000 \alpha_{0} \beta_{0}^{3} \beta_{1}^{4} - 1264032000 \alpha_{0} \beta_{0}^{3} \beta_{1}^{3} \beta_{2} + 374976000 \alpha_{0} \beta_{0}^{3} \beta_{1}^{3} \beta_{3} - 36288000 \alpha_{0} \beta_{0}^{3} \beta_{1}^{3} \beta_{4} + 870912000 \alpha_{0} \beta_{0}^{3} \beta_{1}^{2} \beta_{2}^{2} - 217728000 \alpha_{0} \beta_{0}^{3} \beta_{1}^{2} \beta_{2} \beta_{3} - 108864000 \alpha_{0} \beta_{0}^{3} \beta_{1} \beta_{2}^{3} + 725760000 \alpha_{0} \beta_{0}^{2} \beta_{1}^{5} - 1542240000 \alpha_{0} \beta_{0}^{2} \beta_{1}^{4} \beta_{2} + 181440000 \alpha_{0} \beta_{0}^{2} \beta_{1}^{4} \beta_{3} + 544320000 \alpha_{0} \beta_{0}^{2} \beta_{1}^{3} \beta_{2}^{2} + 653184000 \alpha_{0} \beta_{0} \beta_{1}^{6} - 653184000 \alpha_{0} \beta_{0} \beta_{1}^{5} \beta_{2} + 217728000 \alpha_{0} \beta_{1}^{7} - 302400 \alpha_{1} \beta_{0}^{6} \beta_{1} + 4339020 \alpha_{1} \beta_{0}^{6} \beta_{2} - 10070760 \alpha_{1} \beta_{0}^{6} \beta_{3} + 8061480 \alpha_{1} \beta_{0}^{6} \beta_{4} - 2630880 \alpha_{1} \beta_{0}^{6} \beta_{5} + 302400 \alpha_{1} \beta_{0}^{6} \beta_{6} - 18748800 \alpha_{1} \beta_{0}^{5} \beta_{1}^{2} + 114055200 \alpha_{1} \beta_{0}^{5} \beta_{1} \beta_{2} - 98481600 \alpha_{1} \beta_{0}^{5} \beta_{1} \beta_{3} + 32356800 \alpha_{1} \beta_{0}^{5} \beta_{1} \beta_{4} - 3628800 \alpha_{1} \beta_{0}^{5} \beta_{1} \beta_{5} - 81648000 \alpha_{1} \beta_{0}^{5} \beta_{2}^{2} + 69552000 \alpha_{1} \beta_{0}^{5} \beta_{2} \beta_{3} - 9072000 \alpha_{1} \beta_{0}^{5} \beta_{2} \beta_{4} - 6048000 \alpha_{1} \beta_{0}^{5} \beta_{3}^{2} - 163296000 \alpha_{1} \beta_{0}^{4} \beta_{1}^{3} + 594216000 \alpha_{1} \beta_{0}^{4} \beta_{1}^{2} \beta_{2} - 226800000 \alpha_{1} \beta_{0}^{4} \beta_{1}^{2} \beta_{3} + 27216000 \alpha_{1} \beta_{0}^{4} \beta_{1}^{2} \beta_{4} - 353808000 \alpha_{1} \beta_{0}^{4} \beta_{1} \beta_{2}^{2} + 108864000 \alpha_{1} \beta_{0}^{4} \beta_{1} \beta_{2} \beta_{3} + 27216000 \alpha_{1} \beta_{0}^{4} \beta_{2}^{3} - 471744000 \alpha_{1} \beta_{0}^{3} \beta_{1}^{4} + 1016064000 \alpha_{1} \beta_{0}^{3} \beta_{1}^{3} \beta_{2} - 145152000 \alpha_{1} \beta_{0}^{3} \beta_{1}^{3} \beta_{3} - 326592000 \alpha_{1} \beta_{0}^{3} \beta_{1}^{2} \beta_{2}^{2} - 544320000 \alpha_{1} \beta_{0}^{2} \beta_{1}^{5} + 544320000 \alpha_{1} \beta_{0}^{2} \beta_{1}^{4} \beta_{2} - 217728000 \alpha_{1} \beta_{0} \beta_{1}^{6} + 907200 \alpha_{2} \beta_{0}^{6} \beta_{1} - 7723800 \alpha_{2} \beta_{0}^{6} \beta_{2} + 11768400 \alpha_{2} \beta_{0}^{6} \beta_{3} - 5821200 \alpha_{2} \beta_{0}^{6} \beta_{4} + 907200 \alpha_{2} \beta_{0}^{6} \beta_{5} + 27216000 \alpha_{2} \beta_{0}^{5} \beta_{1}^{2} - 107352000 \alpha_{2} \beta_{0}^{5} \beta_{1} \beta_{2} + 57456000 \alpha_{2} \beta_{0}^{5} \beta_{1} \beta_{3} - 9072000 \alpha_{2} \beta_{0}^{5} \beta_{1} \beta_{4} + 45360000 \alpha_{2} \beta_{0}^{5} \beta_{2}^{2} - 18144000 \alpha_{2} \beta_{0}^{5} \beta_{2} \beta_{3} + 136080000 \alpha_{2} \beta_{0}^{4} \beta_{1}^{3} - 299376000 \alpha_{2} \beta_{0}^{4} \beta_{1}^{2} \beta_{2} + 54432000 \alpha_{2} \beta_{0}^{4} \beta_{1}^{2} \beta_{3} + 81648000 \alpha_{2} \beta_{0}^{4} \beta_{1} \beta_{2}^{2} + 217728000 \alpha_{2} \beta_{0}^{3} \beta_{1}^{4} - 217728000 \alpha_{2} \beta_{0}^{3} \beta_{1}^{3} \beta_{2} + 108864000 \alpha_{2} \beta_{0}^{2} \beta_{1}^{5} - 1512000 \alpha_{3} \beta_{0}^{6} \beta_{1} + 7308000 \alpha_{3} \beta_{0}^{6} \beta_{2} - 6552000 \alpha_{3} \beta_{0}^{6} \beta_{3} + 1512000 \alpha_{3} \beta_{0}^{6} \beta_{4} - 21168000 \alpha_{3} \beta_{0}^{5} \beta_{1}^{2} + 48384000 \alpha_{3} \beta_{0}^{5} \beta_{1} \beta_{2} - 12096000 \alpha_{3} \beta_{0}^{5} \beta_{1} \beta_{3} - 9072000 \alpha_{3} \beta_{0}^{5} \beta_{2}^{2} - 54432000 \alpha_{3} \beta_{0}^{4} \beta_{1}^{3} + 54432000 \alpha_{3} \beta_{0}^{4} \beta_{1}^{2} \beta_{2} - 36288000 \alpha_{3} \beta_{0}^{3} \beta_{1}^{4} + 1512000 \alpha_{4} \beta_{0}^{6} \beta_{1} - 3780000 \alpha_{4} \beta_{0}^{6} \beta_{2} + 1512000 \alpha_{4} \beta_{0}^{6} \beta_{3} + 9072000 \alpha_{4} \beta_{0}^{5} \beta_{1}^{2} - 9072000 \alpha_{4} \beta_{0}^{5} \beta_{1} \beta_{2} + 9072000 \alpha_{4} \beta_{0}^{4} \beta_{1}^{3} - 907200 \alpha_{5} \beta_{0}^{6} \beta_{1} + 907200 \alpha_{5} \beta_{0}^{6} \beta_{2} - 1814400 \alpha_{5} \beta_{0}^{5} \beta_{1}^{2} + 302400 \alpha_{6} \beta_{0}^{6} \beta_{1} - 43200 \alpha_{7} \beta_{0}^{7}\right) & \frac{1}{720 \beta_{0}^{7}} \left(720 \alpha_{0} \beta_{0}^{6} + 90720 \alpha_{0} \beta_{0}^{5} \beta_{1} - 400967 \alpha_{0} \beta_{0}^{5} \beta_{2} + 498386 \alpha_{0} \beta_{0}^{5} \beta_{3} - 256578 \alpha_{0} \beta_{0}^{5} \beta_{4} + 58968 \alpha_{0} \beta_{0}^{5} \beta_{5} - 5040 \alpha_{0} \beta_{0}^{5} \beta_{6} + 1300320 \alpha_{0} \beta_{0}^{4} \beta_{1}^{2} - 4647720 \alpha_{0} \beta_{0}^{4} \beta_{1} \beta_{2} + 2800560 \alpha_{0} \beta_{0}^{4} \beta_{1} \beta_{3} - 690480 \alpha_{0} \beta_{0}^{4} \beta_{1} \beta_{4} + 60480 \alpha_{0} \beta_{0}^{4} \beta_{1} \beta_{5} + 2268000 \alpha_{0} \beta_{0}^{4} \beta_{2}^{2} - 1461600 \alpha_{0} \beta_{0}^{4} \beta_{2} \beta_{3} + 151200 \alpha_{0} \beta_{0}^{4} \beta_{2} \beta_{4} + 100800 \alpha_{0} \beta_{0}^{4} \beta_{3}^{2} + 6048000 \alpha_{0} \beta_{0}^{3} \beta_{1}^{3} - 15800400 \alpha_{0} \beta_{0}^{3} \beta_{1}^{2} \beta_{2} + 4687200 \alpha_{0} \beta_{0}^{3} \beta_{1}^{2} \beta_{3} - 453600 \alpha_{0} \beta_{0}^{3} \beta_{1}^{2} \beta_{4} + 7257600 \alpha_{0} \beta_{0}^{3} \beta_{1} \beta_{2}^{2} - 1814400 \alpha_{0} \beta_{0}^{3} \beta_{1} \beta_{2} \beta_{3} - 453600 \alpha_{0} \beta_{0}^{3} \beta_{2}^{3} + 12096000 \alpha_{0} \beta_{0}^{2} \beta_{1}^{4} - 20563200 \alpha_{0} \beta_{0}^{2} \beta_{1}^{3} \beta_{2} + 2419200 \alpha_{0} \beta_{0}^{2} \beta_{1}^{3} \beta_{3} + 5443200 \alpha_{0} \beta_{0}^{2} \beta_{1}^{2} \beta_{2}^{2} + 10886400 \alpha_{0} \beta_{0} \beta_{1}^{5} - 9072000 \alpha_{0} \beta_{0} \beta_{1}^{4} \beta_{2} + 3628800 \alpha_{0} \beta_{1}^{6} - 5040 \alpha_{1} \beta_{0}^{6} - 312480 \alpha_{1} \beta_{0}^{5} \beta_{1} + 950460 \alpha_{1} \beta_{0}^{5} \beta_{2} - 820680 \alpha_{1} \beta_{0}^{5} \beta_{3} + 269640 \alpha_{1} \beta_{0}^{5} \beta_{4} - 30240 \alpha_{1} \beta_{0}^{5} \beta_{5} - 2721600 \alpha_{1} \beta_{0}^{4} \beta_{1}^{2} + 6602400 \alpha_{1} \beta_{0}^{4} \beta_{1} \beta_{2} - 2520000 \alpha_{1} \beta_{0}^{4} \beta_{1} \beta_{3} + 302400 \alpha_{1} \beta_{0}^{4} \beta_{1} \beta_{4} - 1965600 \alpha_{1} \beta_{0}^{4} \beta_{2}^{2} + 604800 \alpha_{1} \beta_{0}^{4} \beta_{2} \beta_{3} - 7862400 \alpha_{1} \beta_{0}^{3} \beta_{1}^{3} + 12700800 \alpha_{1} \beta_{0}^{3} \beta_{1}^{2} \beta_{2} - 1814400 \alpha_{1} \beta_{0}^{3} \beta_{1}^{2} \beta_{3} - 2721600 \alpha_{1} \beta_{0}^{3} \beta_{1} \beta_{2}^{2} - 9072000 \alpha_{1} \beta_{0}^{2} \beta_{1}^{4} + 7257600 \alpha_{1} \beta_{0}^{2} \beta_{1}^{3} \beta_{2} - 3628800 \alpha_{1} \beta_{0} \beta_{1}^{5} + 15120 \alpha_{2} \beta_{0}^{6} + 453600 \alpha_{2} \beta_{0}^{5} \beta_{1} - 894600 \alpha_{2} \beta_{0}^{5} \beta_{2} + 478800 \alpha_{2} \beta_{0}^{5} \beta_{3} - 75600 \alpha_{2} \beta_{0}^{5} \beta_{4} + 2268000 \alpha_{2} \beta_{0}^{4} \beta_{1}^{2} - 3326400 \alpha_{2} \beta_{0}^{4} \beta_{1} \beta_{2} + 604800 \alpha_{2} \beta_{0}^{4} \beta_{1} \beta_{3} + 453600 \alpha_{2} \beta_{0}^{4} \beta_{2}^{2} + 3628800 \alpha_{2} \beta_{0}^{3} \beta_{1}^{3} - 2721600 \alpha_{2} \beta_{0}^{3} \beta_{1}^{2} \beta_{2} + 1814400 \alpha_{2} \beta_{0}^{2} \beta_{1}^{4} - 25200 \alpha_{3} \beta_{0}^{6} - 352800 \alpha_{3} \beta_{0}^{5} \beta_{1} + 403200 \alpha_{3} \beta_{0}^{5} \beta_{2} - 100800 \alpha_{3} \beta_{0}^{5} \beta_{3} - 907200 \alpha_{3} \beta_{0}^{4} \beta_{1}^{2} + 604800 \alpha_{3} \beta_{0}^{4} \beta_{1} \beta_{2} - 604800 \alpha_{3} \beta_{0}^{3} \beta_{1}^{3} + 25200 \alpha_{4} \beta_{0}^{6} + 151200 \alpha_{4} \beta_{0}^{5} \beta_{1} - 75600 \alpha_{4} \beta_{0}^{5} \beta_{2} + 151200 \alpha_{4} \beta_{0}^{4} \beta_{1}^{2} - 15120 \alpha_{5} \beta_{0}^{6} - 30240 \alpha_{5} \beta_{0}^{5} \beta_{1} + 5040 \alpha_{6} \beta_{0}^{6}\right) & - \frac{1}{43200 \beta_{0}^{6}} \left(1019899 \alpha_{0} \beta_{0}^{5} + 24058020 \alpha_{0} \beta_{0}^{4} \beta_{1} - 51987600 \alpha_{0} \beta_{0}^{4} \beta_{2} + 35456400 \alpha_{0} \beta_{0}^{4} \beta_{3} - 9601200 \alpha_{0} \beta_{0}^{4} \beta_{4} + 907200 \alpha_{0} \beta_{0}^{4} \beta_{5} + 139431600 \alpha_{0} \beta_{0}^{3} \beta_{1}^{2} - 272160000 \alpha_{0} \beta_{0}^{3} \beta_{1} \beta_{2} + 87696000 \alpha_{0} \beta_{0}^{3} \beta_{1} \beta_{3} - 9072000 \alpha_{0} \beta_{0}^{3} \beta_{1} \beta_{4} + 68040000 \alpha_{0} \beta_{0}^{3} \beta_{2}^{2} - 18144000 \alpha_{0} \beta_{0}^{3} \beta_{2} \beta_{3} + 316008000 \alpha_{0} \beta_{0}^{2} \beta_{1}^{3} - 435456000 \alpha_{0} \beta_{0}^{2} \beta_{1}^{2} \beta_{2} + 54432000 \alpha_{0} \beta_{0}^{2} \beta_{1}^{2} \beta_{3} + 81648000 \alpha_{0} \beta_{0}^{2} \beta_{1} \beta_{2}^{2} + 308448000 \alpha_{0} \beta_{0} \beta_{1}^{4} - 217728000 \alpha_{0} \beta_{0} \beta_{1}^{3} \beta_{2} + 108864000 \alpha_{0} \beta_{1}^{5} - 4339020 \alpha_{1} \beta_{0}^{5} - 57027600 \alpha_{1} \beta_{0}^{4} \beta_{1} + 81648000 \alpha_{1} \beta_{0}^{4} \beta_{2} - 34776000 \alpha_{1} \beta_{0}^{4} \beta_{3} + 4536000 \alpha_{1} \beta_{0}^{4} \beta_{4} - 198072000 \alpha_{1} \beta_{0}^{3} \beta_{1}^{2} + 235872000 \alpha_{1} \beta_{0}^{3} \beta_{1} \beta_{2} - 36288000 \alpha_{1} \beta_{0}^{3} \beta_{1} \beta_{3} - 27216000 \alpha_{1} \beta_{0}^{3} \beta_{2}^{2} - 254016000 \alpha_{1} \beta_{0}^{2} \beta_{1}^{3} + 163296000 \alpha_{1} \beta_{0}^{2} \beta_{1}^{2} \beta_{2} - 108864000 \alpha_{1} \beta_{0} \beta_{1}^{4} + 7723800 \alpha_{2} \beta_{0}^{5} + 53676000 \alpha_{2} \beta_{0}^{4} \beta_{1} - 45360000 \alpha_{2} \beta_{0}^{4} \beta_{2} + 9072000 \alpha_{2} \beta_{0}^{4} \beta_{3} + 99792000 \alpha_{2} \beta_{0}^{3} \beta_{1}^{2} - 54432000 \alpha_{2} \beta_{0}^{3} \beta_{1} \beta_{2} + 54432000 \alpha_{2} \beta_{0}^{2} \beta_{1}^{3} - 7308000 \alpha_{3} \beta_{0}^{5} - 24192000 \alpha_{3} \beta_{0}^{4} \beta_{1} + 9072000 \alpha_{3} \beta_{0}^{4} \beta_{2} - 18144000 \alpha_{3} \beta_{0}^{3} \beta_{1}^{2} + 3780000 \alpha_{4} \beta_{0}^{5} + 4536000 \alpha_{4} \beta_{0}^{4} \beta_{1} - 907200 \alpha_{5} \beta_{0}^{5}\right) & \frac{1}{21600 \beta_{0}^{5}} \left(1701701 \alpha_{0} \beta_{0}^{4} + 14951580 \alpha_{0} \beta_{0}^{3} \beta_{1} - 17728200 \alpha_{0} \beta_{0}^{3} \beta_{2} + 6552000 \alpha_{0} \beta_{0}^{3} \beta_{3} - 756000 \alpha_{0} \beta_{0}^{3} \beta_{4} + 42008400 \alpha_{0} \beta_{0}^{2} \beta_{1}^{2} - 43848000 \alpha_{0} \beta_{0}^{2} \beta_{1} \beta_{2} + 6048000 \alpha_{0} \beta_{0}^{2} \beta_{1} \beta_{3} + 4536000 \alpha_{0} \beta_{0}^{2} \beta_{2}^{2} + 46872000 \alpha_{0} \beta_{0} \beta_{1}^{3} - 27216000 \alpha_{0} \beta_{0} \beta_{1}^{2} \beta_{2} + 18144000 \alpha_{0} \beta_{1}^{4} - 5035380 \alpha_{1} \beta_{0}^{4} - 24620400 \alpha_{1} \beta_{0}^{3} \beta_{1} + 17388000 \alpha_{1} \beta_{0}^{3} \beta_{2} - 3024000 \alpha_{1} \beta_{0}^{3} \beta_{3} - 37800000 \alpha_{1} \beta_{0}^{2} \beta_{1}^{2} + 18144000 \alpha_{1} \beta_{0}^{2} \beta_{1} \beta_{2} - 18144000 \alpha_{1} \beta_{0} \beta_{1}^{3} + 5884200 \alpha_{2} \beta_{0}^{4} + 14364000 \alpha_{2} \beta_{0}^{3} \beta_{1} - 4536000 \alpha_{2} \beta_{0}^{3} \beta_{2} + 9072000 \alpha_{2} \beta_{0}^{2} \beta_{1}^{2} - 3276000 \alpha_{3} \beta_{0}^{4} - 3024000 \alpha_{3} \beta_{0}^{3} \beta_{1} + 756000 \alpha_{4} \beta_{0}^{4}\right) & - \frac{1}{7200 \beta_{0}^{4}} \left(656591 \alpha_{0} \beta_{0}^{3} + 2565780 \alpha_{0} \beta_{0}^{2} \beta_{1} - 1600200 \alpha_{0} \beta_{0}^{2} \beta_{2} + 252000 \alpha_{0} \beta_{0}^{2} \beta_{3} + 3452400 \alpha_{0} \beta_{0} \beta_{1}^{2} - 1512000 \alpha_{0} \beta_{0} \beta_{1} \beta_{2} + 1512000 \alpha_{0} \beta_{1}^{3} - 1343580 \alpha_{1} \beta_{0}^{3} - 2696400 \alpha_{1} \beta_{0}^{2} \beta_{1} + 756000 \alpha_{1} \beta_{0}^{2} \beta_{2} - 1512000 \alpha_{1} \beta_{0} \beta_{1}^{2} + 970200 \alpha_{2} \beta_{0}^{3} + 756000 \alpha_{2} \beta_{0}^{2} \beta_{1} - 252000 \alpha_{3} \beta_{0}^{3}\right) & \frac{1}{600 \beta_{0}^{3}} \left(28183 \alpha_{0} \beta_{0}^{2} + 49140 \alpha_{0} \beta_{0} \beta_{1} - 12600 \alpha_{0} \beta_{0} \beta_{2} + 25200 \alpha_{0} \beta_{1}^{2} - 36540 \alpha_{1} \beta_{0}^{2} - 25200 \alpha_{1} \beta_{0} \beta_{1} + 12600 \alpha_{2} \beta_{0}^{2}\right) & \frac{1}{\beta_{0}^{2}} \left(- \frac{223 \alpha_{0}}{20} \beta_{0} - 7 \alpha_{0} \beta_{1} + 7 \alpha_{1} \beta_{0}\right) & \frac{\alpha_{0}}{\beta_{0}}\end{matrix}\right]$$
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Content source: massimo-nocentini/simulation-methods
Similar notebooks: