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

Edit detail for SandBoxExpOfEnd revision 13 of 18

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Editor: Bill Page
Time: 2014/09/20 05:19:28 GMT+0
Note:

changed:
-1 The Main Result
**Sum and product**

changed:
--- specify n
\end{axiom}

Verification of calculations in the paper

  (version date: September 11, 2014)

1 The Main Result

  Explicit expression for the group-polynomial coefficient functions $g_i(r_1,r_2, ...)$
\begin{axiom}

Exponential of endomorphism with minimal polynomial

First define some specialized operations

Collect terms in x with given factor k.

fricas
)set message type off
collect(x,k)== t:=factor(leadingMonomial univariate(numer(x), k::Kernel Expression Integer)) / _ factor(univariate(denom x, k::Kernel Expression Integer)) factor multivariate(numer t,k::Kernel Expression Integer)/ _ factor multivariate(denom t,k::Kernel Expression Integer)
collect(exp(x)/exp(y),exp(x));
There are 3 exposed and 1 unexposed library operations named multivariate having 2 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op multivariate to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation. Cannot find a definition or applicable library operation named multivariate with argument type(s) Factored(SparseUnivariatePolynomial(SparseMultivariatePolynomial(Integer,Kernel(Expression(Integer))))) Kernel(Expression(Integer))
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. FriCAS will attempt to step through and interpret the code.

Choose n items from a list. Returns list of size binomial(#a,n) of lists.

fricas
choose(a,n) ==
  j:=[i for i in 1..n]
  r:=[[a(j(i)) for i in 1..n]]
  k:=n
  while k>0 and j(k)+n-k<#a repeat
    j(k):=j(k)+1
    for i in k..n-1 repeat j(i+1):=j(i)+1
    r:=concat(r,[a(j(i)) for i in 1..n])
    k:=n; while j(k)+n-k>=#a and k>1 repeat k:=k-1
  if binomial(#a,n)~=#r then error "error in choose"
  return r

Sum and product

fricas
sum(x)==reduce(+,x,0)
product(x)==reduce(*,x,1)

Verification of calculations in the paper

(version date: September 11, 2014)

  1. The Main Result

    Explicit expression for the group-polynomial coefficient functions g_i(r_1,r_2, ...)

    fricas
    f(i,j) == sum [ product x for x in choose([r[q]::Expression Integer for q in 1..n|q~=j],n-i-1)]
    groupPolyCoeff(i) == (-1)^(i+n+1)*reduce(+,[exp(r[j])/reduce(*,[r[j]-r[m] for m in 1..n | j~=m])*f(i,j) for j in 1..n])

  2. Polynomial of degree 2
    fricas
    n:=2
    
\label{eq1}2(1)
    fricas
    eq2_1:= m[X]=(x-r[1])*(x-r[2])
    
\label{eq2}{m_{X}}={{{x}^{2}}+{{\left(-{r_{2}}-{r_{1}}\right)}\  x}+{{r_{1}}\ {r_{2}}}}(2)
    fricas
    eq2_2:= exp(X)=g[0]+g[1]*X
    
\label{eq3}{{e}^{X}}={{{g_{1}}\  X}+{g_{0}}}(3)
    fricas
    eq2_3a:= g[0]=groupPolyCoeff(0)
    fricas
    Compiling function choose with type (List(Expression(Integer)),
          Integer) -> List(List(Expression(Integer)))
    fricas
    Compiling function product with type List(Expression(Integer)) -> 
          Expression(Integer)
    fricas
    Compiling function sum with type List(Expression(Integer)) -> 
          Expression(Integer)
    fricas
    Compiling function f with type (NonNegativeInteger,PositiveInteger)
           -> Expression(Integer)
    fricas
    Compiling function groupPolyCoeff with type NonNegativeInteger -> 
          Expression(Integer)
    
\label{eq4}{g_{0}}={{-{{r_{1}}\ {{e}^{r_{2}}}}+{{r_{2}}\ {{e}^{r_{1}}}}}\over{{r_{2}}-{r_{1}}}}(4)
    fricas
    eq2_3b:= g[1]=groupPolyCoeff(1)
    fricas
    Compiling function f with type (PositiveInteger,PositiveInteger) -> 
          Expression(Integer)
    fricas
    Compiling function groupPolyCoeff with type PositiveInteger -> 
          Expression(Integer)
    
\label{eq5}{g_{1}}={{{{e}^{r_{2}}}-{{e}^{r_{1}}}}\over{{r_{2}}-{r_{1}}}}(5)

    Example 2.1

    fricas
    eval(eq2_1,[r[2]=-r[1]])
    
\label{eq6}{m_{X}}={{{x}^{2}}-{{r_{1}}^{2}}}(6)
    fricas
    eq2_4:= eval(eval(eq2_2,[eq2_3a,eq2_3b]),r[2]=-r[1])
    
\label{eq7}{{e}^{X}}={{{{\left(X +{r_{1}}\right)}\ {{e}^{r_{1}}}}+{{\left(- X +{r_{1}}\right)}\ {{e}^{-{r_{1}}}}}}\over{2 \ {r_{1}}}}(7)
    fricas
    htrigs rhs %
    
\label{eq8}{{X \ {\sinh \left({r_{1}}\right)}}+{{r_{1}}\ {\cosh \left({r_{1}}\right)}}}\over{r_{1}}(8)

  3. Polynomial of degree 3
    fricas
    n:=3
    
\label{eq9}3(9)
    fricas
    eq3_1:= m[X]=(x-r[1])*(x-r[2])*(x-r[3])
    
\label{eq10}\begin{array}{@{}l}
\displaystyle
{m_{X}}={
\begin{array}{@{}l}
\displaystyle
{{x}^{3}}+{{\left(-{r_{3}}-{r_{2}}-{r_{1}}\right)}\ {{x}^{2}}}+{{\left({{\left({r_{2}}+{r_{1}}\right)}\ {r_{3}}}+{{r_{1}}\ {r_{2}}}\right)}\  x}- 
\
\
\displaystyle
{{r_{1}}\ {r_{2}}\ {r_{3}}}
(10)
    fricas
    eq3_2:= exp(X)=g[0]+g[1]*X+g[2]*X^2
    
\label{eq11}{{e}^{X}}={{{g_{2}}\ {{X}^{2}}}+{{g_{1}}\  X}+{g_{0}}}(11)
    fricas
    eq3_3a:= g[0]=groupPolyCoeff(0)
    
\label{eq12}\begin{array}{@{}l}
\displaystyle
{g_{0}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({{r_{1}}\ {{r_{2}}^{2}}}-{{{r_{1}}^{2}}\ {r_{2}}}\right)}\ {{e}^{r_{3}}}}+ 
\
\
\displaystyle
{{\left(-{{r_{1}}\ {{r_{3}}^{2}}}+{{{r_{1}}^{2}}\ {r_{3}}}\right)}\ {{e}^{r_{2}}}}+ 
\
\
\displaystyle
{{\left({{r_{2}}\ {{r_{3}}^{2}}}-{{{r_{2}}^{2}}\ {r_{3}}}\right)}\ {{e}^{r_{1}}}}
(12)
    fricas
    eq3_3b:= g[1]=groupPolyCoeff(1)
    
\label{eq13}{g_{1}}={{{{\left(-{{r_{2}}^{2}}+{{r_{1}}^{2}}\right)}\ {{e}^{r_{3}}}}+{{\left({{r_{3}}^{2}}-{{r_{1}}^{2}}\right)}\ {{e}^{r_{2}}}}+{{\left(-{{r_{3}}^{2}}+{{r_{2}}^{2}}\right)}\ {{e}^{r_{1}}}}}\over{{{\left({r_{2}}-{r_{1}}\right)}\ {{r_{3}}^{2}}}+{{\left(-{{r_{2}}^{2}}+{{r_{1}}^{2}}\right)}\ {r_{3}}}+{{r_{1}}\ {{r_{2}}^{2}}}-{{{r_{1}}^{2}}\ {r_{2}}}}}(13)
    fricas
    eq3_3c:= g[2]=groupPolyCoeff(2)
    
\label{eq14}{g_{2}}={{{{\left({r_{2}}-{r_{1}}\right)}\ {{e}^{r_{3}}}}+{{\left(-{r_{3}}+{r_{1}}\right)}\ {{e}^{r_{2}}}}+{{\left({r_{3}}-{r_{2}}\right)}\ {{e}^{r_{1}}}}}\over{{{\left({r_{2}}-{r_{1}}\right)}\ {{r_{3}}^{2}}}+{{\left(-{{r_{2}}^{2}}+{{r_{1}}^{2}}\right)}\ {r_{3}}}+{{r_{1}}\ {{r_{2}}^{2}}}-{{{r_{1}}^{2}}\ {r_{2}}}}}(14)

    Example 3.1

    fricas
    eval(eq3_1,[r[2]=-r[1],r[3]=0])
    
\label{eq15}{m_{X}}={{{x}^{3}}-{{{r_{1}}^{2}}\  x}}(15)
    fricas
    eq3_4:= eval(eval(eq3_2,[eq3_3a,eq3_3b,eq3_3c]),[r[2]=-r[1],r[3]=0])
    
\label{eq16}{{e}^{X}}={{{{\left({{X}^{2}}+{{r_{1}}\  X}\right)}\ {{e}^{r_{1}}}}+{{\left({{X}^{2}}-{{r_{1}}\  X}\right)}\ {{e}^{-{r_{1}}}}}-{2 \ {{X}^{2}}}+{2 \ {{r_{1}}^{2}}}}\over{2 \ {{r_{1}}^{2}}}}(16)
    fricas
    htrigs rhs eq3_4
    
\label{eq17}{{{r_{1}}\  X \ {\sinh \left({r_{1}}\right)}}+{{{X}^{2}}\ {\cosh \left({r_{1}}\right)}}-{{X}^{2}}+{{r_{1}}^{2}}}\over{{r_{1}}^{2}}(17)

    Comment 3.2 (Rescaled enomorphism)

    fricas
    eq3_6:= X' = sinh(r[1])/r[1]*X
    
\label{eq18}X' ={{X \ {\sinh \left({r_{1}}\right)}}\over{r_{1}}}(18)
    fricas
    eq3_7:= γ = cosh(r[1])
    
\label{eq19}�� ={\cosh \left({r_{1}}\right)}(19)
    fricas
    eq3_8:= exp(X) = 1+X'+X'^2/(1+γ)
    
\label{eq20}{{e}^{X}}={{{{\left(X' + 1 \right)}\  ��}+{{X'}^{2}}+ X' + 1}\over{�� + 1}}(20)
    fricas
    test(normalize(rhs eval(eq3_8,[eq3_6,eq3_7]) - rhs eq3_4)=0)
    
\label{eq21} \mbox{\rm true} (21)

    Exercise 3.3

    fricas
    eval(eq3_1,[r[3]=r[2]])
    
\label{eq22}{m_{X}}={{{x}^{3}}+{{\left(-{2 \ {r_{2}}}-{r_{1}}\right)}\ {{x}^{2}}}+{{\left({{r_{2}}^{2}}+{2 \ {r_{1}}\ {r_{2}}}\right)}\  x}-{{r_{1}}\ {{r_{2}}^{2}}}}(22)
    fricas
    eq3_9a:=lhs eq3_3a = limit(rhs eq3_3a,r[3]=r[2])
    
\label{eq23}{g_{0}}={{{{\left({{r_{1}}\ {{r_{2}}^{2}}}+{{\left(-{{r_{1}}^{2}}-{2 \ {r_{1}}}\right)}\ {r_{2}}}+{{r_{1}}^{2}}\right)}\ {{e}^{r_{2}}}}+{{{r_{2}}^{2}}\ {{e}^{r_{1}}}}}\over{{{r_{2}}^{2}}-{2 \ {r_{1}}\ {r_{2}}}+{{r_{1}}^{2}}}}(23)
    fricas
    (numer rhs eq3_9a)/factor(denom rhs eq3_9a)
    
\label{eq24}\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{1 \over{{\left({r_{2}}-{r_{1}}\right)}^{2}}}\ {r_{1}}\ {{r_{2}}^{2}}}+ 
\
\
\displaystyle
{{\left(-{{1 \over{{\left({r_{2}}-{r_{1}}\right)}^{2}}}\ {{r_{1}}^{2}}}-{{2 \over{{\left({r_{2}}-{r_{1}}\right)}^{2}}}\ {r_{1}}}\right)}\ {r_{2}}}+ 
\
\
\displaystyle
{{1 \over{{\left({r_{2}}-{r_{1}}\right)}^{2}}}\ {{r_{1}}^{2}}}
(24)
    fricas
    eq3_9b:=lhs eq3_3b = limit(rhs eq3_3b,r[3]=r[2])
    
\label{eq25}{g_{1}}={{{{\left(-{{r_{2}}^{2}}+{2 \ {r_{2}}}+{{r_{1}}^{2}}\right)}\ {{e}^{r_{2}}}}-{2 \ {r_{2}}\ {{e}^{r_{1}}}}}\over{{{r_{2}}^{2}}-{2 \ {r_{1}}\ {r_{2}}}+{{r_{1}}^{2}}}}(25)
    fricas
    (numer rhs eq3_9b)/factor(denom rhs eq3_9b)
    
\label{eq26}\begin{array}{@{}l}
\displaystyle
{{\left(-{{1 \over{{\left({r_{2}}-{r_{1}}\right)}^{2}}}\ {{r_{2}}^{2}}}+{{2 \over{{\left({r_{2}}-{r_{1}}\right)}^{2}}}\ {r_{2}}}+{{1 \over{{\left({r_{2}}-{r_{1}}\right)}^{2}}}\ {{r_{1}}^{2}}}\right)}\ {{e}^{r_{2}}}}- 
\
\
\displaystyle
{{2 \over{{\left({r_{2}}-{r_{1}}\right)}^{2}}}\ {r_{2}}\ {{e}^{r_{1}}}}
(26)
    fricas
    eq3_9c:=lhs eq3_3c = limit(rhs eq3_3c,r[3]=r[2])
    
\label{eq27}{g_{2}}={{{{\left({r_{2}}-{r_{1}}- 1 \right)}\ {{e}^{r_{2}}}}+{{e}^{r_{1}}}}\over{{{r_{2}}^{2}}-{2 \ {r_{1}}\ {r_{2}}}+{{r_{1}}^{2}}}}(27)
    fricas
    (numer rhs eq3_9c)/factor(denom rhs eq3_9c)
    
\label{eq28}\begin{array}{@{}l}
\displaystyle
{{\left({{1 \over{{\left({r_{2}}-{r_{1}}\right)}^{2}}}\ {r_{2}}}-{{1 \over{{\left({r_{2}}-{r_{1}}\right)}^{2}}}\ {r_{1}}}-{1 \over{{\left({r_{2}}-{r_{1}}\right)}^{2}}}\right)}\ {{e}^{r_{2}}}}+ 
\
\
\displaystyle
{{1 \over{{\left({r_{2}}-{r_{1}}\right)}^{2}}}\ {{e}^{r_{1}}}}
(28)

  4. Polynomial of degree 4
    fricas
    n:=4
    
\label{eq29}4(29)
    fricas
    eq4_1:= m[X]=(x-r[1])*(x-r[2])*(x-r[3])*(x-r[4])
    
\label{eq30}\begin{array}{@{}l}
\displaystyle
{m_{X}}={
\begin{array}{@{}l}
\displaystyle
{{x}^{4}}+{{\left(-{r_{4}}-{r_{3}}-{r_{2}}-{r_{1}}\right)}\ {{x}^{3}}}+ 
\
\
\displaystyle
{{\left({{\left({r_{3}}+{r_{2}}+{r_{1}}\right)}\ {r_{4}}}+{{\left({r_{2}}+{r_{1}}\right)}\ {r_{3}}}+{{r_{1}}\ {r_{2}}}\right)}\ {{x}^{2}}}+ 
\
\
\displaystyle
{{\left({{\left({{\left(-{r_{2}}-{r_{1}}\right)}\ {r_{3}}}-{{r_{1}}\ {r_{2}}}\right)}\ {r_{4}}}-{{r_{1}}\ {r_{2}}\ {r_{3}}}\right)}\  x}+ 
\
\
\displaystyle
{{r_{1}}\ {r_{2}}\ {r_{3}}\ {r_{4}}}
(30)
    fricas
    eq4_2:= g[0]=groupPolyCoeff(0)
    
\label{eq31}\begin{array}{@{}l}
\displaystyle
{g_{0}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{\left(-{{r_{1}}\ {{r_{2}}^{2}}}+{{{r_{1}}^{2}}\ {r_{2}}}\right)}\ {{r_{3}}^{3}}}+ 
\
\
\displaystyle
{{\left({{r_{1}}\ {{r_{2}}^{3}}}-{{{r_{1}}^{3}}\ {r_{2}}}\right)}\ {{r_{3}}^{2}}}+ 
\
\
\displaystyle
{{\left(-{{{r_{1}}^{2}}\ {{r_{2}}^{3}}}+{{{r_{1}}^{3}}\ {{r_{2}}^{2}}}\right)}\ {r_{3}}}
(31)
    fricas
    eq4_3:= g[1]=groupPolyCoeff(1)
    
\label{eq32}\begin{array}{@{}l}
\displaystyle
{g_{1}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{\left({{r_{2}}^{2}}-{{r_{1}}^{2}}\right)}\ {{r_{3}}^{3}}}+ \
\
\displaystyle
{{\left(-{{r_{2}}^{3}}+{{r_{1}}^{3}}\right)}\ {{r_{3}}^{2}}}+{{{r_{1}}^{2}}\ {{r_{2}}^{3}}}- 
\
\
\displaystyle
{{{r_{1}}^{3}}\ {{r_{2}}^{2}}}
(32)
    fricas
    eq4_4:= g[2]=groupPolyCoeff(2)
    
\label{eq33}\begin{array}{@{}l}
\displaystyle
{g_{2}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{\left(-{r_{2}}+{r_{1}}\right)}\ {{r_{3}}^{3}}}+{{\left({{r_{2}}^{3}}-{{r_{1}}^{3}}\right)}\ {r_{3}}}- 
\
\
\displaystyle
{{r_{1}}\ {{r_{2}}^{3}}}+{{{r_{1}}^{3}}\ {r_{2}}}
(33)
    fricas
    eq4_5:= g[3]=groupPolyCoeff(3)
    
\label{eq34}\begin{array}{@{}l}
\displaystyle
{g_{3}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{\left({r_{2}}-{r_{1}}\right)}\ {{r_{3}}^{2}}}+{{\left(-{{r_{2}}^{2}}+{{r_{1}}^{2}}\right)}\ {r_{3}}}+ 
\
\
\displaystyle
{{r_{1}}\ {{r_{2}}^{2}}}-{{{r_{1}}^{2}}\ {r_{2}}}
(34)
  5. m_X(x) \equiv (x^2-r_1^2)\ (x^2-r_2^2)
    fricas
    eq5_1:=eval(eq4_1,[r[3]=-r[1],r[4]=-r[2]])
    
\label{eq35}{m_{X}}={{{x}^{4}}+{{\left(-{{r_{2}}^{2}}-{{r_{1}}^{2}}\right)}\ {{x}^{2}}}+{{{r_{1}}^{2}}\ {{r_{2}}^{2}}}}(35)

    Corollary 5.1

    fricas
    eq5_2:= exp(X)=g[0]+g[1]*X+g[2]*X^2+g[3]*X^3
    
\label{eq36}{{e}^{X}}={{{g_{3}}\ {{X}^{3}}}+{{g_{2}}\ {{X}^{2}}}+{{g_{1}}\  X}+{g_{0}}}(36)
    fricas
    eq5_3a:= eval(eq4_2,[r[3]=-r[1],r[4]=-r[2]])
    
\label{eq37}{g_{0}}={{-{{{r_{1}}^{2}}\ {{e}^{r_{2}}}}+{{{r_{2}}^{2}}\ {{e}^{r_{1}}}}+{{{r_{2}}^{2}}\ {{e}^{-{r_{1}}}}}-{{{r_{1}}^{2}}\ {{e}^{-{r_{2}}}}}}\over{{2 \ {{r_{2}}^{2}}}-{2 \ {{r_{1}}^{2}}}}}(37)
    fricas
    htrigs rhs %
    
\label{eq38}{-{{{r_{1}}^{2}}\ {\cosh \left({r_{2}}\right)}}+{{{r_{2}}^{2}}\ {\cosh \left({r_{1}}\right)}}}\over{{{r_{2}}^{2}}-{{r_{1}}^{2}}}(38)
    fricas
    eq5_3b:= eval(eq4_3,[r[3]=-r[1],r[4]=-r[2]])
    
\label{eq39}{g_{1}}={{-{{{r_{1}}^{3}}\ {{e}^{r_{2}}}}+{{{r_{2}}^{3}}\ {{e}^{r_{1}}}}-{{{r_{2}}^{3}}\ {{e}^{-{r_{1}}}}}+{{{r_{1}}^{3}}\ {{e}^{-{r_{2}}}}}}\over{{2 \ {r_{1}}\ {{r_{2}}^{3}}}-{2 \ {{r_{1}}^{3}}\ {r_{2}}}}}(39)
    fricas
    htrigs rhs %
    
\label{eq40}{-{{{r_{1}}^{3}}\ {\sinh \left({r_{2}}\right)}}+{{{r_{2}}^{3}}\ {\sinh \left({r_{1}}\right)}}}\over{{{r_{1}}\ {{r_{2}}^{3}}}-{{{r_{1}}^{3}}\ {r_{2}}}}(40)
    fricas
    eq5_3c:= eval(eq4_4,[r[3]=-r[1],r[4]=-r[2]])
    
\label{eq41}{g_{2}}={{{{e}^{r_{2}}}-{{e}^{r_{1}}}-{{e}^{-{r_{1}}}}+{{e}^{-{r_{2}}}}}\over{{2 \ {{r_{2}}^{2}}}-{2 \ {{r_{1}}^{2}}}}}(41)
    fricas
    htrigs rhs %
    
\label{eq42}{{\cosh \left({r_{2}}\right)}-{\cosh \left({r_{1}}\right)}}\over{{{r_{2}}^{2}}-{{r_{1}}^{2}}}(42)
    fricas
    eq5_3d:= eval(eq4_5,[r[3]=-r[1],r[4]=-r[2]])
    
\label{eq43}{g_{3}}={{{{r_{1}}\ {{e}^{r_{2}}}}-{{r_{2}}\ {{e}^{r_{1}}}}+{{r_{2}}\ {{e}^{-{r_{1}}}}}-{{r_{1}}\ {{e}^{-{r_{2}}}}}}\over{{2 \ {r_{1}}\ {{r_{2}}^{3}}}-{2 \ {{r_{1}}^{3}}\ {r_{2}}}}}(43)
    fricas
    htrigs rhs %
    
\label{eq44}{{{r_{1}}\ {\sinh \left({r_{2}}\right)}}-{{r_{2}}\ {\sinh \left({r_{1}}\right)}}}\over{{{r_{1}}\ {{r_{2}}^{3}}}-{{{r_{1}}^{3}}\ {r_{2}}}}(44)
    fricas
    eq5_4:= eval(eval(eq5_2,[eq4_2,eq4_3,eq4_4,eq4_5]),[r[3]=-r[1],r[4]=-r[2]])
    
\label{eq45}\begin{array}{@{}l}
\displaystyle
{{e}^{X}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({{r_{1}}\ {{X}^{3}}}+{{r_{1}}\ {r_{2}}\ {{X}^{2}}}-{{{r_{1}}^{3}}\  X}-{{{r_{1}}^{3}}\ {r_{2}}}\right)}\ {{e}^{r_{2}}}}+ 
\
\
\displaystyle
{{\left(-{{r_{2}}\ {{X}^{3}}}-{{r_{1}}\ {r_{2}}\ {{X}^{2}}}+{{{r_{2}}^{3}}\  X}+{{r_{1}}\ {{r_{2}}^{3}}}\right)}\ {{e}^{r_{1}}}}+ 
\
\
\displaystyle
{{\left({{r_{2}}\ {{X}^{3}}}-{{r_{1}}\ {r_{2}}\ {{X}^{2}}}-{{{r_{2}}^{3}}\  X}+{{r_{1}}\ {{r_{2}}^{3}}}\right)}\ {{e}^{-{r_{1}}}}}+ 
\
\
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{{r_{1}}\ {{X}^{3}}}+{{r_{1}}\ {r_{2}}\ {{X}^{2}}}+{{{r_{1}}^{3}}\  X}- 
\
\
\displaystyle
{{{r_{1}}^{3}}\ {r_{2}}}
(45)
    fricas
    htrigs rhs %
    
\label{eq46}{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({{r_{1}}\ {{X}^{3}}}-{{{r_{1}}^{3}}\  X}\right)}\ {\sinh \left({r_{2}}\right)}}+ 
\
\
\displaystyle
{{\left(-{{r_{2}}\ {{X}^{3}}}+{{{r_{2}}^{3}}\  X}\right)}\ {\sinh \left({r_{1}}\right)}}+ 
\
\
\displaystyle
{{\left({{r_{1}}\ {r_{2}}\ {{X}^{2}}}-{{{r_{1}}^{3}}\ {r_{2}}}\right)}\ {\cosh \left({r_{2}}\right)}}+ 
\
\
\displaystyle
{{\left(-{{r_{1}}\ {r_{2}}\ {{X}^{2}}}+{{r_{1}}\ {{r_{2}}^{3}}}\right)}\ {\cosh \left({r_{1}}\right)}}
(46)

    Definition 5.2

    fricas
    eq5_5a:= Y[1] = 1/(2*r[1]^2-r[1]^2-r[2]^2)*(X^3-(r[1]^2+r[2]^2-r[1]^2)*X)
    
\label{eq47}{Y_{1}}={{-{{X}^{3}}+{{{r_{2}}^{2}}\  X}}\over{{{r_{2}}^{2}}-{{r_{1}}^{2}}}}(47)
    fricas
    eq5_5b:= Y[2] = 1/(2*r[2]^2-r[1]^2-r[2]^2)*(X^3-(r[1]^2+r[2]^2-r[2]^2)*X)
    
\label{eq48}{Y_{2}}={{{{X}^{3}}-{{{r_{1}}^{2}}\  X}}\over{{{r_{2}}^{2}}-{{r_{1}}^{2}}}}(48)

    Exercise 5.3

    fricas
    eq5_6a:= X = Y[1]+Y[2]
    
\label{eq49}X ={{Y_{2}}+{Y_{1}}}(49)
    fricas
    test(eval(eq5_6a,[eq5_5a,eq5_5b]))
    
\label{eq50} \mbox{\rm true} (50)
    fricas
    eq5_6b:= eval(Y[1]*Y[2]=0,[eq5_5a,eq5_5b])
    
\label{eq51}{{-{{X}^{6}}+{{\left({{r_{2}}^{2}}+{{r_{1}}^{2}}\right)}\ {{X}^{4}}}-{{{r_{1}}^{2}}\ {{r_{2}}^{2}}\ {{X}^{2}}}}\over{{{r_{2}}^{4}}-{2 \ {{r_{1}}^{2}}\ {{r_{2}}^{2}}}+{{r_{1}}^{4}}}}= 0(51)
    fricas
    eq5_6c:= X^4 = X^4-eval(rhs eq5_1,x=X)
    
\label{eq52}{{X}^{4}}={{{\left({{r_{2}}^{2}}+{{r_{1}}^{2}}\right)}\ {{X}^{2}}}-{{{r_{1}}^{2}}\ {{r_{2}}^{2}}}}(52)
    fricas
    eq5_6d:= X^2*(lhs %)=X^2*(rhs %)
    
\label{eq53}{{X}^{6}}={{{\left({{r_{2}}^{2}}+{{r_{1}}^{2}}\right)}\ {{X}^{4}}}-{{{r_{1}}^{2}}\ {{r_{2}}^{2}}\ {{X}^{2}}}}(53)
    fricas
    test(_rule(lhs eq5_6d,rhs eq5_6d)(lhs eq5_6b)=rhs eq5_6b)
    
\label{eq54} \mbox{\rm true} (54)

    Comment 5.4 (Rescaling)

    fricas
    eq5_7:= sinh(r[1])/r[1]*Y[1]+sinh(r[2])/r[2]*Y[2]
    
\label{eq55}{{{Y_{2}}\ {r_{1}}\ {\sinh \left({r_{2}}\right)}}+{{Y_{1}}\ {r_{2}}\ {\sinh \left({r_{1}}\right)}}}\over{{r_{1}}\ {r_{2}}}(55)
    fricas
    eq5_8a:= [ Y'[1]=sinh(r[1])/r[1]*Y[1], Y'[2]=sinh(r[2])/r[2]*Y[2] ]
    
\label{eq56}\left[{{Y'_{1}}={{{Y_{1}}\ {\sinh \left({r_{1}}\right)}}\over{r_{1}}}}, \:{{Y'_{2}}={{{Y_{2}}\ {\sinh \left({r_{2}}\right)}}\over{r_{2}}}}\right](56)
    fricas
    eq5_8b:= [ γ[1] = cosh(r[1]), γ[2] = cosh(r[2]) ]
    
\label{eq57}\left[{{��_{1}}={\cosh \left({r_{1}}\right)}}, \:{{��_{2}}={\cosh \left({r_{2}}\right)}}\right](57)
    fricas
    eq5_9a:= exp(X) = exp(Y[1])*exp(Y[2])
    
\label{eq58}{{e}^{X}}={{{e}^{Y_{1}}}\ {{e}^{Y_{2}}}}(58)
    fricas
    eval(eq5_9a,[eq5_5a,eq5_5b])
    
\label{eq59}{{e}^{X}}={{{e}^{{-{{X}^{3}}+{{{r_{2}}^{2}}\  X}}\over{{{r_{2}}^{2}}-{{r_{1}}^{2}}}}}\ {{e}^{{{{X}^{3}}-{{{r_{1}}^{2}}\  X}}\over{{{r_{2}}^{2}}-{{r_{1}}^{2}}}}}}(59)
    fricas
    test(lhs % = simplify expand rhs %)
    
\label{eq60} \mbox{\rm true} (60)
    fricas
    eq5_9b:= exp(X) = 1 + Y'[1] +Y'[2] + Y'[1]^2/(1+γ[1]) + Y'[2]^2/(1+γ[2])
    
\label{eq61}\begin{array}{@{}l}
\displaystyle
{{e}^{X}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{\left({Y'_{2}}+{Y'_{1}}+ 1 \right)}\ {��_{1}}}+{Y'_{2}}+{{Y'_{1}}^{2}}+ 
\
\
\displaystyle
{Y'_{1}}+ 1 
(61)
    fricas
    normalize eval(eval(rhs eq5_9b,concat [eq5_8a,eq5_8b]),[eq5_5a,eq5_5b])
    
\label{eq62}{\left(
\begin{array}{@{}l}
\displaystyle
{
\begin{array}{@{}l}
\displaystyle
{\left({
\begin{array}{@{}l}
\displaystyle
{{{r_{1}}^{2}}\ {{X}^{6}}}-{2 \ {{r_{1}}^{4}}\ {{X}^{4}}}+{{\left({{{r_{1}}^{2}}\ {{r_{2}}^{3}}}-{{{r_{1}}^{4}}\ {r_{2}}}\right)}\ {{X}^{3}}}+ 
\
\
\displaystyle
{{{r_{1}}^{6}}\ {{X}^{2}}}+{{\left(-{{{r_{1}}^{4}}\ {{r_{2}}^{3}}}+{{{r_{1}}^{6}}\ {r_{2}}}\right)}\  X}
(62)
    fricas
    _rule(lhs eq5_6d,rhs eq5_6d)(%)
    
\label{eq63}{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({{{r_{1}}^{2}}\ {{X}^{4}}}+{{{r_{1}}^{2}}\ {r_{2}}\ {{X}^{3}}}-{{{r_{1}}^{4}}\ {{X}^{2}}}-{{{r_{1}}^{4}}\ {r_{2}}\  X}\right)}\ {{e}^{r_{1}}}\ {{{e}^{r_{2}}}^{2}}}+ 
\
\
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{{{r_{2}}^{2}}\ {{X}^{4}}}-{{r_{1}}\ {{r_{2}}^{2}}\ {{X}^{3}}}+ 
\
\
\displaystyle
{{{r_{2}}^{4}}\ {{X}^{2}}}+{{r_{1}}\ {{r_{2}}^{4}}\  X}
(63)
    fricas
    _rule(lhs eq5_6c,rhs eq5_6c)(%)
    
\label{eq64}{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({{r_{1}}\ {{X}^{3}}}+{{r_{1}}\ {r_{2}}\ {{X}^{2}}}-{{{r_{1}}^{3}}\  X}-{{{r_{1}}^{3}}\ {r_{2}}}\right)}\ {{e}^{r_{1}}}\ {{{e}^{r_{2}}}^{2}}}+ 
\
\
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{{r_{2}}\ {{X}^{3}}}-{{r_{1}}\ {r_{2}}\ {{X}^{2}}}+ 
\
\
\displaystyle
{{{r_{2}}^{3}}\  X}+{{r_{1}}\ {{r_{2}}^{3}}}
(64)
    fricas
    test(normalize(% - rhs eq5_4) = 0)
    
\label{eq65} \mbox{\rm true} (65)

  6. Multiple roots for polynomial of degree four

    Exercise 6.1

    fricas
    eval(eq4_1,r[4]=r[3])
    
\label{eq66}\begin{array}{@{}l}
\displaystyle
{m_{X}}={
\begin{array}{@{}l}
\displaystyle
{{x}^{4}}+{{\left(-{2 \ {r_{3}}}-{r_{2}}-{r_{1}}\right)}\ {{x}^{3}}}+ 
\
\
\displaystyle
{{\left({{r_{3}}^{2}}+{{\left({2 \ {r_{2}}}+{2 \ {r_{1}}}\right)}\ {r_{3}}}+{{r_{1}}\ {r_{2}}}\right)}\ {{x}^{2}}}+ 
\
\
\displaystyle
{{\left({{\left(-{r_{2}}-{r_{1}}\right)}\ {{r_{3}}^{2}}}-{2 \ {r_{1}}\ {r_{2}}\ {r_{3}}}\right)}\  x}+{{r_{1}}\ {r_{2}}\ {{r_{3}}^{2}}}
(66)
    fricas
    eq6_1a:=lhs eq4_2 = limit(rhs eq4_2,r[4]=r[3])
    
\label{eq67}\begin{array}{@{}l}
\displaystyle
{g_{0}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{\left(-{{r_{1}}\ {{r_{2}}^{2}}}+{{{r_{1}}^{2}}\ {r_{2}}}\right)}\ {{r_{3}}^{3}}}+ 
\
\
\displaystyle
{{\left({{{r_{1}}\ {{r_{2}}^{3}}}+{3 \ {r_{1}}\ {{r_{2}}^{2}}}+{{\left(-{{r_{1}}^{3}}-{3 \ {{r_{1}}^{2}}}\right)}\ {r_{2}}}}\right)}\ {{r_{3}}^{2}}}+ 
\
\
\displaystyle
{{\left({{{\left(-{{r_{1}}^{2}}-{2 \ {r_{1}}}\right)}\ {{r_{2}}^{3}}}+{{{r_{1}}^{3}}\ {{r_{2}}^{2}}}+{2 \ {{r_{1}}^{3}}\ {r_{2}}}}\right)}\ {r_{3}}}+ 
\
\
\displaystyle
{{{r_{1}}^{2}}\ {{r_{2}}^{3}}}-{{{r_{1}}^{3}}\ {{r_{2}}^{2}}}
(67)
    fricas
    collect(rhs(eq6_1a), exp(r[1]))
    
\label{eq68}{{r_{2}}\ {{r_{3}}^{2}}\ {{e}^{r_{1}}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{1}}\right)}^{2}}}(68)
    fricas
    collect(rhs(eq6_1a), exp(r[2]))
    
\label{eq69}-{{{r_{1}}\ {{r_{3}}^{2}}\ {{e}^{r_{2}}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{2}}\right)}^{2}}}}(69)
    fricas
    collect(rhs(eq6_1a), exp(r[3]))
    
\label{eq70}\begin{array}{@{}l}
\displaystyle
-{{\left(
\begin{array}{@{}l}
\displaystyle
{r_{1}}\ {r_{2}}\ {\left({
\begin{array}{@{}l}
\displaystyle
{{r_{3}}^{3}}+{{\left(-{r_{2}}-{r_{1}}- 3 \right)}\ {{r_{3}}^{2}}}+ 
\
\
\displaystyle
{{\left({{\left({r_{1}}+ 2 \right)}\ {r_{2}}}+{2 \ {r_{1}}}\right)}\ {r_{3}}}-{{r_{1}}\ {r_{2}}}
(70)
    fricas
    eq6_1b:=lhs eq4_3 = limit(rhs eq4_3,r[4]=r[3])
    
\label{eq71}\begin{array}{@{}l}
\displaystyle
{g_{1}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{\left({{r_{2}}^{2}}-{{r_{1}}^{2}}\right)}\ {{r_{3}}^{3}}}+ \
\
\displaystyle
{{\left(-{{r_{2}}^{3}}-{3 \ {{r_{2}}^{2}}}+{{r_{1}}^{3}}+{3 \ {{r_{1}}^{2}}}\right)}\ {{r_{3}}^{2}}}+ 
\
\
\displaystyle
{{\left({2 \ {{r_{2}}^{3}}}-{2 \ {{r_{1}}^{3}}}\right)}\ {r_{3}}}+{{{r_{1}}^{2}}\ {{r_{2}}^{3}}}- 
\
\
\displaystyle
{{{r_{1}}^{3}}\ {{r_{2}}^{2}}}
(71)
    fricas
    collect(rhs(eq6_1b), exp(r[1]))
    
\label{eq72}-{{{r_{3}}\ {\left({r_{3}}+{2 \ {r_{2}}}\right)}\ {{e}^{r_{1}}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{1}}\right)}^{2}}}}(72)
    fricas
    collect(rhs(eq6_1b), exp(r[2]))
    
\label{eq73}{{r_{3}}\ {\left({r_{3}}+{2 \ {r_{1}}}\right)}\ {{e}^{r_{2}}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{2}}\right)}^{2}}}(73)
    fricas
    collect(rhs(eq6_1b), exp(r[3]))
    
\label{eq74}{\left({\left({
\begin{array}{@{}l}
\displaystyle
{{\left({r_{2}}+{r_{1}}\right)}\ {{r_{3}}^{3}}}+ 
\
\
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{{r_{2}}^{2}}+{{\left(-{r_{1}}- 3 \right)}\ {r_{2}}}-{{r_{1}}^{2}}- 
\
\
\displaystyle
{3 \ {r_{1}}}
(74)
    fricas
    eq6_1c:=lhs eq4_4 = limit(rhs eq4_4,r[4]=r[3])
    
\label{eq75}\begin{array}{@{}l}
\displaystyle
{g_{2}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{\left(-{r_{2}}+{r_{1}}\right)}\ {{r_{3}}^{3}}}+{{\left({3 \ {r_{2}}}-{3 \ {r_{1}}}\right)}\ {{r_{3}}^{2}}}+ 
\
\
\displaystyle
{{\left({{r_{2}}^{3}}-{{r_{1}}^{3}}\right)}\ {r_{3}}}+{{\left(-{r_{1}}- 1 \right)}\ {{r_{2}}^{3}}}+ 
\
\
\displaystyle
{{{r_{1}}^{3}}\ {r_{2}}}+{{r_{1}}^{3}}
(75)
    fricas
    collect(rhs(eq6_1c), exp(r[1]))
    
\label{eq76}{{\left({2 \ {r_{3}}}+{r_{2}}\right)}\ {{e}^{r_{1}}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{1}}\right)}^{2}}}(76)
    fricas
    collect(rhs(eq6_1c), exp(r[2]))
    
\label{eq77}-{{{\left({2 \ {r_{3}}}+{r_{1}}\right)}\ {{e}^{r_{2}}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{2}}\right)}^{2}}}}(77)
    fricas
    collect(rhs(eq6_1c), exp(r[3]))
    
\label{eq78}\begin{array}{@{}l}
\displaystyle
-{{\left({\left({
\begin{array}{@{}l}
\displaystyle
{{r_{3}}^{3}}-{3 \ {{r_{3}}^{2}}}+ 
\
\
\displaystyle
{{\left(-{{r_{2}}^{2}}-{{r_{1}}\ {r_{2}}}-{{r_{1}}^{2}}\right)}\ {r_{3}}}+ 
\
\
\displaystyle
{{\left({r_{1}}+ 1 \right)}\ {{r_{2}}^{2}}}+{{\left({{r_{1}}^{2}}+{r_{1}}\right)}\ {r_{2}}}+{{r_{1}}^{2}}
(78)
    fricas
    eq6_1d:=lhs eq4_5 = limit(rhs eq4_5,r[4]=r[3])
    
\label{eq79}\begin{array}{@{}l}
\displaystyle
{g_{3}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{\left({r_{2}}-{r_{1}}\right)}\ {{r_{3}}^{2}}}+ 
\
\
\displaystyle
{{\left(-{{r_{2}}^{2}}-{2 \ {r_{2}}}+{{r_{1}}^{2}}+{2 \ {r_{1}}}\right)}\ {r_{3}}}+ 
\
\
\displaystyle
{{\left({r_{1}}+ 1 \right)}\ {{r_{2}}^{2}}}-{{{r_{1}}^{2}}\ {r_{2}}}-{{r_{1}}^{2}}
(79)
    fricas
    collect(rhs(eq6_1d), exp(r[1]))
    
\label{eq80}-{{{e}^{r_{1}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{1}}\right)}^{2}}}}(80)
    fricas
    collect(rhs(eq6_1d), exp(r[2]))
    
\label{eq81}{{e}^{r_{2}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{2}}\right)}^{2}}}(81)
    fricas
    collect(rhs(eq6_1d), exp(r[3]))
    
\label{eq82}{{\left({{r_{3}}^{2}}+{{\left(-{r_{2}}-{r_{1}}- 2 \right)}\ {r_{3}}}+{{\left({r_{1}}+ 1 \right)}\ {r_{2}}}+{r_{1}}\right)}\ {{e}^{r_{3}}}}\over{{{\left({r_{3}}-{r_{2}}\right)}^{2}}\ {{\left({r_{3}}-{r_{1}}\right)}^{2}}}(82)

    Exercise 6.3 (Double root)

    fricas
    eval(eq4_1,[r[3]=r[1],r[4]=r[2]])
    
\label{eq83}\begin{array}{@{}l}
\displaystyle
{m_{X}}={
\begin{array}{@{}l}
\displaystyle
{{x}^{4}}+{{\left(-{2 \ {r_{2}}}-{2 \ {r_{1}}}\right)}\ {{x}^{3}}}+{{\left({{r_{2}}^{2}}+{4 \ {r_{1}}\ {r_{2}}}+{{r_{1}}^{2}}\right)}\ {{x}^{2}}}+ 
\
\
\displaystyle
{{\left(-{2 \ {r_{1}}\ {{r_{2}}^{2}}}-{2 \ {{r_{1}}^{2}}\ {r_{2}}}\right)}\  x}+{{{r_{1}}^{2}}\ {{r_{2}}^{2}}}
(83)
    fricas
    eq6_3a:=lhs eq4_2 = limit(limit(rhs eq4_2,r[3]=r[1]),r[4]=r[2])
    
\label{eq84}\begin{array}{@{}l}
\displaystyle
{g_{0}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left(-{{{r_{1}}^{2}}\ {{r_{2}}^{2}}}+{{\left({{r_{1}}^{3}}+{3 \ {{r_{1}}^{2}}}\right)}\ {r_{2}}}-{{r_{1}}^{3}}\right)}\ {{e}^{r_{2}}}}+ 
\
\
\displaystyle
{{\left({{\left(-{r_{1}}+ 1 \right)}\ {{r_{2}}^{3}}}+{{\left({{r_{1}}^{2}}-{3 \ {r_{1}}}\right)}\ {{r_{2}}^{2}}}\right)}\ {{e}^{r_{1}}}}
(84)
    fricas
    collect(rhs(eq6_3a), exp(r[1]))
    
\label{eq85}-{{{{r_{2}}^{2}}\ {\left({{\left({r_{1}}- 1 \right)}\ {r_{2}}}-{{r_{1}}^{2}}+{3 \ {r_{1}}}\right)}\ {{e}^{r_{1}}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}}(85)
    fricas
    collect(rhs(eq6_3a), exp(r[2]))
    
\label{eq86}-{{{{r_{1}}^{2}}\ {\left({{r_{2}}^{2}}+{{\left(-{r_{1}}- 3 \right)}\ {r_{2}}}+{r_{1}}\right)}\ {{e}^{r_{2}}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}}(86)
    fricas
    eq6_3b:=lhs eq4_3 = limit(limit(rhs eq4_3,r[3]=r[1]),r[4]=r[2])
    
\label{eq87}\begin{array}{@{}l}
\displaystyle
{g_{1}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({2 \ {r_{1}}\ {{r_{2}}^{2}}}+{{\left(-{{r_{1}}^{2}}-{6 \ {r_{1}}}\right)}\ {r_{2}}}-{{r_{1}}^{3}}\right)}\ {{e}^{r_{2}}}}+ 
\
\
\displaystyle
{{\left({{r_{2}}^{3}}+{{r_{1}}\ {{r_{2}}^{2}}}+{{\left(-{2 \ {{r_{1}}^{2}}}+{6 \ {r_{1}}}\right)}\ {r_{2}}}\right)}\ {{e}^{r_{1}}}}
(87)
    fricas
    collect(rhs(eq6_3b), exp(r[1]))
    
\label{eq88}{{r_{2}}\ {\left({{r_{2}}^{2}}+{{r_{1}}\ {r_{2}}}-{2 \ {{r_{1}}^{2}}}+{6 \ {r_{1}}}\right)}\ {{e}^{r_{1}}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}(88)
    fricas
    collect(rhs(eq6_3b), exp(r[2]))
    
\label{eq89}{{r_{1}}\ {\left({2 \ {{r_{2}}^{2}}}+{{\left(-{r_{1}}- 6 \right)}\ {r_{2}}}-{{r_{1}}^{2}}\right)}\ {{e}^{r_{2}}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}(89)
    fricas
    eq6_3c:=lhs eq4_4 = limit(limit(rhs eq4_4,r[3]=r[1]),r[4]=r[2])
    
\label{eq90}\begin{array}{@{}l}
\displaystyle
{g_{2}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left(-{{r_{2}}^{2}}+{{\left(-{r_{1}}+ 3 \right)}\ {r_{2}}}+{2 \ {{r_{1}}^{2}}}+{3 \ {r_{1}}}\right)}\ {{e}^{r_{2}}}}+ 
\
\
\displaystyle
{{\left(-{2 \ {{r_{2}}^{2}}}+{{\left({r_{1}}- 3 \right)}\ {r_{2}}}+{{r_{1}}^{2}}-{3 \ {r_{1}}}\right)}\ {{e}^{r_{1}}}}
(90)
    fricas
    collect(rhs(eq6_3c), exp(r[1]))
    
\label{eq91}-{{{\left({2 \ {{r_{2}}^{2}}}+{{\left(-{r_{1}}+ 3 \right)}\ {r_{2}}}-{{r_{1}}^{2}}+{3 \ {r_{1}}}\right)}\ {{e}^{r_{1}}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}}(91)
    fricas
    collect(rhs(eq6_3c), exp(r[2]))
    
\label{eq92}-{{{\left({{r_{2}}^{2}}+{{\left({r_{1}}- 3 \right)}\ {r_{2}}}-{2 \ {{r_{1}}^{2}}}-{3 \ {r_{1}}}\right)}\ {{e}^{r_{2}}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}}(92)
    fricas
    eq6_3d:=lhs eq4_5 = limit(limit(rhs eq4_5,r[3]=r[1]),r[4]=r[2])
    
\label{eq93}{g_{3}}={{{{\left({r_{2}}-{r_{1}}- 2 \right)}\ {{e}^{r_{2}}}}+{{\left({r_{2}}-{r_{1}}+ 2 \right)}\ {{e}^{r_{1}}}}}\over{{{r_{2}}^{3}}-{3 \ {r_{1}}\ {{r_{2}}^{2}}}+{3 \ {{r_{1}}^{2}}\ {r_{2}}}-{{r_{1}}^{3}}}}(93)
    fricas
    collect(rhs(eq6_3d), exp(r[1]))
    
\label{eq94}{{\left({r_{2}}-{r_{1}}+ 2 \right)}\ {{e}^{r_{1}}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}(94)
    fricas
    collect(rhs(eq6_3d), exp(r[2]))
    
\label{eq95}{{\left({r_{2}}-{r_{1}}- 2 \right)}\ {{e}^{r_{2}}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}(95)

    Exercise 6.4 (Triple root)

    fricas
    eval(eq4_1,[r[3]=r[2],r[4]=r[2]])
    
\label{eq96}\begin{array}{@{}l}
\displaystyle
{m_{X}}={
\begin{array}{@{}l}
\displaystyle
{{x}^{4}}+{{\left(-{3 \ {r_{2}}}-{r_{1}}\right)}\ {{x}^{3}}}+{{\left({3 \ {{r_{2}}^{2}}}+{3 \ {r_{1}}\ {r_{2}}}\right)}\ {{x}^{2}}}+ 
\
\
\displaystyle
{{\left(-{{r_{2}}^{3}}-{3 \ {r_{1}}\ {{r_{2}}^{2}}}\right)}\  x}+{{r_{1}}\ {{r_{2}}^{3}}}
(96)
    fricas
    eq6_4a:=lhs eq4_2 = limit(limit(rhs eq4_2,r[3]=r[2]),r[4]=r[2])
    
\label{eq97}\begin{array}{@{}l}
\displaystyle
{g_{0}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{{r_{1}}\ {{r_{2}}^{4}}}+{{\left({2 \ {{r_{1}}^{2}}}+{4 \ {r_{1}}}\right)}\ {{r_{2}}^{3}}}+ 
\
\
\displaystyle
{{\left(-{{r_{1}}^{3}}-{6 \ {{r_{1}}^{2}}}-{6 \ {r_{1}}}\right)}\ {{r_{2}}^{2}}}+ 
\
\
\displaystyle
{{\left({2 \ {{r_{1}}^{3}}}+{6 \ {{r_{1}}^{2}}}\right)}\ {r_{2}}}-{2 \ {{r_{1}}^{3}}}
(97)
    fricas
    collect(rhs(eq6_4a), exp(r[1]))
    
\label{eq98}{{{r_{2}}^{3}}\ {{e}^{r_{1}}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}(98)
    fricas
    collect(rhs(eq6_4a), exp(r[2]))
    
\label{eq99}\begin{array}{@{}l}
\displaystyle
-{{\left(
\begin{array}{@{}l}
\displaystyle
{r_{1}}\ {\left({
\begin{array}{@{}l}
\displaystyle
{{r_{2}}^{4}}+{{\left(-{2 \ {r_{1}}}- 4 \right)}\ {{r_{2}}^{3}}}+ 
\
\
\displaystyle
{{\left({{r_{1}}^{2}}+{6 \ {r_{1}}}+ 6 \right)}\ {{r_{2}}^{2}}}+ 
\
\
\displaystyle
{{\left(-{2 \ {{r_{1}}^{2}}}-{6 \ {r_{1}}}\right)}\ {r_{2}}}+{2 \ {{r_{1}}^{2}}}
(99)
    fricas
    eq6_4b:=lhs eq4_3 = limit(limit(rhs eq4_3,r[3]=r[2]),r[4]=r[2])
    
\label{eq100}\begin{array}{@{}l}
\displaystyle
{g_{1}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
{{r_{2}}^{4}}-{4 \ {{r_{2}}^{3}}}+{{\left(-{3 \ {{r_{1}}^{2}}}+ 6 \right)}\ {{r_{2}}^{2}}}+ 
\
\
\displaystyle
{{\left({2 \ {{r_{1}}^{3}}}+{6 \ {{r_{1}}^{2}}}\right)}\ {r_{2}}}-{2 \ {{r_{1}}^{3}}}
(100)
    fricas
    collect(rhs(eq6_4b), exp(r[1]))
    
\label{eq101}-{{6 \ {{r_{2}}^{2}}\ {{e}^{r_{1}}}}\over{2 \ {{\left({r_{2}}-{r_{1}}\right)}^{3}}}}(101)
    fricas
    collect(rhs(eq6_4b), exp(r[2]))
    
\label{eq102}{\left({\left({
\begin{array}{@{}l}
\displaystyle
{{r_{2}}^{4}}-{4 \ {{r_{2}}^{3}}}+{{\left(-{3 \ {{r_{1}}^{2}}}+ 6 \right)}\ {{r_{2}}^{2}}}+ 
\
\
\displaystyle
{{\left({2 \ {{r_{1}}^{3}}}+{6 \ {{r_{1}}^{2}}}\right)}\ {r_{2}}}-{2 \ {{r_{1}}^{3}}}
(102)
    fricas
    eq6_4c:=lhs eq4_4 = limit(limit(rhs eq4_4,r[3]=r[2]),r[4]=r[2])
    
\label{eq103}\begin{array}{@{}l}
\displaystyle
{g_{2}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{2 \ {{r_{2}}^{3}}}+{{\left({3 \ {r_{1}}}+ 6 \right)}\ {{r_{2}}^{2}}}+ 
\
\
\displaystyle
{{\left(-{6 \ {r_{1}}}- 6 \right)}\ {r_{2}}}-{{r_{1}}^{3}}
(103)
    fricas
    collect(rhs(eq6_4c), exp(r[1]))
    
\label{eq104}{6 \ {r_{2}}\ {{e}^{r_{1}}}}\over{2 \ {{\left({r_{2}}-{r_{1}}\right)}^{3}}}(104)
    fricas
    collect(rhs(eq6_4c), exp(r[2]))
    
\label{eq105}-{{{\left({2 \ {{r_{2}}^{3}}}+{{\left(-{3 \ {r_{1}}}- 6 \right)}\ {{r_{2}}^{2}}}+{{\left({6 \ {r_{1}}}+ 6 \right)}\ {r_{2}}}+{{r_{1}}^{3}}\right)}\ {{e}^{r_{2}}}}\over{2 \ {{\left({r_{2}}-{r_{1}}\right)}^{3}}}}(105)
    fricas
    eq6_4d:=lhs eq4_5 = limit(limit(rhs eq4_5,r[3]=r[2]),r[4]=r[2])
    
\label{eq106}{g_{3}}={{{{\left({{r_{2}}^{2}}+{{\left(-{2 \ {r_{1}}}- 2 \right)}\ {r_{2}}}+{{r_{1}}^{2}}+{2 \ {r_{1}}}+ 2 \right)}\ {{e}^{r_{2}}}}-{2 \ {{e}^{r_{1}}}}}\over{{2 \ {{r_{2}}^{3}}}-{6 \ {r_{1}}\ {{r_{2}}^{2}}}+{6 \ {{r_{1}}^{2}}\ {r_{2}}}-{2 \ {{r_{1}}^{3}}}}}(106)
    fricas
    collect(rhs(eq6_4d), exp(r[1]))
    
\label{eq107}-{{{e}^{r_{1}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}}(107)
    fricas
    collect(rhs(eq6_4d), exp(r[2]))
    
\label{eq108}{{\left({{r_{2}}^{2}}+{{\left(-{2 \ {r_{1}}}- 2 \right)}\ {r_{2}}}+{{r_{1}}^{2}}+{2 \ {r_{1}}}+ 2 \right)}\ {{e}^{r_{2}}}}\over{2 \ {{\left({r_{2}}-{r_{1}}\right)}^{3}}}(108)