Ask Your Question
1

gen_lengendre_p bug

asked 2020-02-12 11:40:28 -0500

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
2

answered 2020-02-12 14:19:00 -0500

eric_g gravatar image

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 flag offensive delete link more
0

answered 2020-02-12 19:38:42 -0500

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 08:46:28 -0500 )edit

Like. Thanks.

bso gravatar imagebso ( 2020-02-13 11:07:59 -0500 )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 11:40:28 -0500

Seen: 62 times

Last updated: Feb 12