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

Edit detail for SandBoxExpOfEnd revision 14 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/21 03:01:51 GMT+0
Note: 1D

changed:
-)set message type off
--)set message type off

changed:
-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])
-\end{axiom}
groupPolyCoeff(i) == (-1)^(i+n+1)*sum([exp(r[j])/product([r[j]-r[m] for m in 1..n | j~=m])*f(i,j) for j in 1..n])
n:=1
groupPolyCoeff(0)
\end{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)
Type: Void
fricas
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.
Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))

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
Type: Void

Sum and product

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

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)]
    Type: Void
    fricas
    groupPolyCoeff(i) == (-1)^(i+n+1)*sum([exp(r[j])/product([r[j]-r[m] for m in 1..n | j~=m])*f(i,j) for j in 1..n])
    Type: Void
    fricas
    n:=1
    
\label{eq1}1(1)
    Type: PositiveInteger?
    fricas
    groupPolyCoeff(0)
    fricas
    Compiling function product with type List(Polynomial(Integer)) -> 
          Polynomial(Integer)
    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{eq2}{e}^{r_{1}}(2)
    Type: Expression(Integer)

  2. Polynomial of degree 2
    fricas
    n:=2
    
\label{eq3}2(3)
    Type: PositiveInteger?
    fricas
    eq2_1:= m[X]=(x-r[1])*(x-r[2])
    
\label{eq4}{m_{X}}={{{x}^{2}}+{{\left(-{r_{2}}-{r_{1}}\right)}\  x}+{{r_{1}}\ {r_{2}}}}(4)
    Type: Equation(Polynomial(Integer))
    fricas
    eq2_2:= exp(X)=g[0]+g[1]*X
    
\label{eq5}{{e}^{X}}={{{g_{1}}\  X}+{g_{0}}}(5)
    Type: Equation(Expression(Integer))
    fricas
    eq2_3a:= g[0]=groupPolyCoeff(0)
    
\label{eq6}{g_{0}}={{-{{r_{1}}\ {{e}^{r_{2}}}}+{{r_{2}}\ {{e}^{r_{1}}}}}\over{{r_{2}}-{r_{1}}}}(6)
    Type: Equation(Expression(Integer))
    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{eq7}{g_{1}}={{{{e}^{r_{2}}}-{{e}^{r_{1}}}}\over{{r_{2}}-{r_{1}}}}(7)
    Type: Equation(Expression(Integer))

    Example 2.1

    fricas
    eval(eq2_1,[r[2]=-r[1]])
    
\label{eq8}{m_{X}}={{{x}^{2}}-{{r_{1}}^{2}}}(8)
    Type: Equation(Polynomial(Integer))
    fricas
    eq2_4:= eval(eval(eq2_2,[eq2_3a,eq2_3b]),r[2]=-r[1])
    
\label{eq9}{{e}^{X}}={{{{\left(X +{r_{1}}\right)}\ {{e}^{r_{1}}}}+{{\left(- X +{r_{1}}\right)}\ {{e}^{-{r_{1}}}}}}\over{2 \ {r_{1}}}}(9)
    Type: Equation(Expression(Integer))
    fricas
    htrigs rhs %
    
\label{eq10}{{X \ {\sinh \left({r_{1}}\right)}}+{{r_{1}}\ {\cosh \left({r_{1}}\right)}}}\over{r_{1}}(10)
    Type: Expression(Integer)

  3. Polynomial of degree 3
    fricas
    n:=3
    
\label{eq11}3(11)
    Type: PositiveInteger?
    fricas
    eq3_1:= m[X]=(x-r[1])*(x-r[2])*(x-r[3])
    
\label{eq12}\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}}}
(12)
    Type: Equation(Polynomial(Integer))
    fricas
    eq3_2:= exp(X)=g[0]+g[1]*X+g[2]*X^2
    
\label{eq13}{{e}^{X}}={{{g_{2}}\ {{X}^{2}}}+{{g_{1}}\  X}+{g_{0}}}(13)
    Type: Equation(Expression(Integer))
    fricas
    eq3_3a:= g[0]=groupPolyCoeff(0)
    
\label{eq14}\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}}}}
(14)
    Type: Equation(Expression(Integer))
    fricas
    eq3_3b:= g[1]=groupPolyCoeff(1)
    
\label{eq15}{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}}}}}(15)
    Type: Equation(Expression(Integer))
    fricas
    eq3_3c:= g[2]=groupPolyCoeff(2)
    
\label{eq16}{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}}}}}(16)
    Type: Equation(Expression(Integer))

    Example 3.1

    fricas
    eval(eq3_1,[r[2]=-r[1],r[3]=0])
    
\label{eq17}{m_{X}}={{{x}^{3}}-{{{r_{1}}^{2}}\  x}}(17)
    Type: Equation(Polynomial(Integer))
    fricas
    eq3_4:= eval(eval(eq3_2,[eq3_3a,eq3_3b,eq3_3c]),[r[2]=-r[1],r[3]=0])
    
\label{eq18}{{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}}}}(18)
    Type: Equation(Expression(Integer))
    fricas
    htrigs rhs eq3_4
    
\label{eq19}{{{r_{1}}\  X \ {\sinh \left({r_{1}}\right)}}+{{{X}^{2}}\ {\cosh \left({r_{1}}\right)}}-{{X}^{2}}+{{r_{1}}^{2}}}\over{{r_{1}}^{2}}(19)
    Type: Expression(Integer)

    Comment 3.2 (Rescaled enomorphism)

    fricas
    eq3_6:= X' = sinh(r[1])/r[1]*X
    
\label{eq20}X' ={{X \ {\sinh \left({r_{1}}\right)}}\over{r_{1}}}(20)
    Type: Equation(Expression(Integer))
    fricas
    eq3_7:= γ = cosh(r[1])
    
\label{eq21}�� ={\cosh \left({r_{1}}\right)}(21)
    Type: Equation(Expression(Integer))
    fricas
    eq3_8:= exp(X) = 1+X'+X'^2/(1+γ)
    
\label{eq22}{{e}^{X}}={{{{\left(X' + 1 \right)}\  ��}+{{X'}^{2}}+ X' + 1}\over{�� + 1}}(22)
    Type: Equation(Expression(Integer))
    fricas
    test(normalize(rhs eval(eq3_8,[eq3_6,eq3_7]) - rhs eq3_4)=0)
    
\label{eq23} \mbox{\rm true} (23)
    Type: Boolean

    Exercise 3.3

    fricas
    eval(eq3_1,[r[3]=r[2]])
    
\label{eq24}{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}}}}(24)
    Type: Equation(Polynomial(Integer))
    fricas
    eq3_9a:=lhs eq3_3a = limit(rhs eq3_3a,r[3]=r[2])
    
\label{eq25}{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}}}}(25)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    (numer rhs eq3_9a)/factor(denom rhs eq3_9a)
    
\label{eq26}\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}}}
(26)
    Type: SparseMultivariatePolynomial?(Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer))))),Kernel(Expression(Integer)))
    fricas
    eq3_9b:=lhs eq3_3b = limit(rhs eq3_3b,r[3]=r[2])
    
\label{eq27}{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}}}}(27)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    (numer rhs eq3_9b)/factor(denom rhs eq3_9b)
    
\label{eq28}\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}}}}
(28)
    Type: SparseMultivariatePolynomial?(Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer))))),Kernel(Expression(Integer)))
    fricas
    eq3_9c:=lhs eq3_3c = limit(rhs eq3_3c,r[3]=r[2])
    
\label{eq29}{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}}}}(29)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    (numer rhs eq3_9c)/factor(denom rhs eq3_9c)
    
\label{eq30}\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}}}}
(30)
    Type: SparseMultivariatePolynomial?(Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer))))),Kernel(Expression(Integer)))

  4. Polynomial of degree 4
    fricas
    n:=4
    
\label{eq31}4(31)
    Type: PositiveInteger?
    fricas
    eq4_1:= m[X]=(x-r[1])*(x-r[2])*(x-r[3])*(x-r[4])
    
\label{eq32}\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}}}
(32)
    Type: Equation(Polynomial(Integer))
    fricas
    eq4_2:= g[0]=groupPolyCoeff(0)
    
\label{eq33}\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}}}
(33)
    Type: Equation(Expression(Integer))
    fricas
    eq4_3:= g[1]=groupPolyCoeff(1)
    
\label{eq34}\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}}}
(34)
    Type: Equation(Expression(Integer))
    fricas
    eq4_4:= g[2]=groupPolyCoeff(2)
    
\label{eq35}\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}}}
(35)
    Type: Equation(Expression(Integer))
    fricas
    eq4_5:= g[3]=groupPolyCoeff(3)
    
\label{eq36}\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}}}
(36)
    Type: Equation(Expression(Integer))
  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{eq37}{m_{X}}={{{x}^{4}}+{{\left(-{{r_{2}}^{2}}-{{r_{1}}^{2}}\right)}\ {{x}^{2}}}+{{{r_{1}}^{2}}\ {{r_{2}}^{2}}}}(37)
    Type: Equation(Polynomial(Integer))

    Corollary 5.1

    fricas
    eq5_2:= exp(X)=g[0]+g[1]*X+g[2]*X^2+g[3]*X^3
    
\label{eq38}{{e}^{X}}={{{g_{3}}\ {{X}^{3}}}+{{g_{2}}\ {{X}^{2}}}+{{g_{1}}\  X}+{g_{0}}}(38)
    Type: Equation(Expression(Integer))
    fricas
    eq5_3a:= eval(eq4_2,[r[3]=-r[1],r[4]=-r[2]])
    
\label{eq39}{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}}}}}(39)
    Type: Equation(Expression(Integer))
    fricas
    htrigs rhs %
    
\label{eq40}{-{{{r_{1}}^{2}}\ {\cosh \left({r_{2}}\right)}}+{{{r_{2}}^{2}}\ {\cosh \left({r_{1}}\right)}}}\over{{{r_{2}}^{2}}-{{r_{1}}^{2}}}(40)
    Type: Expression(Integer)
    fricas
    eq5_3b:= eval(eq4_3,[r[3]=-r[1],r[4]=-r[2]])
    
\label{eq41}{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}}}}}(41)
    Type: Equation(Expression(Integer))
    fricas
    htrigs rhs %
    
\label{eq42}{-{{{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}}}}(42)
    Type: Expression(Integer)
    fricas
    eq5_3c:= eval(eq4_4,[r[3]=-r[1],r[4]=-r[2]])
    
\label{eq43}{g_{2}}={{{{e}^{r_{2}}}-{{e}^{r_{1}}}-{{e}^{-{r_{1}}}}+{{e}^{-{r_{2}}}}}\over{{2 \ {{r_{2}}^{2}}}-{2 \ {{r_{1}}^{2}}}}}(43)
    Type: Equation(Expression(Integer))
    fricas
    htrigs rhs %
    
\label{eq44}{{\cosh \left({r_{2}}\right)}-{\cosh \left({r_{1}}\right)}}\over{{{r_{2}}^{2}}-{{r_{1}}^{2}}}(44)
    Type: Expression(Integer)
    fricas
    eq5_3d:= eval(eq4_5,[r[3]=-r[1],r[4]=-r[2]])
    
\label{eq45}{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}}}}}(45)
    Type: Equation(Expression(Integer))
    fricas
    htrigs rhs %
    
\label{eq46}{{{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}}}}(46)
    Type: Expression(Integer)
    fricas
    eq5_4:= eval(eval(eq5_2,[eq4_2,eq4_3,eq4_4,eq4_5]),[r[3]=-r[1],r[4]=-r[2]])
    
\label{eq47}\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}}}
(47)
    Type: Equation(Expression(Integer))
    fricas
    htrigs rhs %
    
\label{eq48}{\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)}}
(48)
    Type: Expression(Integer)

    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{eq49}{Y_{1}}={{-{{X}^{3}}+{{{r_{2}}^{2}}\  X}}\over{{{r_{2}}^{2}}-{{r_{1}}^{2}}}}(49)
    Type: Equation(Fraction(Polynomial(Integer)))
    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{eq50}{Y_{2}}={{{{X}^{3}}-{{{r_{1}}^{2}}\  X}}\over{{{r_{2}}^{2}}-{{r_{1}}^{2}}}}(50)
    Type: Equation(Fraction(Polynomial(Integer)))

    Exercise 5.3

    fricas
    eq5_6a:= X = Y[1]+Y[2]
    
\label{eq51}X ={{Y_{2}}+{Y_{1}}}(51)
    Type: Equation(Polynomial(Integer))
    fricas
    test(eval(eq5_6a,[eq5_5a,eq5_5b]))
    
\label{eq52} \mbox{\rm true} (52)
    Type: Boolean
    fricas
    eq5_6b:= eval(Y[1]*Y[2]=0,[eq5_5a,eq5_5b])
    
\label{eq53}{{-{{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(53)
    Type: Equation(Expression(Integer))
    fricas
    eq5_6c:= X^4 = X^4-eval(rhs eq5_1,x=X)
    
\label{eq54}{{X}^{4}}={{{\left({{r_{2}}^{2}}+{{r_{1}}^{2}}\right)}\ {{X}^{2}}}-{{{r_{1}}^{2}}\ {{r_{2}}^{2}}}}(54)
    Type: Equation(Polynomial(Integer))
    fricas
    eq5_6d:= X^2*(lhs %)=X^2*(rhs %)
    
\label{eq55}{{X}^{6}}={{{\left({{r_{2}}^{2}}+{{r_{1}}^{2}}\right)}\ {{X}^{4}}}-{{{r_{1}}^{2}}\ {{r_{2}}^{2}}\ {{X}^{2}}}}(55)
    Type: Equation(Polynomial(Integer))
    fricas
    test(_rule(lhs eq5_6d,rhs eq5_6d)(lhs eq5_6b)=rhs eq5_6b)
    
\label{eq56} \mbox{\rm true} (56)
    Type: Boolean

    Comment 5.4 (Rescaling)

    fricas
    eq5_7:= sinh(r[1])/r[1]*Y[1]+sinh(r[2])/r[2]*Y[2]
    
\label{eq57}{{{Y_{2}}\ {r_{1}}\ {\sinh \left({r_{2}}\right)}}+{{Y_{1}}\ {r_{2}}\ {\sinh \left({r_{1}}\right)}}}\over{{r_{1}}\ {r_{2}}}(57)
    Type: Expression(Integer)
    fricas
    eq5_8a:= [ Y'[1]=sinh(r[1])/r[1]*Y[1], Y'[2]=sinh(r[2])/r[2]*Y[2] ]
    
\label{eq58}\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](58)
    Type: List(Equation(Expression(Integer)))
    fricas
    eq5_8b:= [ γ[1] = cosh(r[1]), γ[2] = cosh(r[2]) ]
    
\label{eq59}\left[{{��_{1}}={\cosh \left({r_{1}}\right)}}, \:{{��_{2}}={\cosh \left({r_{2}}\right)}}\right](59)
    Type: List(Equation(Expression(Integer)))
    fricas
    eq5_9a:= exp(X) = exp(Y[1])*exp(Y[2])
    
\label{eq60}{{e}^{X}}={{{e}^{Y_{1}}}\ {{e}^{Y_{2}}}}(60)
    Type: Equation(Expression(Integer))
    fricas
    eval(eq5_9a,[eq5_5a,eq5_5b])
    
\label{eq61}{{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}}}}}}(61)
    Type: Equation(Expression(Integer))
    fricas
    test(lhs % = simplify expand rhs %)
    
\label{eq62} \mbox{\rm true} (62)
    Type: Boolean
    fricas
    eq5_9b:= exp(X) = 1 + Y'[1] +Y'[2] + Y'[1]^2/(1+γ[1]) + Y'[2]^2/(1+γ[2])
    
\label{eq63}\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 
(63)
    Type: Equation(Expression(Integer))
    fricas
    normalize eval(eval(rhs eq5_9b,concat [eq5_8a,eq5_8b]),[eq5_5a,eq5_5b])
    
\label{eq64}{\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}
(64)
    Type: Expression(Integer)
    fricas
    _rule(lhs eq5_6d,rhs eq5_6d)(%)
    
\label{eq65}{\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}
(65)
    Type: Expression(Integer)
    fricas
    _rule(lhs eq5_6c,rhs eq5_6c)(%)
    
\label{eq66}{\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}}}
(66)
    Type: Expression(Integer)
    fricas
    test(normalize(% - rhs eq5_4) = 0)
    
\label{eq67} \mbox{\rm true} (67)
    Type: Boolean

  6. Multiple roots for polynomial of degree four

    Exercise 6.1

    fricas
    eval(eq4_1,r[4]=r[3])
    
\label{eq68}\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}}}
(68)
    Type: Equation(Polynomial(Integer))
    fricas
    eq6_1a:=lhs eq4_2 = limit(rhs eq4_2,r[4]=r[3])
    
\label{eq69}\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}}}
(69)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    collect(rhs(eq6_1a), exp(r[1]))
    
\label{eq70}{{r_{2}}\ {{r_{3}}^{2}}\ {{e}^{r_{1}}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{1}}\right)}^{2}}}(70)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_1a), exp(r[2]))
    
\label{eq71}-{{{r_{1}}\ {{r_{3}}^{2}}\ {{e}^{r_{2}}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{2}}\right)}^{2}}}}(71)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_1a), exp(r[3]))
    
\label{eq72}\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}}}
(72)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    eq6_1b:=lhs eq4_3 = limit(rhs eq4_3,r[4]=r[3])
    
\label{eq73}\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}}}
(73)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    collect(rhs(eq6_1b), exp(r[1]))
    
\label{eq74}-{{{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}}}}(74)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_1b), exp(r[2]))
    
\label{eq75}{{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}}}(75)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_1b), exp(r[3]))
    
\label{eq76}{\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}}}
(76)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    eq6_1c:=lhs eq4_4 = limit(rhs eq4_4,r[4]=r[3])
    
\label{eq77}\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}}
(77)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    collect(rhs(eq6_1c), exp(r[1]))
    
\label{eq78}{{\left({2 \ {r_{3}}}+{r_{2}}\right)}\ {{e}^{r_{1}}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{1}}\right)}^{2}}}(78)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_1c), exp(r[2]))
    
\label{eq79}-{{{\left({2 \ {r_{3}}}+{r_{1}}\right)}\ {{e}^{r_{2}}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{2}}\right)}^{2}}}}(79)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_1c), exp(r[3]))
    
\label{eq80}\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}}
(80)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    eq6_1d:=lhs eq4_5 = limit(rhs eq4_5,r[4]=r[3])
    
\label{eq81}\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}}
(81)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    collect(rhs(eq6_1d), exp(r[1]))
    
\label{eq82}-{{{e}^{r_{1}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{1}}\right)}^{2}}}}(82)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_1d), exp(r[2]))
    
\label{eq83}{{e}^{r_{2}}}\over{{\left({r_{2}}-{r_{1}}\right)}\ {{\left({r_{3}}-{r_{2}}\right)}^{2}}}(83)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_1d), exp(r[3]))
    
\label{eq84}{{\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}}}(84)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))

    Exercise 6.3 (Double root)

    fricas
    eval(eq4_1,[r[3]=r[1],r[4]=r[2]])
    
\label{eq85}\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}}}
(85)
    Type: Equation(Polynomial(Integer))
    fricas
    eq6_3a:=lhs eq4_2 = limit(limit(rhs eq4_2,r[3]=r[1]),r[4]=r[2])
    
\label{eq86}\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}}}}
(86)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    collect(rhs(eq6_3a), exp(r[1]))
    
\label{eq87}-{{{{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}}}(87)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_3a), exp(r[2]))
    
\label{eq88}-{{{{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}}}(88)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    eq6_3b:=lhs eq4_3 = limit(limit(rhs eq4_3,r[3]=r[1]),r[4]=r[2])
    
\label{eq89}\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}}}}
(89)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    collect(rhs(eq6_3b), exp(r[1]))
    
\label{eq90}{{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}}(90)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_3b), exp(r[2]))
    
\label{eq91}{{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}}(91)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    eq6_3c:=lhs eq4_4 = limit(limit(rhs eq4_4,r[3]=r[1]),r[4]=r[2])
    
\label{eq92}\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}}}}
(92)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    collect(rhs(eq6_3c), exp(r[1]))
    
\label{eq93}-{{{\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}}}(93)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_3c), exp(r[2]))
    
\label{eq94}-{{{\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}}}(94)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    eq6_3d:=lhs eq4_5 = limit(limit(rhs eq4_5,r[3]=r[1]),r[4]=r[2])
    
\label{eq95}{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}}}}(95)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    collect(rhs(eq6_3d), exp(r[1]))
    
\label{eq96}{{\left({r_{2}}-{r_{1}}+ 2 \right)}\ {{e}^{r_{1}}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}(96)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_3d), exp(r[2]))
    
\label{eq97}{{\left({r_{2}}-{r_{1}}- 2 \right)}\ {{e}^{r_{2}}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}(97)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))

    Exercise 6.4 (Triple root)

    fricas
    eval(eq4_1,[r[3]=r[2],r[4]=r[2]])
    
\label{eq98}\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}}}
(98)
    Type: Equation(Polynomial(Integer))
    fricas
    eq6_4a:=lhs eq4_2 = limit(limit(rhs eq4_2,r[3]=r[2]),r[4]=r[2])
    
\label{eq99}\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}}}
(99)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    collect(rhs(eq6_4a), exp(r[1]))
    
\label{eq100}{{{r_{2}}^{3}}\ {{e}^{r_{1}}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}(100)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_4a), exp(r[2]))
    
\label{eq101}\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}}}
(101)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    eq6_4b:=lhs eq4_3 = limit(limit(rhs eq4_3,r[3]=r[2]),r[4]=r[2])
    
\label{eq102}\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}}}
(102)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    collect(rhs(eq6_4b), exp(r[1]))
    
\label{eq103}-{{6 \ {{r_{2}}^{2}}\ {{e}^{r_{1}}}}\over{2 \ {{\left({r_{2}}-{r_{1}}\right)}^{3}}}}(103)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_4b), exp(r[2]))
    
\label{eq104}{\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}}}
(104)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    eq6_4c:=lhs eq4_4 = limit(limit(rhs eq4_4,r[3]=r[2]),r[4]=r[2])
    
\label{eq105}\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}}
(105)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    collect(rhs(eq6_4c), exp(r[1]))
    
\label{eq106}{6 \ {r_{2}}\ {{e}^{r_{1}}}}\over{2 \ {{\left({r_{2}}-{r_{1}}\right)}^{3}}}(106)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_4c), exp(r[2]))
    
\label{eq107}-{{{\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}}}}(107)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    eq6_4d:=lhs eq4_5 = limit(limit(rhs eq4_5,r[3]=r[2]),r[4]=r[2])
    
\label{eq108}{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}}}}}(108)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    fricas
    collect(rhs(eq6_4d), exp(r[1]))
    
\label{eq109}-{{{e}^{r_{1}}}\over{{\left({r_{2}}-{r_{1}}\right)}^{3}}}(109)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))
    fricas
    collect(rhs(eq6_4d), exp(r[2]))
    
\label{eq110}{{\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}}}(110)
    Type: Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer)))))