#11888: Sage is missing the lambert_w function
----------------------------------------------------------------------------------+
   Reporter:  benjaminfjones                                                    
  |          Owner:  burcin                                      
       Type:  defect                                                            
  |         Status:  needs_work                                  
   Priority:  minor                                                             
  |      Milestone:  sage-5.0                                    
  Component:  symbolics                                                         
  |       Keywords:  lambert_w symbolics conversion maxima sd35.5
Work_issues:                                                                    
  |       Upstream:  N/A                                         
   Reviewer:  Keshav Kini, Karl-Dieter Crisman, Fredrik Johansson, Burcin 
Erocal  |         Author:  Benjamin Jones                              
     Merged:                                                                    
  |   Dependencies:  #12507                                      
----------------------------------------------------------------------------------+
Changes (by benjaminfjones):

  * dependencies:  #9130 => #12507


Comment:

 I've written a new patch that includes significant changes compared to the
 last one. I think I've included all of burcin's suggestions and I think
 it's much improved now. All tests pass with the patch applied on 5.0.beta4
 + #12507.

 One thing I haven't managed to figure out is how to get integration to
 work, e.g.

 {{{
 sage: integrate(lambert_w(x), x)
 ...
 RuntimeError: ECL says: Error executing code in Maxima: lambert_w: wrong
 number of arguments.
 }}}

 I guess that's because there isn't a two-argument version of lambert_w
 defined in maxima. The conversion maxima -> Sage works (as shown in one of
 the doctests) but it looks like the other way doesn't. Another example:

 {{{
 sage: maxima(lambert_w(5))
 Maxima ERROR:

 lambert_w: wrong number of arguments.
  -- an error. To debug this try: debugmode(true);
 }}}

 Q: How do I get around this?

 Numerical integration also fails unless I pass a lambda function:

 {{{
 sage: numerical_integral(lambert_w(x), 0, 1)
 Exception TypeError: "function not supported for these types, and can't
 coerce safely to supported types" in 'sage.gsl.integration.c_ff' ignored
 ...
 (0.0, 0.0)
 }}}

 but ....

 {{{
 sage: numerical_integral(lambda x: lambert_w(x), 0, 1)
 (0.33036612476168054, 3.667800782666048e-15)
 }}}

 Q: How do I fix this?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11888#comment:31>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to