login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBox[Polynomial Sequences: Matrix] revision 7 of 11

1 2 3 4 5 6 7 8 9 10 11
Editor: rrogers
Time: 2018/10/04 13:57:35 GMT+0
Note: Typo

changed:
--- 2/(e^t -1) exp(x*t)
-- 2/(e^t +1) exp(x*t)

fricas
-- Functions to facilitate Transforming Polynomial Generating Functions into 
--- Coefficient arrays.  With some examples
-- These are coefficient arrays (A) and can be rendered into a polynomial list
-- by A*[1,x,x^2,...]^T
-- EGF Validation can always done for f(x,t)
-- By doing a Taylor series expansion indexed by t
-- OGF/Power Series is similiar except the factorial n! in t^n/n! 
-- has to be applied to the polynomial.
-- Little error checking.  Most Functions expect UniPotent of Nilpotent
-- Arrays.
--
-- The base ideas come from generating functions like
-- f(t)*exp(x*g(t))
-- From Roman's "Umbral Calculus" and
-- The Matrices of Pascal and Other Greats
-- Lidia Aceto & Donato Trigiante
-- http://www.academia.edu/22095557/The_Matrices_of_Pascal_and_Other_Greats
-- A, somewhat tedious, introduction to the mathematics is at: -- https://www.dropbox.com/sh/i2f7lehirme848p/AAA3jUgIkLNshPK88HuOR4MJa?dl=0 -- H-generating-9.pdf -- -- --)Clear all FPFI ==> Fraction(Polynomial(Fraction(Integer)))
Type: Void
fricas
--
--
-- Lower strict Jordan
-- When used on the left of variables x it divides by x
-- with 1/x =0
-- When used on the right of the coefficient matrix it shifts
-- the columns to the left by one.
-- Really a horizontal shift of the coefficient array and 
-- Should be applied A*SJ_lower*[x...]^T
--
SJ_lower(dim) ==
        J : Matrix(Polynomial(Fraction(Integer))) := new(dim,dim,0)
        for i in 1..(dim-1) repeat J(i+1,i):=1
        J
Type: Void
fricas
--
--
-- Upper strict Jordan
-- When used on the left of variables x it multiplies by x
-- With last entry 0
-- Whenc used on the right of coefficient matrix it shifts
-- the columns to the right by one.
--
SJ_upper(dim) ==
        J : Matrix(FPFI) := new(dim,dim,0)
        for i in 1..(dim-1) repeat J(i,i+1):=1
        J
Type: Void
fricas
--
--
-- H and Pascals matrix
--
Gen_H(dim) ==
  H : Matrix(FPFI) := new(dim,dim,0)
  for i in 1..(dim-1) repeat H(i+1,i):=i
  H
Type: Void
fricas
--
--
--Generate Pascal Matrices with a scalar (x) coefficient
-- exp(x*H)
--
Gen_Pascal(x,dim) ==
        H : Matrix(FPFI):=x*Gen_H(dim)
        Exp_Matrix(x*H)
Type: Void
fricas
--
--
--H Left handed Psuedo inverse H_PIl
-- H_PIl*H ~ I
-- inverts H except for the last row.
--
Gen_H_PIl(dim) == 
        H_PIl : Matrix(FPFI) := new(dim,dim,0)
        for i in 1..(dim-1) repeat H_PIl(i,i+1):=1/i
        H_PIl
Type: Void
fricas
--
--
-- Calculate Roman's integral equation
-- (exp(x*H)-1)/H
-- Which must be done in proper order
-- Note that in order for the last row
-- to be correct the expansion must be done
-- to dim+1 and then is trimmed to dim.
--
Gen_RI(x,dim) ==
        RI := Gen_Pascal(x,dim+1)
        RI := RI-RI^0
        RI := Gen_H_PIl(dim+1)*RI
        RI := subMatrix(RI,1,dim,1,dim)
        RI
Type: Void
fricas
--
--
-- Matrix exponential limited for now
-- Returns exp(Mat)
--
Exp_Matrix(Mat) ==
        n:=nrows(Mat)
        Mat_ret :Matrix(FPFI) := Mat^0
        for i in 1..(n) repeat Mat_ret := Mat_ret +(Mat^i)/factorial(i)
        Mat_ret
Type: Void
fricas
-- Log of particular matrix
-- Requires A - I be nilpotent and square; 
-- i.e. A is Unipotent/Lower unittriangular
--
Ln_Uni_Matrix(A) ==
        n := nrows(A)
        m := ncols(A)
        if n=m then
                        A1 := A-A^0
                        A_ret : Matrix(FPFI) := new(n,n,0)
                        if (A1^n = A_ret) then
                                        for i in 1..n repeat A_ret:=A_ret+(-A1)^i/i
                                else
                                        output("Ln_nil_matrix entered with bad matrix")
                else
                        output("Ln_nil_matrix entered with non-square matrix")
                        output(A)
        -A_ret
Type: Void
fricas
--
-- (A^B) A a matrix, B either integer or matrix
-- A must be Unipotent
--
Exp_Matrix_AB(A,B) ==
        Exp_Matrix(Ln_Uni_Matrix(A)*B)
Type: Void
fricas
--
-- Find p in P^-1* A* P = J
-- J is really a shift
-- A must be Stricly Lower Triangular 
--
ST_J(A) ==
        n:=nrows(A)
        m:=ncols(A)
        P : Matrix(FPFI) := new(n,n,0)
        if (n=m) and (A^n = P) then
                        P(1,1):=1
                        for i in 1..(n-1) repeat P(1..n,i+1):= A*P(1..n,i)
                else
                        output("Input to ST_H not strictly triangular")
        P
Type: Void
fricas
--
-- Same as ST_H except the equation is P^-1*A *P=H
--
ST_H(A) ==
        n:=nrows(A)
        m:=ncols(A)
        P : Matrix(      FPFI) := new(n,n,0)
        if (n=m) and (A^n = P) then
                        P(1,1):=1
                        for i in 1..(n-1) repeat P(1..n,i+1):= A*P(1..n,i)/(i)
                else
                        output("Input to ST_H not strictly triangular")
        P
Type: Void
fricas
--
--
-- Start of Examples
--
dim:=5

\label{eq1}5(1)
Type: PositiveInteger?
fricas
H:=Gen_H(dim)
fricas
Compiling function Gen_H with type PositiveInteger -> Matrix(
      Fraction(Polynomial(Fraction(Integer))))

\label{eq2}\left[ 
\begin{array}{ccccc}
0 & 0 & 0 & 0 & 0 
\
1 & 0 & 0 & 0 & 0 
\
0 & 2 & 0 & 0 & 0 
\
0 & 0 & 3 & 0 & 0 
\
0 & 0 & 0 & 4 & 0 
(2)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
GP :=Gen_Pascal(1,dim)
fricas
Compiling function Exp_Matrix with type Matrix(Fraction(Polynomial(
      Fraction(Integer)))) -> Matrix(Fraction(Polynomial(Fraction(
      Integer))))
fricas
Compiling function Gen_Pascal with type (PositiveInteger, 
      PositiveInteger) -> Matrix(Fraction(Polynomial(Fraction(Integer))
      ))

\label{eq3}\left[ 
\begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 
\
1 & 1 & 0 & 0 & 0 
\
1 & 2 & 1 & 0 & 0 
\
1 & 3 & 3 & 1 & 0 
\
1 & 4 & 6 & 4 & 1 
(3)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
Id := GP^0

\label{eq4}\left[ 
\begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 
\
0 & 1 & 0 & 0 & 0 
\
0 & 0 & 1 & 0 & 0 
\
0 & 0 & 0 & 1 & 0 
\
0 & 0 & 0 & 0 & 1 
(4)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
-- Enough is enough in taylor stream
fricas
)set streams calculate 4
t := series 't

\label{eq5}t(5)
Type: UnivariatePuiseuxSeries?(Expression(Integer),t,0)
fricas
-- To change a coefficient array to the corresponding polynomial array
XC := matrix[[1],[x],[x^2],[x^3],[x^4]]

\label{eq6}\left[ 
\begin{array}{c}
1 
\
x 
\
{{x}^{2}}
\
{{x}^{3}}
\
{{x}^{4}}
(6)
Type: Matrix(Polynomial(Integer))
fricas
--
--
-- Appell Sequences
-- f(t)*exp(x*t)
--
-- Euler Polynmials from WikiPedia
-- 2/(e^t +1) exp(x*t)
--
Euler_A:=2*((GP+1)^-1)

\label{eq7}\left[ 
\begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 
\
-{1 \over 2}& 1 & 0 & 0 & 0 
\
0 & - 1 & 1 & 0 & 0 
\
{1 \over 4}& 0 & -{3 \over 2}& 1 & 0 
\
0 & 1 & 0 & - 2 & 1 
(7)
Type: SquareMatrix?(5,Fraction(Integer))
fricas
-- Test
Euler_A*XC

\label{eq8}\left[ 
\begin{array}{c}
1 
\
{x -{1 \over 2}}
\
{{{x}^{2}}- x}
\
{{{x}^{3}}-{{3 \over 2}\ {{x}^{2}}}+{1 \over 4}}
\
{{{x}^{4}}-{2 \ {{x}^{3}}}+ x}
(8)
Type: Matrix(Polynomial(Fraction(Integer)))
fricas
--
-- Bernoulli Polynomials from WikiPedia
-- (t/(e^t -1))* exp(x*t)
--
Bern_Wiki_A := Gen_RI(1,dim)^-1
fricas
Compiling function Gen_H_PIl with type PositiveInteger -> Matrix(
      Fraction(Polynomial(Fraction(Integer))))
fricas
Compiling function Gen_RI with type (PositiveInteger, 
      PositiveInteger) -> Matrix(Fraction(Polynomial(Fraction(Integer))
      ))

\label{eq9}\left[ 
\begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 
\
-{1 \over 2}& 1 & 0 & 0 & 0 
\
{1 \over 6}& - 1 & 1 & 0 & 0 
\
0 &{1 \over 2}& -{3 \over 2}& 1 & 0 
\
-{1 \over{30}}& 0 & 1 & - 2 & 1 
(9)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
--
-- Bernoulli of order a from Roman
---- (t/(e^t -1))^a * exp(x*t)
--
Bern_Roman_A := Exp_Matrix_AB(Bern_Wiki_A,-a)
fricas
Compiling function Ln_Uni_Matrix with type Matrix(Fraction(
      Polynomial(Fraction(Integer)))) -> Matrix(Fraction(Polynomial(
      Fraction(Integer))))
fricas
Compiling function Exp_Matrix_AB with type (Matrix(Fraction(
      Polynomial(Fraction(Integer)))), Polynomial(Integer)) -> Matrix(
      Fraction(Polynomial(Fraction(Integer))))

\label{eq10}\left[ 
\begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 
\
{{1 \over 2}\  a}& 1 & 0 & 0 & 0 
\
{{{1 \over 4}\ {{a}^{2}}}+{{1 \over{12}}\  a}}& a & 1 & 0 & 0 \
{{{1 \over 8}\ {{a}^{3}}}+{{1 \over 8}\ {{a}^{2}}}}&{{{3 \over 4}\ {{a}^{2}}}+{{1 \over 4}\  a}}&{{3 \over 2}\  a}& 1 & 0 
\
{{{1 \over{16}}\ {{a}^{4}}}+{{1 \over 8}\ {{a}^{3}}}+{{1 \over{4
8}}\ {{a}^{2}}}-{{1 \over{120}}\  a}}&{{{1 \over 2}\ {{a}^{3}}}+{{1 \over 2}\ {{a}^{2}}}}&{{{3 \over 2}\ {{a}^{2}}}+{{1 \over 2}\  a}}&{2 \  a}& 1 
(10)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
--
-- Hermite Polynomials wiki version
--exp(x*t-(t^2)/2) *exp(x*t)
--
Herm_Wiki_A := Exp_Matrix(-H^2/2)

\label{eq11}\left[ 
\begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 
\
0 & 1 & 0 & 0 & 0 
\
- 1 & 0 & 1 & 0 & 0 
\
0 & - 3 & 0 & 1 & 0 
\
3 & 0 & - 6 & 0 & 1 
(11)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
--
Herm_Roman_A := Exp_Matrix(-v*H^2/2)

\label{eq12}\left[ 
\begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 
\
0 & 1 & 0 & 0 & 0 
\
- v & 0 & 1 & 0 & 0 
\
0 & -{3 \  v}& 0 & 1 & 0 
\
{3 \ {{v}^{2}}}& 0 & -{6 \  v}& 0 & 1 
(12)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
-- Hermite/Gould Hopper of order 3
-- exp(x*t+y*t^3)
HGH_A := Exp_Matrix(y*H^3)

\label{eq13}\left[ 
\begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 
\
0 & 1 & 0 & 0 & 0 
\
0 & 0 & 1 & 0 & 0 
\
{6 \  y}& 0 & 0 & 1 & 0 
\
0 &{{24}\  y}& 0 & 0 & 1 
(13)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
--
--
-- Associated Sequences requires Jordan transform
-- exp(x*f(t)) -> SJ_H(f(H))
--
-- Lower Factorial Exponential
-- Roman PP 57
-- exp(x*Ln(t+1)
--
Lower_Fact_Exp_A := ST_H(Ln_Uni_Matrix(H+1))
fricas
Compiling function Ln_Uni_Matrix with type SquareMatrix(5,Integer)
       -> Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
Compiling function ST_H with type Matrix(Fraction(Polynomial(
      Fraction(Integer)))) -> Matrix(Fraction(Polynomial(Fraction(
      Integer))))

\label{eq14}\left[ 
\begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 
\
0 & 1 & 0 & 0 & 0 
\
0 & - 1 & 1 & 0 & 0 
\
0 & 2 & - 3 & 1 & 0 
\
0 & - 6 &{11}& - 6 & 1 
(14)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
-- Just to verify
x:='x;
Type: Variable(x)
fricas
1

\label{eq15}1(15)
Type: PositiveInteger?
fricas
x

\label{eq16}x(16)
Type: Variable(x)
fricas
x*(x-1)

\label{eq17}{{x}^{2}}- x(17)
Type: Polynomial(Integer)
fricas
x*(x-1)*(x-2)

\label{eq18}{{x}^{3}}-{3 \ {{x}^{2}}}+{2 \  x}(18)
Type: Polynomial(Integer)
fricas
x*(x-1)*(x-2)*(x-3)

\label{eq19}{{x}^{4}}-{6 \ {{x}^{3}}}+{{11}\ {{x}^{2}}}-{6 \  x}(19)
Type: Polynomial(Integer)
fricas
--
--  Exponential Polynomials 
-- Roman PP 64
-- Also http://mathworld.wolfram.com/BellPolynomial.html
-- exp(x*(exp(t)-1))
--
Exp_A := ST_H(GP-1)
fricas
Compiling function ST_H with type SquareMatrix(5,Integer) -> Matrix(
      Fraction(Polynomial(Fraction(Integer))))

\label{eq20}\left[ 
\begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 
\
0 & 1 & 0 & 0 & 0 
\
0 & 1 & 1 & 0 & 0 
\
0 & 1 & 3 & 1 & 0 
\
0 & 1 & 7 & 6 & 1 
(20)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
--
-- 
-

\label{eq21}-(21)
Type: Variable(-)
fricas
-- Scheffer Sequences require Jordan form
--
-- g(t)*exp(x*f(t)) ->g(H)*ST_H(f(H))
-- 
-- Laguerre Polynomials Roman PP 110
-- (1-t)^(-a-1)*exp(x*(t/(t-1)))
Lag_A  := Exp_Matrix_AB(1-H,(-a-1))*ST_H(H*(H-1)^-1)
fricas
Compiling function Exp_Matrix_AB with type (SquareMatrix(5,Integer)
      , Polynomial(Integer)) -> Matrix(Fraction(Polynomial(Fraction(
      Integer))))

\label{eq22}\left[ 
\begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 
\
{a + 1}& - 1 & 0 & 0 & 0 
\
{{{a}^{2}}+{3 \  a}+ 2}&{-{2 \  a}- 4}& 1 & 0 & 0 
\
{{{a}^{3}}+{6 \ {{a}^{2}}}+{{11}\  a}+ 6}&{-{3 \ {{a}^{2}}}-{{1
5}\  a}-{18}}&{{3 \  a}+ 9}& - 1 & 0 
\
{{{a}^{4}}+{{10}\ {{a}^{3}}}+{{35}\ {{a}^{2}}}+{{50}\  a}+{24}}&{-{4 \ {{a}^{3}}}-{{36}\ {{a}^{2}}}-{{104}\  a}-{96}}&{{6 \ {{a}^{2}}}+{{42}\  a}+{72}}&{-{4 \  a}-{16}}& 1 
(22)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
-- Checking
Lag_S:=(1-t)^(-a-1)*exp(x*(t/(t-1)));
Type: UnivariatePuiseuxSeries?(Expression(Integer),t,0)
fricas
Lag_S_C3:=6*coefficient(Lag_S,3)

\label{eq23}\begin{array}{@{}l}
\displaystyle
-{{x}^{3}}+{{\left({3 \  a}+ 9 \right)}\ {{x}^{2}}}+{{\left(-{3 \ {{a}^{2}}}-{{15}\  a}-{18}\right)}\  x}+{{a}^{3}}+{6 \ {{a}^{2}}}+ 
\
\
\displaystyle
{{11}\  a}+ 6 
(23)
Type: Expression(Integer)
fricas
Lag_P:=Lag_A*XC

\label{eq24}\left[ 
\begin{array}{c}
1 
\
{- x + a + 1}
\
{{{x}^{2}}+{{\left(-{2 \  a}- 4 \right)}\  x}+{{a}^{2}}+{3 \  a}+ 2}
\
{-{{x}^{3}}+{{\left({3 \  a}+ 9 \right)}\ {{x}^{2}}}+{{\left(-{3 \ {{a}^{2}}}-{{15}\  a}-{18}\right)}\  x}+{{a}^{3}}+{6 \ {{a}^{2}}}+{{11}\  a}+ 6}
\
{{{x}^{4}}+{{\left(-{4 \  a}-{16}\right)}\ {{x}^{3}}}+{{\left({6 \ {{a}^{2}}}+{{42}\  a}+{72}\right)}\ {{x}^{2}}}+{{\left(-{4 \ {{a}^{3}}}-{{36}\ {{a}^{2}}}-{{104}\  a}-{96}\right)}\  x}+{{a}^{4}}+{{10}\ {{a}^{3}}}+{{35}\ {{a}^{2}}}+{{50}\  a}+{24}}
(24)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
Lag_P(4,1)-Lag_S_C3

\label{eq25}0(25)
Type: Expression(Integer)
fricas
-- Note the "series" give "Power Series" to get the
-- Taylor series one has to multiply by factorial(n)
--
-- You might want to comment this out; it has a lot of terms at the end. -- Meixner Polynomials -- Acuctually this is interesting since it is -- Listed as Scheffer (which is Exponential) -- but I think Ordinary OGF is a better choice -- Anyhow here is a slight reformat from Roman t := series 't

\label{eq26}t(26)
Type: UnivariatePuiseuxSeries?(Expression(Integer),t,0)
fricas
Meix_Series_R :=((1-t*d)*((1-t)^-1))^x*(1-t)^(-b)

\label{eq27}\begin{array}{@{}l}
\displaystyle
1 +{{\left({{\left(- d + 1 \right)}\  x}+ b \right)}\  t}+ 
\
\
\displaystyle
{{{{{\left({{d}^{2}}-{2 \  d}+ 1 \right)}\ {{x}^{2}}}+{{\left(-{{d}^{2}}-{2 \  b \  d}+{2 \  b}+ 1 \right)}\  x}+{{b}^{2}}+ b}\over 2}\ {{t}^{2}}}+ 
\
\
\displaystyle
{{{\left(
\begin{array}{@{}l}
\displaystyle
{{\left(-{{d}^{3}}+{3 \ {{d}^{2}}}-{3 \  d}+ 1 \right)}\ {{x}^{3}}}+ 
\
\
\displaystyle
{{\left({3 \ {{d}^{3}}}+{{\left({3 \  b}- 3 \right)}\ {{d}^{2}}}+{{\left(-{6 \  b}- 3 \right)}\  d}+{3 \  b}+ 3 \right)}\ {{x}^{2}}}+ 
\
\
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{2 \ {{d}^{3}}}-{3 \  b \ {{d}^{2}}}+{{\left(-{3 \ {{b}^{2}}}-{3 \  b}\right)}\  d}+ 
\
\
\displaystyle
{3 \ {{b}^{2}}}+{6 \  b}+ 2 
(27)
Type: UnivariatePuiseuxSeries?(Expression(Integer),t,0)
fricas
-- and the Sheffer form
-- We need the Jordan form of Ln_Uni_Matrix((1-H*d)*(1-H)^-1)
Meix_A_fJ := ST_H(Ln_Uni_Matrix((1-H*d)*(1-H)^-1))
fricas
Compiling function Ln_Uni_Matrix with type SquareMatrix(5,Polynomial
      (Fraction(Integer))) -> Matrix(Fraction(Polynomial(Fraction(
      Integer))))

\label{eq28}\left[ 
\begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 
\
0 &{- d + 1}& 0 & 0 & 0 
\
0 &{-{{d}^{2}}+ 1}&{{{d}^{2}}-{2 \  d}+ 1}& 0 & 0 
\
0 &{-{2 \ {{d}^{3}}}+ 2}&{{3 \ {{d}^{3}}}-{3 \ {{d}^{2}}}-{3 \  d}+ 3}&{-{{d}^{3}}+{3 \ {{d}^{2}}}-{3 \  d}+ 1}& 0 
\
0 &{-{6 \ {{d}^{4}}}+ 6}&{{{11}\ {{d}^{4}}}-{8 \ {{d}^{3}}}-{6 \ {{d}^{2}}}-{8 \  d}+{11}}&{-{6 \ {{d}^{4}}}+{{12}\ {{d}^{3}}}-{{12}\  d}+ 6}&{{{d}^{4}}-{4 \ {{d}^{3}}}+{6 \ {{d}^{2}}}-{4 \  d}+ 1}
(28)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
Meix_A := Exp_Matrix_AB(1-H,(-b))*Meix_A_fJ

\label{eq29}\left[ 
\begin{array}{ccccc}
1 & 0 & 0 & 0 & 0 
\
b &{- d + 1}& 0 & 0 & 0 
\
{{{b}^{2}}+ b}&{-{{d}^{2}}-{2 \  b \  d}+{2 \  b}+ 1}&{{{d}^{2}}-{2 \  d}+ 1}& 0 & 0 
\
{{{b}^{3}}+{3 \ {{b}^{2}}}+{2 \  b}}&{-{2 \ {{d}^{3}}}-{3 \  b \ {{d}^{2}}}+{{\left(-{3 \ {{b}^{2}}}-{3 \  b}\right)}\  d}+{3 \ {{b}^{2}}}+{6 \  b}+ 2}&{{3 \ {{d}^{3}}}+{{\left({3 \  b}- 3 \right)}\ {{d}^{2}}}+{{\left(-{6 \  b}- 3 \right)}\  d}+{3 \  b}+ 3}&{-{{d}^{3}}+{3 \ {{d}^{2}}}-{3 \  d}+ 1}& 0 
\
{{{b}^{4}}+{6 \ {{b}^{3}}}+{{11}\ {{b}^{2}}}+{6 \  b}}&{-{6 \ {{d}^{4}}}-{8 \  b \ {{d}^{3}}}+{{\left(-{6 \ {{b}^{2}}}-{6 \  b}\right)}\ {{d}^{2}}}+{{\left(-{4 \ {{b}^{3}}}-{{12}\ {{b}^{2}}}-{8 \  b}\right)}\  d}+{4 \ {{b}^{3}}}+{{18}\ {{b}^{2}}}+{{22}\  b}+ 6}&{{{11}\ {{d}^{4}}}+{{\left({{12}\  b}- 8 \right)}\ {{d}^{3}}}+{{\left({6 \ {{b}^{2}}}-{6 \  b}- 6 \right)}\ {{d}^{2}}}+{{\left(-{{12}\ {{b}^{2}}}-{{24}\  b}- 8 \right)}\  d}+{6 \ {{b}^{2}}}+{{18}\  b}+{11}}&{-{6 \ {{d}^{4}}}+{{\left(-{4 \  b}+{12}\right)}\ {{d}^{3}}}+{{1
2}\  b \ {{d}^{2}}}+{{\left(-{{12}\  b}-{12}\right)}\  d}+{4 \  b}+ 6}&{{{d}^{4}}-{4 \ {{d}^{3}}}+{6 \ {{d}^{2}}}-{4 \  d}+ 1}
(29)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
-- 
-- Let's check
Meix_C3:=6*coefficient(Meix_Series_R,3)

\label{eq30}\begin{array}{@{}l}
\displaystyle
{{\left(-{{d}^{3}}+{3 \ {{d}^{2}}}-{3 \  d}+ 1 \right)}\ {{x}^{3}}}+ 
\
\
\displaystyle
{{\left({3 \ {{d}^{3}}}+{{\left({3 \  b}- 3 \right)}\ {{d}^{2}}}+{{\left(-{6 \  b}- 3 \right)}\  d}+{3 \  b}+ 3 \right)}\ {{x}^{2}}}+ 
\
\
\displaystyle
{{\left(-{2 \ {{d}^{3}}}-{3 \  b \ {{d}^{2}}}+{{\left(-{3 \ {{b}^{2}}}-{3 \  b}\right)}\  d}+{3 \ {{b}^{2}}}+{6 \  b}+ 2 \right)}\  x}+{{b}^{3}}+ 
\
\
\displaystyle
{3 \ {{b}^{2}}}+{2 \  b}
(30)
Type: Expression(Integer)
fricas
Meix_P:=Meix_A*XC

\label{eq31}\left[ 
\begin{array}{c}
1 
\
{{{\left(- d + 1 \right)}\  x}+ b}
\
{{{\left({{d}^{2}}-{2 \  d}+ 1 \right)}\ {{x}^{2}}}+{{\left(-{{d}^{2}}-{2 \  b \  d}+{2 \  b}+ 1 \right)}\  x}+{{b}^{2}}+ b}
\
{{{\left(-{{d}^{3}}+{3 \ {{d}^{2}}}-{3 \  d}+ 1 \right)}\ {{x}^{3}}}+{{\left({3 \ {{d}^{3}}}+{{\left({3 \  b}- 3 \right)}\ {{d}^{2}}}+{{\left(-{6 \  b}- 3 \right)}\  d}+{3 \  b}+ 3 \right)}\ {{x}^{2}}}+{{\left(-{2 \ {{d}^{3}}}-{3 \  b \ {{d}^{2}}}+{{\left(-{3 \ {{b}^{2}}}-{3 \  b}\right)}\  d}+{3 \ {{b}^{2}}}+{6 \  b}+ 2 \right)}\  x}+{{b}^{3}}+{3 \ {{b}^{2}}}+{2 \  b}}
\
{{{\left({{d}^{4}}-{4 \ {{d}^{3}}}+{6 \ {{d}^{2}}}-{4 \  d}+ 1 \right)}\ {{x}^{4}}}+{{\left(-{6 \ {{d}^{4}}}+{{\left(-{4 \  b}+{12}\right)}\ {{d}^{3}}}+{{12}\  b \ {{d}^{2}}}+{{\left(-{{1
2}\  b}-{12}\right)}\  d}+{4 \  b}+ 6 \right)}\ {{x}^{3}}}+{{\left({{1
1}\ {{d}^{4}}}+{{\left({{12}\  b}- 8 \right)}\ {{d}^{3}}}+{{\left({6 \ {{b}^{2}}}-{6 \  b}- 6 \right)}\ {{d}^{2}}}+{{\left(-{{12}\ {{b}^{2}}}-{{24}\  b}- 8 \right)}\  d}+{6 \ {{b}^{2}}}+{{18}\  b}+{11}\right)}\ {{x}^{2}}}+{{\left(-{6 \ {{d}^{4}}}-{8 \  b \ {{d}^{3}}}+{{\left(-{6 \ {{b}^{2}}}-{6 \  b}\right)}\ {{d}^{2}}}+{{\left(-{4 \ {{b}^{3}}}-{{12}\ {{b}^{2}}}-{8 \  b}\right)}\  d}+{4 \ {{b}^{3}}}+{{18}\ {{b}^{2}}}+{{22}\  b}+ 6 \right)}\  x}+{{b}^{4}}+{6 \ {{b}^{3}}}+{{11}\ {{b}^{2}}}+{6 \  b}}
(31)
Type: Matrix(Fraction(Polynomial(Fraction(Integer))))
fricas
Meix_P(4,1)-Meix_C3

\label{eq32}0(32)
Type: Expression(Integer)