trigint.rlg 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. Mon Jan 4 00:09:22 MET 1999
  2. REDUCE 3.7, 15-Jan-99 ...
  3. 1: 1:
  4. 2: 2: 2: 2: 2: 2: 2: 2: 2:
  5. 3: 3: % some test examples for the trigint package. If the input expression is
  6. % free of sin, cos or tan at the moment, then no Weierstrass substitutions
  7. % will be made, and the standard int operator is called.
  8. trigint(1/x,x);
  9. log(x)
  10. trigint(1,y);
  11. x
  12. trigint(sin(x),x);
  13. pi + 2*x
  14. - 2*tan(----------)
  15. 4
  16. ----------------------
  17. pi + 2*x 2
  18. tan(----------) + 1
  19. 4
  20. trigint(1/(cos(x)+2),x);
  21. x
  22. tan(---)
  23. 2 - pi + x
  24. 2*sqrt(3)*(atan(----------) + floor(-----------)*pi)
  25. sqrt(3) 2*pi
  26. ------------------------------------------------------
  27. 3
  28. trigint(1/(cos(x)-2),x);
  29. x
  30. 3*tan(---)
  31. 2 - pi + x
  32. - 2*sqrt(3)*(atan(------------) + floor(-----------)*pi)
  33. sqrt(3) 2*pi
  34. -----------------------------------------------------------
  35. 3
  36. trigint(1/(sin(x)),x);
  37. pi + 2*x pi + 2*x
  38. log(tan(----------) - 1) - log(tan(----------) + 1)
  39. 4 4
  40. trigint(1/(sin(x)+2),x);
  41. pi + 2*x
  42. 3*tan(----------)
  43. 4 - pi + 2*x
  44. 2*sqrt(3)*(atan(-------------------) + floor(-------------)*pi)
  45. sqrt(3) 4*pi
  46. -----------------------------------------------------------------
  47. 3
  48. trigint(15/(cos(x)*(5-4*cos(x))),x);
  49. x - pi + x x
  50. 8*atan(3*tan(---)) + 8*floor(-----------)*pi - 3*log(tan(---) - 1)
  51. 2 2*pi 2
  52. x
  53. + 3*log(tan(---) + 1)
  54. 2
  55. trigint(3/(5+4*sin(x)),x);
  56. pi + 2*x - pi + 2*x
  57. 2*(atan(3*tan(----------)) + floor(-------------)*pi)
  58. 4 4*pi
  59. trigint(3/(5-4*cos(x)),x);
  60. x - pi + x
  61. 2*(atan(3*tan(---)) + floor(-----------)*pi)
  62. 2 2*pi
  63. trigint(tan(x),x);
  64. x
  65. 2*atan(tan(---))*tan(x)
  66. 2
  67. %trigint(sqrt(cos(x)),x);
  68. on tracetrig;
  69. trigint(1/(cos(x)-5),x);
  70. x
  71. 3*tan(---)
  72. 2 - pi + x
  73. - sqrt(6)*(atan(------------) + floor(-----------)*pi)
  74. sqrt(6) 2*pi
  75. ---------------------------------------------------------
  76. 6
  77. trigint(1/(sqrt(sin(x))),x);
  78. failed with substitution B: system could not
  79. integrate after subs, trying A
  80. failed with A: trying C now
  81. failed with C: trying D now
  82. trying all possible substitutions
  83. ***** system can't integrate after
  84. subs
  85. end;
  86. 4: 4: 4: 4: 4: 4: 4: 4: 4:
  87. Time for test: 4220 ms, plus GC time: 140 ms
  88. 5: 5:
  89. Quitting
  90. Mon Jan 4 00:09:35 MET 1999