## [Maxima-commits] CVS: maxima/src hypgeo.lisp,1.62,1.63

 [Maxima-commits] CVS: maxima/src hypgeo.lisp,1.62,1.63 From: Dieter Kaiser - 2009-09-24 19:44:47 ```Update of /cvsroot/maxima/maxima/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2307/src Modified Files: hypgeo.lisp Log Message: To prepare further work, again some reordering of the functions for the Laplace transform of Bessel Y. Now the algorithm are in a logical order. No change of the algorithm. Index: hypgeo.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/hypgeo.lisp,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- hypgeo.lisp 23 Sep 2009 21:51:42 -0000 1.62 +++ hypgeo.lisp 24 Sep 2009 19:44:37 -0000 1.63 @@ -3835,8 +3835,9 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; -;;; Algorithm 2.6: SPECIAL HANDLING OF Bessel Y +;;; Algorithm 2.6: SPECIAL HANDLING OF Bessel Y for an integer order ;;; +;;; This is called for one Bessel Y function, when the order is an integer. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun lty (rest arg index) @@ -3868,6 +3869,73 @@ (return (setq *hyp-return-noun-flag* 'fail-in-dionarghyp-y)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Algorithm 2.6.1: Laplace transform of t^n*bessel_y(v,a*t) +;;; v is an integer and n>=v +;;; +;;; Table of Integral Transforms +;;; +;;; Volume 2, p 105, formula 2 is a formula for the Y-transform of +;;; +;;; f(x) = x^(u-3/2)*exp(-a*x) +;;; +;;; where the Y-transform is defined by +;;; +;;; integrate(f(x)*bessel_y(v,x*y)*sqrt(x*y), x, 0, inf) +;;; +;;; which is +;;; +;;; -2/%pi*gamma(u+v)*sqrt(y)*(y^2+a^2)^(-u/2) +;;; *assoc_legendre_q(u-1,-v,a/sqrt(y^2+a^2)) +;;; +;;; with a > 0, Re u > |Re v|. +;;; +;;; In particular, with a slight change of notation, we have +;;; +;;; integrate(x^(u-1)*exp(-p*x)*bessel_y(v,a*x)*sqrt(a), x, 0, inf) +;:; +;;; which is the Laplace transform of x^(u-1/2)*bessel_y(v,x). +;;; +;;; Thus, the Laplace transform is +;;; +;;; -2/%pi*gamma(u+v)*sqrt(a)*(a^2+p^2)^(-u/2) +;;; *assoc_legendre_q(u-1,-v,p/sqrt(a^2+p^2)) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun f2p105v2cond (a l index) + (prog (d m) + (setq d (cdras 'd l) m (cdras 'm l)) + (setq m (add m 1.)) + (cond ((eq (checksigntm (\$realpart (sub m index))) + '\$positive) + (return (f2p105v2cond-simp m index a)))) + (return (setq *hyp-return-noun-flag* 'fail-in-f2p105v2cond)))) + +(defun f2p105v2cond-simp (m v a) + (mul -2. + (power '\$%pi -1.) + (simplify (list '(%gamma) (add m v))) + (power (add (mul a a) (mul *par* *par*)) + (mul -1. (inv 2.) m)) + (leg2fsimp (sub m 1.) + (mul -1. v) + (mul *par* + (power (add (mul a a) (mul *par* *par*)) + (inv -2.)))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Algorithm 2.6.2: Laplace transform of t^n*bessel_y(v, a*sqrt(t)) +;;; +;;; Table of Integral Transforms +;;; +;;; p. 188, formula 50: +;;; +;;; t^(u-1/2)*bessel_y(2*v,2*sqrt(a)*sqrt(t)) +;;; -> a^(-1/2)*p^(-u)*exp(-a/2/p) +;;; * [tan((u-v)*%pi)*gamma(u+v+1/2)/gamma(2*v+1)*M[u,v](a/p) +;;; -sec((u-v)*%pi)*W[u,v](a/p)] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun f50cond (a l v) (prog (d m) @@ -3887,15 +3955,6 @@ (return (f50p188-simp d m v a)))) (return (setq *hyp-return-noun-flag* 'fail-in-f50cond)))) -;; Table of Integral Transforms -;; -;; p. 188, formula 50: -;; -;; t^(u-1/2)*bessel_y(2*v,2*sqrt(a)*sqrt(t)) -;; -> a^(-1/2)*p^(-u)*exp(-a/2/p) -;; * [tan((u-v)*%pi)*gamma(u+v+1/2)/gamma(2*v+1)*M[u,v](a/p) -;; -sec((u-v)*%pi)*W[u,v](a/p)] - (defun f50p188-simp (d u v a) (mul d (power a (inv -2)) @@ -3910,55 +3969,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defun f2p105v2cond (a l index) - (prog (d m) - (setq d (cdras 'd l) m (cdras 'm l)) - (setq m (add m 1.)) - (cond ((eq (checksigntm (\$realpart (sub m index))) - '\$positive) - (return (f2p105v2cond-simp m index a)))) - (return (setq *hyp-return-noun-flag* 'fail-in-f2p105v2cond)))) - -;; Table of Integral Transforms -;; -;; Volume 2, p 105, formula 2 is a formula for the Y-transform of -;; -;; f(x) = x^(u-3/2)*exp(-a*x) -;; -;; where the Y-transform is defined by -;; -;; integrate(f(x)*bessel_y(v,x*y)*sqrt(x*y), x, 0, inf) -;; -;; which is -;; -;; -2/%pi*gamma(u+v)*sqrt(y)*(y^2+a^2)^(-u/2) -;; *assoc_legendre_q(u-1,-v,a/sqrt(y^2+a^2)) -;; -;; with a > 0, Re u > |Re v|. -;; -;; In particular, with a slight change of notation, we have -;; -;; integrate(x^(u-1)*exp(-p*x)*bessel_y(v,a*x)*sqrt(a), x, 0, inf) -;; -;; which is the Laplace transform of x^(u-1/2)*bessel_y(v,x). -;; -;; Thus, the Laplace transform is -;; -;; -2/%pi*gamma(u+v)*sqrt(a)*(a^2+p^2)^(-u/2) -;; *assoc_legendre_q(u-1,-v,p/sqrt(a^2+p^2)) - -(defun f2p105v2cond-simp (m v a) - (mul -2. - (power '\$%pi -1.) - (simplify (list '(%gamma) (add m v))) - (power (add (mul a a) (mul *par* *par*)) - (mul -1. (inv 2.) m)) - (leg2fsimp (sub m 1.) - (mul -1. v) - (mul *par* - (power (add (mul a a) (mul *par* *par*)) - (inv -2.)))))) - ;; This doesn't seem to be used anywhere. ;; ;; A&S 8.1.2: ```

 [Maxima-commits] CVS: maxima/src hypgeo.lisp,1.62,1.63 From: Dieter Kaiser - 2009-09-24 19:44:47 ```Update of /cvsroot/maxima/maxima/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2307/src Modified Files: hypgeo.lisp Log Message: To prepare further work, again some reordering of the functions for the Laplace transform of Bessel Y. Now the algorithm are in a logical order. No change of the algorithm. Index: hypgeo.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/hypgeo.lisp,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- hypgeo.lisp 23 Sep 2009 21:51:42 -0000 1.62 +++ hypgeo.lisp 24 Sep 2009 19:44:37 -0000 1.63 @@ -3835,8 +3835,9 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; -;;; Algorithm 2.6: SPECIAL HANDLING OF Bessel Y +;;; Algorithm 2.6: SPECIAL HANDLING OF Bessel Y for an integer order ;;; +;;; This is called for one Bessel Y function, when the order is an integer. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun lty (rest arg index) @@ -3868,6 +3869,73 @@ (return (setq *hyp-return-noun-flag* 'fail-in-dionarghyp-y)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Algorithm 2.6.1: Laplace transform of t^n*bessel_y(v,a*t) +;;; v is an integer and n>=v +;;; +;;; Table of Integral Transforms +;;; +;;; Volume 2, p 105, formula 2 is a formula for the Y-transform of +;;; +;;; f(x) = x^(u-3/2)*exp(-a*x) +;;; +;;; where the Y-transform is defined by +;;; +;;; integrate(f(x)*bessel_y(v,x*y)*sqrt(x*y), x, 0, inf) +;;; +;;; which is +;;; +;;; -2/%pi*gamma(u+v)*sqrt(y)*(y^2+a^2)^(-u/2) +;;; *assoc_legendre_q(u-1,-v,a/sqrt(y^2+a^2)) +;;; +;;; with a > 0, Re u > |Re v|. +;;; +;;; In particular, with a slight change of notation, we have +;;; +;;; integrate(x^(u-1)*exp(-p*x)*bessel_y(v,a*x)*sqrt(a), x, 0, inf) +;:; +;;; which is the Laplace transform of x^(u-1/2)*bessel_y(v,x). +;;; +;;; Thus, the Laplace transform is +;;; +;;; -2/%pi*gamma(u+v)*sqrt(a)*(a^2+p^2)^(-u/2) +;;; *assoc_legendre_q(u-1,-v,p/sqrt(a^2+p^2)) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun f2p105v2cond (a l index) + (prog (d m) + (setq d (cdras 'd l) m (cdras 'm l)) + (setq m (add m 1.)) + (cond ((eq (checksigntm (\$realpart (sub m index))) + '\$positive) + (return (f2p105v2cond-simp m index a)))) + (return (setq *hyp-return-noun-flag* 'fail-in-f2p105v2cond)))) + +(defun f2p105v2cond-simp (m v a) + (mul -2. + (power '\$%pi -1.) + (simplify (list '(%gamma) (add m v))) + (power (add (mul a a) (mul *par* *par*)) + (mul -1. (inv 2.) m)) + (leg2fsimp (sub m 1.) + (mul -1. v) + (mul *par* + (power (add (mul a a) (mul *par* *par*)) + (inv -2.)))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Algorithm 2.6.2: Laplace transform of t^n*bessel_y(v, a*sqrt(t)) +;;; +;;; Table of Integral Transforms +;;; +;;; p. 188, formula 50: +;;; +;;; t^(u-1/2)*bessel_y(2*v,2*sqrt(a)*sqrt(t)) +;;; -> a^(-1/2)*p^(-u)*exp(-a/2/p) +;;; * [tan((u-v)*%pi)*gamma(u+v+1/2)/gamma(2*v+1)*M[u,v](a/p) +;;; -sec((u-v)*%pi)*W[u,v](a/p)] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun f50cond (a l v) (prog (d m) @@ -3887,15 +3955,6 @@ (return (f50p188-simp d m v a)))) (return (setq *hyp-return-noun-flag* 'fail-in-f50cond)))) -;; Table of Integral Transforms -;; -;; p. 188, formula 50: -;; -;; t^(u-1/2)*bessel_y(2*v,2*sqrt(a)*sqrt(t)) -;; -> a^(-1/2)*p^(-u)*exp(-a/2/p) -;; * [tan((u-v)*%pi)*gamma(u+v+1/2)/gamma(2*v+1)*M[u,v](a/p) -;; -sec((u-v)*%pi)*W[u,v](a/p)] - (defun f50p188-simp (d u v a) (mul d (power a (inv -2)) @@ -3910,55 +3969,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defun f2p105v2cond (a l index) - (prog (d m) - (setq d (cdras 'd l) m (cdras 'm l)) - (setq m (add m 1.)) - (cond ((eq (checksigntm (\$realpart (sub m index))) - '\$positive) - (return (f2p105v2cond-simp m index a)))) - (return (setq *hyp-return-noun-flag* 'fail-in-f2p105v2cond)))) - -;; Table of Integral Transforms -;; -;; Volume 2, p 105, formula 2 is a formula for the Y-transform of -;; -;; f(x) = x^(u-3/2)*exp(-a*x) -;; -;; where the Y-transform is defined by -;; -;; integrate(f(x)*bessel_y(v,x*y)*sqrt(x*y), x, 0, inf) -;; -;; which is -;; -;; -2/%pi*gamma(u+v)*sqrt(y)*(y^2+a^2)^(-u/2) -;; *assoc_legendre_q(u-1,-v,a/sqrt(y^2+a^2)) -;; -;; with a > 0, Re u > |Re v|. -;; -;; In particular, with a slight change of notation, we have -;; -;; integrate(x^(u-1)*exp(-p*x)*bessel_y(v,a*x)*sqrt(a), x, 0, inf) -;; -;; which is the Laplace transform of x^(u-1/2)*bessel_y(v,x). -;; -;; Thus, the Laplace transform is -;; -;; -2/%pi*gamma(u+v)*sqrt(a)*(a^2+p^2)^(-u/2) -;; *assoc_legendre_q(u-1,-v,p/sqrt(a^2+p^2)) - -(defun f2p105v2cond-simp (m v a) - (mul -2. - (power '\$%pi -1.) - (simplify (list '(%gamma) (add m v))) - (power (add (mul a a) (mul *par* *par*)) - (mul -1. (inv 2.) m)) - (leg2fsimp (sub m 1.) - (mul -1. v) - (mul *par* - (power (add (mul a a) (mul *par* *par*)) - (inv -2.)))))) - ;; This doesn't seem to be used anywhere. ;; ;; A&S 8.1.2: ```