#13836: PiecewisePolynomial.critical_points() results depend on variable of
function
------------------------------+---------------------------------------------
Reporter: christiankuper | Owner: burcin
Type: defect | Status: new
Priority: major | Milestone: sage-5.6
Component: symbolics | Keywords: Piecewise, critical_points
Work issues: | Report Upstream: N/A
Reviewers: | Authors: Christian Kuper
Merged in: | Dependencies:
Stopgaps: |
------------------------------+---------------------------------------------
When using the example in the documentation of the function the following
results are displayed for critical points:
{{{
sage: R.<x> = QQ[]
sage: f1 = x^0
sage: f2 = 10*x - x^2
sage: f3 = 3*x^4 - 156*x^3 + 3036*x^2 - 26208*x
sage: f = Piecewise([[(0,3),f1],[(3,10),f2],[(10,20),f3]])
sage: f.critical_points()
[5.0, 12.000000000000124, 12.999999999999725, 14.000000000000151]
}}}
When doing the same with y instead of x as a variable an empty list is
returned as a result:
{{{
sage: R.<y> = QQ[]
sage: f1 = y^0
sage: f2 = 10*y - y^2
sage: f3 = 3*y^4 - 156*y^3 + 3036*y^2 - 26208*y
sage: f = Piecewise([[(0,3),f1],[(3,10),f2],[(10,20),f3]])
sage: f.critical_points()
[]
}}}
This behavior does not change even if y is explicitly defined as the
variable:
{{{
sage: f = Piecewise([[(0,3),f1],[(3,10),f2],[(10,20),f3]],y)
sage: f.critical_points()
[]
}}}
IMHO it should be possible to optain correct results no matter what the
name of the variable is.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13836>
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.