## maxima-bugs

 [Maxima-bugs] [ maxima-Bugs-2862197 ] assoc_legendre_p(n, -1, x) wrong sign From: SourceForge.net - 2009-09-19 15:15:55 ```Bugs item #2862197, was opened at 2009-09-19 17:15 Message generated for change (Tracker Item Submitted) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2862197&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core - Polynomials Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Dieter Kaiser (crategus) Assigned to: Nobody/Anonymous (nobody) Summary: assoc_legendre_p(n,-1,x) wrong sign Initial Comment: The sign of assoc_legendre_p(n,-1,x) is wrong. We get: (%i32) assoc_legendre_p(1,-1,x); (%o32) -sqrt(1-x^2)/2 (%i33) assoc_legendre_p(2,-1,x); (%o33) -x*sqrt(1-x^2)/2 (%i36) factor(ratsimp(assoc_legendre_p(3,-1,x))); (%o36) -sqrt(1-x^2)*(5*x^2-1)/8 (%i37) factor(ratsimp(assoc_legendre_p(4,-1,x))); (%o37) -x*sqrt(1-x^2)*(7*x^2-3)/8 In all cases above we obtain the expected answer when we multiply the result of Maxima with -1. As a reference I have taken the results from wolfram alpha. This bug is related to the problem that specint(exp(-s*t)*t^n*bessel_j(1,t),t) does not work for a general power n. Dieter Kaiser ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2862197&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-2862197 ] assoc_legendre_p(n, -1, x) wrong sign From: SourceForge.net - 2009-09-19 16:36:32 ```Bugs item #2862197, was opened at 2009-09-19 17:15 Message generated for change (Comment added) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2862197&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core - Polynomials Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Dieter Kaiser (crategus) Assigned to: Nobody/Anonymous (nobody) Summary: assoc_legendre_p(n,-1,x) wrong sign Initial Comment: The sign of assoc_legendre_p(n,-1,x) is wrong. We get: (%i32) assoc_legendre_p(1,-1,x); (%o32) -sqrt(1-x^2)/2 (%i33) assoc_legendre_p(2,-1,x); (%o33) -x*sqrt(1-x^2)/2 (%i36) factor(ratsimp(assoc_legendre_p(3,-1,x))); (%o36) -sqrt(1-x^2)*(5*x^2-1)/8 (%i37) factor(ratsimp(assoc_legendre_p(4,-1,x))); (%o37) -x*sqrt(1-x^2)*(7*x^2-3)/8 In all cases above we obtain the expected answer when we multiply the result of Maxima with -1. As a reference I have taken the results from wolfram alpha. This bug is related to the problem that specint(exp(-s*t)*t^n*bessel_j(1,t),t) does not work for a general power n. Dieter Kaiser ---------------------------------------------------------------------- >Comment By: Dieter Kaiser (crategus) Date: 2009-09-19 18:36 Message: I had a look into the code. We do the following transformation for a negative second parameter m: assoc_legendre_p(n,-m,x) -> factorial(n+m)/factorial(n-m) * asscoc_legendre_p(n,m,x) That is the simplified formula A&S 8.2.5 for m an integer. Wolfram functions gives an additional factor (-1)^m. I think wolfram function is correct. With this factor we would get the expected results for the Laplace transform of t^n*bessel_j(1,t) too. Furthermore we would get the correct result for the Laplace transform of t^u*bessel_j(v,z). The expected answer of example 73 in rtest14.mac is not correct. We can see it when we insert specific values in the result. Dieter Kaiser ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2862197&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-2862197 ] assoc_legendre_p(n, -1, x) wrong sign From: SourceForge.net - 2009-09-19 23:32:46 ```Bugs item #2862197, was opened at 2009-09-19 17:15 Message generated for change (Comment added) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2862197&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core - Polynomials Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Dieter Kaiser (crategus) Assigned to: Nobody/Anonymous (nobody) Summary: assoc_legendre_p(n,-1,x) wrong sign Initial Comment: The sign of assoc_legendre_p(n,-1,x) is wrong. We get: (%i32) assoc_legendre_p(1,-1,x); (%o32) -sqrt(1-x^2)/2 (%i33) assoc_legendre_p(2,-1,x); (%o33) -x*sqrt(1-x^2)/2 (%i36) factor(ratsimp(assoc_legendre_p(3,-1,x))); (%o36) -sqrt(1-x^2)*(5*x^2-1)/8 (%i37) factor(ratsimp(assoc_legendre_p(4,-1,x))); (%o37) -x*sqrt(1-x^2)*(7*x^2-3)/8 In all cases above we obtain the expected answer when we multiply the result of Maxima with -1. As a reference I have taken the results from wolfram alpha. This bug is related to the problem that specint(exp(-s*t)*t^n*bessel_j(1,t),t) does not work for a general power n. Dieter Kaiser ---------------------------------------------------------------------- >Comment By: Dieter Kaiser (crategus) Date: 2009-09-20 01:32 Message: Fixed in orthopoly.lisp revision 1.16. Closing this bug report. Dieter Kaiser ---------------------------------------------------------------------- Comment By: Dieter Kaiser (crategus) Date: 2009-09-19 18:36 Message: I had a look into the code. We do the following transformation for a negative second parameter m: assoc_legendre_p(n,-m,x) -> factorial(n+m)/factorial(n-m) * asscoc_legendre_p(n,m,x) That is the simplified formula A&S 8.2.5 for m an integer. Wolfram functions gives an additional factor (-1)^m. I think wolfram function is correct. With this factor we would get the expected results for the Laplace transform of t^n*bessel_j(1,t) too. Furthermore we would get the correct result for the Laplace transform of t^u*bessel_j(v,z). The expected answer of example 73 in rtest14.mac is not correct. We can see it when we insert specific values in the result. Dieter Kaiser ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2862197&group_id=4933 ```