ratint.rlg 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. Tue Feb 10 12:28:49 2004 run on Linux
  2. *** c already defined as operator
  3. exp1:=441*x^7+780*x^6-2861*x^5+4085*x^4+7695*x^3+3713*x^2-43253*x+24500;
  4. exp1 :=
  5. 7 6 5 4 3 2
  6. 441*x + 780*x - 2861*x + 4085*x + 7695*x + 3713*x - 43253*x + 24500
  7. exp2:=9*x^6+6*x^5-65*x^4+20*x^3+135*x^2-154*x+49;
  8. 6 5 4 3 2
  9. exp2 := 9*x + 6*x - 65*x + 20*x + 135*x - 154*x + 49
  10. aa:=7*x^13+10*x^8+4*x^7-7*x^6-4*x^3-4*x^2+3*x+3;
  11. 13 8 7 6 3 2
  12. aa := 7*x + 10*x + 4*x - 7*x - 4*x - 4*x + 3*x + 3
  13. bb:=x^14-2*x^8-2*x^7-2*x^4-4*x^3-x^2+2*x+1;
  14. 14 8 7 4 3 2
  15. bb := x - 2*x - 2*x - 2*x - 4*x - x + 2*x + 1
  16. % example 2.14
  17. a:=48*x^3-84*x^2+42*x-36;
  18. 3 2
  19. a := 6*(8*x - 14*x + 7*x - 6)
  20. b:=-4*x^3-10*x^2+44*x-30;
  21. 3 2
  22. b := 2*( - 2*x - 5*x + 22*x - 15)
  23. % square free ex
  24. c:=x^8-2*x^6+2*x^2-1;
  25. 8 6 2
  26. c := x - 2*x + 2*x - 1
  27. %square_free(a,x);
  28. %eval_sq_free(ws,x);
  29. % hr example
  30. pu:=441*x^7+780*x^6-2861*x^5+4085*x^4+7695*x^3+3713*x^2-43253*x+24500;
  31. 7 6 5 4 3 2
  32. pu := 441*x + 780*x - 2861*x + 4085*x + 7695*x + 3713*x - 43253*x + 24500
  33. qu:=9*x^6+6*x^5-65*x^4+20*x^3+135*x^2-154*x+49;
  34. 6 5 4 3 2
  35. qu := 9*x + 6*x - 65*x + 20*x + 135*x - 154*x + 49
  36. %makemon(p,q,x);
  37. %pf(pu/qu,x);
  38. %trst hr;
  39. k:=36*x^6+126*x^5+183*x^4+(13807/6)*x^3-407*x^2-(3242/5)*x+(3044/15);
  40. 6 5 4 3 2
  41. 1080*x + 3780*x + 5490*x + 69035*x - 12210*x - 19452*x + 6088
  42. k := --------------------------------------------------------------------
  43. 30
  44. l:=(x^2+(7/6)*x+(1/3))^2*(x-(2/5))^3;
  45. 7 6 5 4 3 2
  46. 4500*x + 5100*x - 1315*x - 2698*x + 8*x + 496*x + 16*x - 32
  47. l := -------------------------------------------------------------------
  48. 4500
  49. %trst hr;
  50. ratint(k,l,x);
  51. 5271 3 39547 2 31018 7142
  52. ------*(x + -------*x - -------*x + -------)
  53. 5 52710 26355 26355
  54. {------------------------------------------------,
  55. 4 11 3 11 2 2 4
  56. x + ----*x - ----*x - ----*x + ----
  57. 30 25 25 75
  58. 37451 2 91125 2 128000 1
  59. -------*(log(x - ---) + -------*log(x + ---) - --------*log(x + ---))}
  60. 16 5 37451 3 37451 2
  61. ratint(exp1,exp2,x);
  62. 49 6 226 5 268 4 1608 3 6011 2 536 256
  63. ----*(x + -----*x - -----*x - ------*x + ------*x + -----*x - -----)
  64. 2 147 49 49 147 21 9
  65. {---------------------------------------------------------------------------,
  66. 4 2 3 2 7
  67. x - ---*x - 4*x + 6*x - ---
  68. 3 3
  69. 0}
  70. ratint(1,x^2,x);
  71. - 1
  72. {------,0}
  73. x
  74. ratint(1,x^2+1,x);
  75. *** Domain mode rational changed to arnum
  76. 2 1
  77. {0,log_sum(beta,beta + ---,0,log(2*beta*x - 1)*beta)}
  78. 4
  79. ratint(1,x^3+x+1,x);
  80. *** Domain mode rational changed to arnum
  81. {0,
  82. 3 3 1
  83. log_sum(beta,beta - ----*beta - ----,0,
  84. 31 31
  85. 62 2 31 4
  86. log( - ----*beta + ----*beta + x + ---)*beta)}
  87. 9 9 9
  88. ratint(1,x^5+1,x);
  89. *** Domain mode rational changed to arnum
  90. {0,
  91. 1
  92. ---*(log(x + 1) + 5*log_sum(beta,
  93. 5
  94. 4 1 3 1 2 1 1
  95. beta + ---*beta + ----*beta + -----*beta + -----,0,
  96. 5 25 125 625
  97. log(5*beta + x)*beta))}
  98. end;
  99. Time for test: 50 ms, plus GC time: 20 ms