defintc.red 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. module defintc;
  2. fluid '(mellin!-transforms!* mellin!-coefficients!*);
  3. symbolic (mellin!-transforms!* :=mkvect(200))$
  4. symbolic putv(mellin!-transforms!*,0,'(1 . 1)); % undefined case
  5. symbolic putv(mellin!-transforms!*,1,'(() (1 0 0 1) () (nil) 1 x));
  6. % trigonometric functions
  7. symbolic putv(mellin!-transforms!*,2,'
  8. (() (1 0 0 2) () ((quotient 1 2) nil)
  9. (sqrt pi) (quotient (expt x 2) 4)));
  10. symbolic putv(mellin!-transforms!*,25,'
  11. (() (1 0 0 2) () ((quotient 1 2) nil)
  12. (minus (sqrt pi)) (quotient (expt x 2) 4)));
  13. symbolic putv(mellin!-transforms!*,3,'
  14. (() (1 0 0 2) () (nil (quotient 1 2))
  15. (sqrt pi) (quotient (expt x 2) 4)));
  16. symbolic putv(mellin!-transforms!*,7,'
  17. (() (2 0 2 2) (1 1) (nil (quotient 1 2))
  18. (quotient (sqrt pi) 2) (expt x 2)));
  19. symbolic putv(mellin!-transforms!*,8,'
  20. (() (0 2 2 2) ((quotient 1 2) 1) (nil nil)
  21. (quotient (sqrt pi) 2) (expt x 2)));
  22. symbolic putv(mellin!-transforms!*,9,'
  23. (() (1 2 2 2) ((quotient 1 2) 1) ((quotient 1 2) nil)
  24. (quotient 1 2) (expt x 2)));
  25. % hyperbolic functions
  26. symbolic putv(mellin!-transforms!*,10,'
  27. (() (1 0 1 3) (1) ((quotient 1 2) 1 nil)
  28. (expt pi (quotient 3 2)) (quotient (expt x 2) 4)));
  29. symbolic putv(mellin!-transforms!*,11,'
  30. (() (1 0 1 3) ((quotient 1 2)) (nil (quotient 1 2) (quotient 1 2))
  31. (expt pi (quotient 3 2)) (quotient (expt x 2) 4)));
  32. % the Heavisides
  33. symbolic putv(mellin!-transforms!*,30,'(() (1 0 1 1) (1) (nil) 1 x));
  34. symbolic putv(mellin!-transforms!*,31,'(() (0 1 1 1) (1) (nil) 1 x));
  35. symbolic putv(mellin!-transforms!*,32,'
  36. (() (2 0 2 2) (1 1) (nil nil) -1 x));
  37. symbolic putv(mellin!-transforms!*,33,'
  38. (() (0 2 2 2) (1 1) (nil nil) 1 x));
  39. symbolic putv(mellin!-transforms!*,34,'
  40. (() (1 2 2 2) (1 1) (1 nil) 1 x));
  41. symbolic putv(mellin!-transforms!*,35,'
  42. (() (2 1 2 2) (nil 1) (nil nil) 1 x));
  43. % exponential integral
  44. symbolic putv(mellin!-transforms!*,36,'
  45. (() (2 0 1 2) (1) (nil nil) -1 x));
  46. % sin integral
  47. symbolic putv(mellin!-transforms!*,37,'
  48. (() (1 1 1 3) (1) ((quotient 1 2) nil nil)
  49. (quotient (sqrt pi) 2) (quotient (expt x 2) 4)));
  50. % cos integral
  51. symbolic putv(mellin!-transforms!*,38,'
  52. (() (2 0 1 3) (1) (nil nil (quotient 1 2))
  53. (quotient (sqrt pi) -2) (quotient (expt x 2) 4)));
  54. % sinh integral
  55. symbolic putv(mellin!-transforms!*,39,'
  56. (() (1 1 2 4) (1 nil) ((quotient 1 2) nil nil nil)
  57. (quotient (expt pi (quotient 3 2)) -2) (quotient (expt x 2) 4)));
  58. % error functions
  59. symbolic putv(mellin!-transforms!*,41,'
  60. (() (1 1 1 2) (1) ((quotient 1 2) nil)
  61. (quotient 1 (sqrt pi)) (expt x 2)));
  62. symbolic putv(mellin!-transforms!*,42,'
  63. (() (2 0 1 2) (1) (nil (quotient 1 2))
  64. (quotient 1 (sqrt pi)) (expt x 2)));
  65. % Fresnel integrals
  66. symbolic putv(mellin!-transforms!*,43,'
  67. (() (1 1 1 3) (1) ((quotient 3 4) nil (quotient 1 4))
  68. (quotient 1 2) (quotient (expt x 2) 4)));
  69. symbolic putv(mellin!-transforms!*,44,'
  70. (() (1 1 1 3) (1) ((quotient 1 4) nil (quotient 3 4))
  71. (quotient 1 2) (quotient (expt x 2) 4)));
  72. % gamma function
  73. symbolic putv(mellin!-transforms!*,45,'
  74. ((n) (1 1 1 2) (1) (n nil) 1 x));
  75. % Bessel functions
  76. symbolic putv(mellin!-transforms!*,50,'
  77. ((n) (1 0 0 2) () ((quotient n 2) (minus (quotient n 2)))
  78. 1 (quotient (expt x 2) 4)));
  79. symbolic putv(mellin!-transforms!*,51,'
  80. ((n) (2 0 1 3) ((quotient (minus (plus n 1)) 2))
  81. ((quotient n 2) (minus (quotient n 2)) (quotient (minus (plus n 1)) 2))
  82. 1 (quotient (expt x 2) 4)));
  83. symbolic putv(mellin!-transforms!*,52,'
  84. ((n) (1 0 1 3) ((plus (quotient 1 2) (quotient n 2)))
  85. ((quotient n 2) (minus (quotient n 2))
  86. (plus (quotient 1 2) (quotient n 2)))
  87. pi (quotient (expt x 2) 4)));
  88. symbolic putv(mellin!-transforms!*,53,'
  89. ((n) (2 0 0 2) () ((quotient n 2) (minus (quotient n 2)))
  90. (quotient 1 2) (quotient (expt x 2) 4)));
  91. % struve functions
  92. symbolic putv(mellin!-transforms!*,54,'
  93. ((n) (1 1 1 3) ((quotient (plus n 1) 2))
  94. ((quotient (plus n 1) 2) (minus (quotient n 2)) (quotient n 2))
  95. 1 (quotient (expt x 2) 4)));
  96. symbolic putv(mellin!-transforms!*,55,'
  97. ((n) (1 1 2 4) ((quotient (plus n 1) 2) nil)
  98. ((quotient (plus n 1) 2) nil (quotient n 2) (minus (quotient n 2)))
  99. (times (minus pi) (sec (times (quotient (minus n) 2) pi)))
  100. (quotient (expt x 2) 4)));
  101. % legendre polynomials
  102. symbolic putv(mellin!-transforms!*,56,'
  103. ((n) (2 0 2 2) ((minus n) (plus n 1)) (nil nil)
  104. 1 (quotient (plus x 1) 2)));
  105. symbolic putv(mellin!-transforms!*,57,'
  106. ((n) (0 2 2 2) (1 1) ((minus n) (plus n 1))
  107. 1 (quotient (plus x 1) 2)));
  108. % chebyshev polymomials
  109. symbolic putv(mellin!-transforms!*,58,'
  110. ((n) (2 0 2 2)
  111. ((difference (quotient 1 2) n) (plus (quotient 1 2) n))
  112. (nil (quotient 1 2)) (sqrt pi) (quotient (plus x 1) 2)));
  113. symbolic putv(mellin!-transforms!*,59,'
  114. ((n) (0 2 2 2) (nil (quotient 1 2)) (n (minus n))
  115. (sqrt pi) (quotient (plus x 1) 2)));
  116. symbolic putv(mellin!-transforms!*,60,'
  117. ((n) (2 0 2 2)
  118. ((plus (quotient 3 2) n) (difference (minus (quotient 1 2)) n))
  119. (nil (quotient 1 2)) (quotient (plus n 1) (times 2 (sqrt pi)))
  120. (quotient (plus x 1) 2)));
  121. symbolic putv(mellin!-transforms!*,61,'
  122. ((n) (0 2 2 2) ((quotient 3 2) 2) ((minus n) (plus n 2))
  123. (quotient (plus n 1) (times 2 (sqrt pi)))
  124. (quotient (plus x 1) 2)));
  125. % hermite polynomials
  126. symbolic putv(mellin!-transforms!*,62,'
  127. ((n) (1 0 1 2) (plus (quotient n 2) 1)
  128. ((difference (quotient n 2) (quotient n 2))
  129. (difference (quotient 1 2) (difference (quotient n 2)
  130. (quotient n 2))))
  131. (times (expt (minus 1) (quotient n 2)) (sqrt pi) (factorial n))
  132. (expt x 2)));
  133. % laguerre polynomials
  134. symbolic putv(mellin!-transforms!*,63,'
  135. ((n l) (1 0 1 2) ((plus n 1)) (0 (minus l))
  136. (gamma (plus l n 1)) x));
  137. % gegenbauer polynomials
  138. symbolic putv(mellin!-transforms!*,64,'
  139. ((n l) (2 0 2 2) ((plus l n (quotient 1 2))
  140. (difference (quotient 1 2) (quotient 1 n)))
  141. (0 (difference (quotient 1 2) l))
  142. (quotient (times 2 l (gamma (plus l (quotient 1 2)))) (factorial n))
  143. (quotient (plus x 1) 2)));
  144. symbolic putv(mellin!-transforms!*,65,'
  145. ((n l) (0 2 2 2) ((plus l (quotient 1 2)) (times 2 l))
  146. ((minus n) (plus (times 2 l) n))
  147. (quotient (times 2 l (gamma (plus l (quotient 1 2)))) (factorial n))
  148. (quotient (plus x 1) 2)));
  149. % jacobi polynomials
  150. symbolic putv(mellin!-transforms!*,66,'
  151. ((n r s) (2 0 2 2) ((plus r n 1) (difference (minus s) n))
  152. (0 (minus s)) (quotient (gamma (plus r n 1)) (factorial n))
  153. (quotient (plus x 1) 2)));
  154. symbolic putv(mellin!-transforms!*,67,'
  155. ((n r s) (0 2 2 2) ((plus r 1) (plus r s 1))
  156. ((minus n) (plus r s n 1))
  157. (quotient (gamma (plus r n 1)) (factorial n))
  158. (quotient (plus x 1) 2)));
  159. symbolic (mellin!-coefficients!* :=mkvect(200))$
  160. endmodule;
  161. end;