bugGNU Octave - Bugs: bug #49129, Legendre polynomials unnecessarily...

 
 

bug #49129: Legendre polynomials unnecessarily restricted to [-1,+1]

Submitter:  None
Submitted:  Mon 19 Sep 2016 05:38:11 PM UTC
   
 
Category:  Octave Function Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.2
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 21 Sep 2016 04:19:35 PM UTC, comment #3: 

Making a documentation clarification is easy.  I did that here (http://hg.savannah.gnu.org/hgweb/octave/rev/ea9df75c9c71).

Rik <rik5>
Group administrator
Wed 21 Sep 2016 02:54:01 PM UTC, comment #2: 

The legendre function does not compute the Legendre poynomials, but the so called "associated Legendre polynomials" (called "associated Legendre functions" in Matlab). They are not polynomials for m odd. All of them are well defined in [-1,1]. For me, the only possible change could be in the documentation, from "Legendre function" to "associated Legendre polynomial" (wikipedia) or "associated Legendre function" (matlab).

Marco Caliari <caliari>
Group Member
Mon 19 Sep 2016 07:54:33 PM UTC, comment #1: 

This is possible, although it would introduce an incompatibility with Matlab which restricts the range to [-1, +1] (see http://www.mathworks.com/help/matlab/ref/legendre.html).

There may be ways around the incompatibility.  Octave could issue a warning, rather than a full error, if x is outside [-1,+1].  Or there could be a specific warning ID for the legendre function and extended input.  By default, this warning ID would be configured to produce an error


warning ("error", ID)


But the user could specifically enable an extended input range by using


warning ("on", ID)
OR
warning ("off", ID)


Just some ideas.


Rik <rik5>
Group administrator
Mon 19 Sep 2016 05:38:11 PM UTC, original submission:  

The legendre function apparently only accepts values of x on the interval [-1,+1].  While this is a documented feature of the function, it is mathematically wrong to restrict the range like this.  It is true that, taken as a basis, these function are only orthonormal when restricted to [-1,+1], the functions are just polynomials.  They are properly defined on the whole real line.  Moreover, there are cases where one wants to evaluate these functions outside of [-1,+1].  This should be supported, if not be default at least optionally.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by caliari (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-05-10 carandraug StatusConfirmed Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2016-09-20 mtmiller Severity3 - Normal 1 - Wish
        Priority5 - Normal 3 - Low
    2016-09-19 rik5 Item GroupIncorrect Result Feature Request
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code