#12255: coeffs() fails on symbolic functions
-------------------------+--------------------------------------------------
   Reporter:  mjo        |          Owner:  burcin  
       Type:  defect     |         Status:  new     
   Priority:  major      |      Milestone:  sage-5.0
  Component:  symbolics  |       Keywords:          
Work_issues:             |       Upstream:  N/A     
   Reviewer:             |         Author:          
     Merged:             |   Dependencies:          
-------------------------+--------------------------------------------------
Description changed by mjo:

Old description:

> This was reported on sage-support:
>
>   http://groups.google.com/group/sage-support/t/fa439b8dd28daaa8
>
> As of 4.8.alpha6,
>
> {{{
> sage: g = function('g', var('t'))
> sage: f = 3*g + g**2 + t
> sage: f.coeffs(g)
> ...
> ValueError: The name "g(t)" is not a valid Python identifier.
> }}}
>
> This worked in 4.7,
>
> {{{
> sage: f.coeffs(g)
> [[g(t)^2 + t + 3*g(t), 0]]
> }}}

New description:

 This was reported on sage-support:

   http://groups.google.com/group/sage-support/t/fa439b8dd28daaa8

 As of 4.8.alpha6,

 {{{
 sage: g = function('g', var('t'))
 sage: f = 3*g + g**2 + t
 sage: f.coeffs(g)
 ...
 ValueError: The name "g(t)" is not a valid Python identifier.
 }}}

 This didn't throw a ValueError in 4.7,

 {{{
 sage: f.coeffs(g)
 [[g(t)^2 + t + 3*g(t), 0]]
 }}}

 but the result was still not the expected one. The correct answer would
 be,

 {{{
 sage: f.coeffs(g)
 [[t, 0],[3, 1], [1, 2]]
 }}}

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12255#comment:1>
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