Ask Your Question
2

gen_lengendre_p bug

asked 2020-02-12 18:40:28 +0100

bso gravatar image

Hi, wonder if someone here familiar with associated Legendre function can verify:

sage: gen_legendre_P(2, 2, x)
3*x^2 - 3

I think it should be

3 - 3*x^2

In Sage 8.9

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2020-02-12 21:19:00 +0100

eric_g gravatar image

updated 2021-05-17 23:30:13 +0100

You are unfortunately facing a known issue, which is not solved yet:

https://trac.sagemath.org/ticket/25034

Associated Legendre functions and spherical harmonics in Sage require someone to work of them. Would you volunteer to do it?

EDIT (17 May 2021): the bug has been fixed in SageMath 9.3 (released a week ago):

sage:  gen_legendre_P(2, 2, x)                                                                      
-3*x^2 + 3
edit flag offensive delete link more
0

answered 2020-02-13 02:38:42 +0100

bso gravatar image

Thanks, Eric_G. I am interested to help out. Is there a page with Sage volunteering process? I will sign up. I have computer science degrees but new to math (but seriously interested to learn).

Correct definition:

def legendre_function(l, m, f):
    return ((-1)^m * (1 - x^2)^(m/2) * diff(legendre_P(l, x), x, m)).subs(x = f)

sage: legendre_function(2, 2, x)
-3*x^2 + 3

sage: legendre_function(2, 2, cos(x))
-3*cos(x)^2 + 3
edit flag offensive delete link more

Comments

Thanks for signing up! The standard starting point for Sage development is the Developer's guide. You may find some summary here (it's focused on manifolds, but most of the content is valid for any project).

eric_g gravatar imageeric_g ( 2020-02-13 15:46:28 +0100 )edit

Like. Thanks.

bso gravatar imagebso ( 2020-02-13 18:07:59 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-02-12 18:40:28 +0100

Seen: 407 times

Last updated: May 17 '21