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

Edit detail for SandBoxExpOfEnd revision 10 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 02:24:06 GMT+0
Note:

changed:
-eq3_7:= γ = cosh(r1)
eq3_7:= γ = cosh(r[1])

changed:
-eq3_8a:= eval(eq3_8,[eq3_6,eq3_7])
-rhs(eq3_8a)-htrigs rhs(eq3_4)
-normalize %
-normalize(rhs(eq3_8a)-rhs(eq3_4))
-htrigs %
test(normalize(rhs eval(eq3_8,[eq3_6,eq3_7]) - rhs eq3_4)=0)

changed:
-
  Exercise 3.3
\begin{axiom}
eval(eq3_1,[r[3]=r[2]])
eq3_9a:=lhs eq3_3a = limit(rhs eq3_3a,r[3]=r[2])
(numer rhs eq3_9a)/factor(denom rhs eq3_9a)
eq3_9b:=lhs eq3_3b = limit(rhs eq3_3b,r[3]=r[2])
(numer rhs eq3_9b)/factor(denom rhs eq3_9b)
eq3_9c:=lhs eq3_3c = limit(rhs eq3_3c,r[3]=r[2])
(numer rhs eq3_9c)/factor(denom rhs eq3_9c)
\end{axiom}

added:
\end{axiom}
  Corollary 5.1
\begin{axiom}

changed:
-
  Definition 5.2
\begin{axiom}
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)
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)
\end{axiom}
  Exercise 5.3
\begin{axiom}
eq5_6a:= X = Y[1]+Y[2]
test(eval(eq5_6a,[eq5_5a,eq5_5b]))
eq5_6b:= eval(Y[1]*Y[2]=0,[eq5_5a,eq5_5b])
X^4 = X^4-eval(rhs eq5_1,x=X)
test(_rule(X^2*(lhs %),X^2*(rhs %))(lhs eq5_6b)=rhs eq5_6b)
\end{axiom}
  Comment 5.4 (Rescaling)
\begin{axiom}
eq5_7:= sinh(r[1])/r[1]*Y[1]+sinh(r[2])/r[2]*Y[2]
eq5_8a:= [ Y'[1]=sinh(r[1])/r[1]*Y[1], Y'[2]=sinh(r[2])/r[2]*Y[2] ]
eq5_8b:= [ γ[1] = cosh(r[1]), γ[2] = cosh(r[2]) ]
eq5_9:= exp(X) = exp(Y[1])*exp(Y[2])
eval(eq5_9,[eq5_5a,eq5_5b])
test(lhs % = simplify expand rhs %)
\end{axiom}

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

  1. The Main Result
    fricas
    sum(x)==reduce(+,x,0)
    Type: Void
    fricas
    product(x)==reduce(*,x,1)
    Type: Void
    fricas
    -- specify n
    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)*reduce(+,[exp(r[j])/reduce(*,[r[j]-r[m] for m in 1..n | j~=m])*f(i,j) for j in 1..n])
    Type: Void
  2. Polynomial of degree 2
    fricas
    n:=2
    
\label{eq1}2(1)
    Type: PositiveInteger?
    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)
    Type: Equation(Polynomial(Integer))
    fricas
    eq2_2:= exp(X)=g[0]*id+g[1]*X
    
\label{eq3}{{e}^{X}}={{{g_{0}}\  id}+{{g_{1}}\  X}}(3)
    Type: Equation(Expression(Integer))
    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)
    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{eq5}{g_{1}}={{{{e}^{r_{2}}}-{{e}^{r_{1}}}}\over{{r_{2}}-{r_{1}}}}(5)
    Type: Equation(Expression(Integer))

    Example 2.1

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

  3. Polynomial of degree 3
    fricas
    n:=3
    
\label{eq9}3(9)
    Type: PositiveInteger?
    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)
    Type: Equation(Polynomial(Integer))
    fricas
    eq3_2:= exp(X)=g[0]*id+g[1]*X+g[2]*X^2
    
\label{eq11}{{e}^{X}}={{{g_{0}}\  id}+{{g_{2}}\ {{X}^{2}}}+{{g_{1}}\  X}}(11)
    Type: Equation(Expression(Integer))
    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)
    Type: Equation(Expression(Integer))
    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)
    Type: Equation(Expression(Integer))
    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)
    Type: Equation(Expression(Integer))

    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)
    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{eq16}{{e}^{X}}={{{{\left({{X}^{2}}+{{r_{1}}\  X}\right)}\ {{e}^{r_{1}}}}+{{\left({{X}^{2}}-{{r_{1}}\  X}\right)}\ {{e}^{-{r_{1}}}}}+{2 \ {{r_{1}}^{2}}\  id}-{2 \ {{X}^{2}}}}\over{2 \ {{r_{1}}^{2}}}}(16)
    Type: Equation(Expression(Integer))
    fricas
    htrigs rhs eq3_4
    
\label{eq17}{{{r_{1}}\  X \ {\sinh \left({r_{1}}\right)}}+{{{X}^{2}}\ {\cosh \left({r_{1}}\right)}}+{{{r_{1}}^{2}}\  id}-{{X}^{2}}}\over{{r_{1}}^{2}}(17)
    Type: Expression(Integer)

    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)
    Type: Equation(Expression(Integer))
    fricas
    eq3_7:= γ = cosh(r[1])
    
\label{eq19}�� ={\cosh \left({r_{1}}\right)}(19)
    Type: Equation(Expression(Integer))
    fricas
    eq3_8:= exp(X) = id+X'+X'^2/(1+γ)
    
\label{eq20}{{e}^{X}}={{{{\left(id + X' \right)}\  ��}+ id +{{X'}^{2}}+ X'}\over{�� + 1}}(20)
    Type: Equation(Expression(Integer))
    fricas
    test(normalize(rhs eval(eq3_8,[eq3_6,eq3_7]) - rhs eq3_4)=0)
    
\label{eq21} \mbox{\rm true} (21)
    Type: Boolean

    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)
    Type: Equation(Polynomial(Integer))
    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)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    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)
    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{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)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    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)
    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{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)
    Type: Equation(OrderedCompletion?(Expression(Integer)))
    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)
    Type: SparseMultivariatePolynomial?(Fraction(Factored(SparseMultivariatePolynomial?(Integer,Kernel(Expression(Integer))))),Kernel(Expression(Integer)))

  4. Polynomial of degree 4
    fricas
    n:=4
    
\label{eq29}4(29)
    Type: PositiveInteger?
    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)
    Type: Equation(Polynomial(Integer))
    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)
    Type: Equation(Expression(Integer))
    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)
    Type: Equation(Expression(Integer))
    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)
    Type: Equation(Expression(Integer))
    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)
    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{eq35}{m_{X}}={{{x}^{4}}+{{\left(-{{r_{2}}^{2}}-{{r_{1}}^{2}}\right)}\ {{x}^{2}}}+{{{r_{1}}^{2}}\ {{r_{2}}^{2}}}}(35)
    Type: Equation(Polynomial(Integer))

    Corollary 5.1

    fricas
    eq5_2:= exp(X)=g[0]*id+g[1]*X+g[2]*X^2+g[3]*X^3
    
\label{eq36}{{e}^{X}}={{{g_{0}}\  id}+{{g_{3}}\ {{X}^{3}}}+{{g_{2}}\ {{X}^{2}}}+{{g_{1}}\  X}}(36)
    Type: Equation(Expression(Integer))
    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)
    Type: Equation(Expression(Integer))
    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)
    Type: Expression(Integer)
    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)
    Type: Equation(Expression(Integer))
    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)
    Type: Expression(Integer)
    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)
    Type: Equation(Expression(Integer))
    fricas
    htrigs rhs %
    
\label{eq42}{{\cosh \left({r_{2}}\right)}-{\cosh \left({r_{1}}\right)}}\over{{{r_{2}}^{2}}-{{r_{1}}^{2}}}(42)
    Type: Expression(Integer)
    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)
    Type: Equation(Expression(Integer))
    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)
    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{eq45}\begin{array}{@{}l}
\displaystyle
{{e}^{X}}={{\left(
\begin{array}{@{}l}
\displaystyle
{{\left({
\begin{array}{@{}l}
\displaystyle
-{{{r_{1}}^{3}}\ {r_{2}}\  id}+{{r_{1}}\ {{X}^{3}}}+{{r_{1}}\ {r_{2}}\ {{X}^{2}}}- 
\
\
\displaystyle
{{{r_{1}}^{3}}\  X}
(45)
    Type: Equation(Expression(Integer))
    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}}^{3}}\ {r_{2}}\  id}+{{r_{1}}\ {r_{2}}\ {{X}^{2}}}\right)}\ {\cosh \left({r_{2}}\right)}}+ 
\
\
\displaystyle
{{\left({{r_{1}}\ {{r_{2}}^{3}}\  id}-{{r_{1}}\ {r_{2}}\ {{X}^{2}}}\right)}\ {\cosh \left({r_{1}}\right)}}
(46)
    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{eq47}{Y_{1}}={{-{{X}^{3}}+{{{r_{2}}^{2}}\  X}}\over{{{r_{2}}^{2}}-{{r_{1}}^{2}}}}(47)
    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{eq48}{Y_{2}}={{{{X}^{3}}-{{{r_{1}}^{2}}\  X}}\over{{{r_{2}}^{2}}-{{r_{1}}^{2}}}}(48)
    Type: Equation(Fraction(Polynomial(Integer)))

    Exercise 5.3

    fricas
    eq5_6a:= X = Y[1]+Y[2]
    
\label{eq49}X ={{Y_{2}}+{Y_{1}}}(49)
    Type: Equation(Polynomial(Integer))
    fricas
    test(eval(eq5_6a,[eq5_5a,eq5_5b]))
    
\label{eq50} \mbox{\rm true} (50)
    Type: Boolean
    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)
    Type: Equation(Expression(Integer))
    fricas
    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)
    Type: Equation(Polynomial(Integer))
    fricas
    test(_rule(X^2*(lhs %),X^2*(rhs %))(lhs eq5_6b)=rhs eq5_6b)
    
\label{eq53} \mbox{\rm true} (53)
    Type: Boolean

    Comment 5.4 (Rescaling)

    fricas
    eq5_7:= sinh(r[1])/r[1]*Y[1]+sinh(r[2])/r[2]*Y[2]
    
\label{eq54}{{{Y_{2}}\ {r_{1}}\ {\sinh \left({r_{2}}\right)}}+{{Y_{1}}\ {r_{2}}\ {\sinh \left({r_{1}}\right)}}}\over{{r_{1}}\ {r_{2}}}(54)
    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{eq55}\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](55)
    Type: List(Equation(Expression(Integer)))
    fricas
    eq5_8b:= [ γ[1] = cosh(r[1]), γ[2] = cosh(r[2]) ]
    
\label{eq56}\left[{{��_{1}}={\cosh \left({r_{1}}\right)}}, \:{{��_{2}}={\cosh \left({r_{2}}\right)}}\right](56)
    Type: List(Equation(Expression(Integer)))
    fricas
    eq5_9:= exp(X) = exp(Y[1])*exp(Y[2])
    
\label{eq57}{{e}^{X}}={{{e}^{Y_{1}}}\ {{e}^{Y_{2}}}}(57)
    Type: Equation(Expression(Integer))
    fricas
    eval(eq5_9,[eq5_5a,eq5_5b])
    
\label{eq58}{{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}}}}}}(58)
    Type: Equation(Expression(Integer))
    fricas
    test(lhs % = simplify expand rhs %)
    
\label{eq59} \mbox{\rm true} (59)
    Type: Boolean