#15499: Regression in solve command
------------------------+------------------------------
Reporter: ppurka | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.1
Component: calculus | Keywords: regression
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
------------------------+------------------------------
From google spreadsheet which no one reads `X-(`
The following is a vector calculus example. It supposedly should solve the
critical point equations for the given function (symbolically, where
possible, otherwise numerically):
{{{
x,y=var('x,y')
f(x,y)=((x-1)^2+(y-3)^2)*((x+1)^2+(y+2)^2)/(x^2+y^2+1)
solve([f.gradient()[0]==0,f.gradient()[1]==0],x,y)
}}}
Works with 5.5.rc0 (assuming answer is correct)
{{{
sage: solve([f.gradient()[0]==0,f.gradient()[1]==0],x,y)
[[x == (0.45 + 1.65*I), y == (-11/20*I + 27/20)], [x == (0.45 - 1.65*I), y
== (11/20*I + 27/20)], [x == (2.14624170747e-08 + 2.50000000895*I), y ==
(-I + 1/2)], [x == (-2.14624155595e-08 + 2.49999999105*I), y == (-I +
1/2)], [x == (-1.22085882983e-09 - 2.49999999706*I), y == (I + 1/2)], [x
== (1.22085741408e-09 - 2.50000000294*I), y == (I + 1/2)], [x ==
0.108848345629, y == 0.064959221634], [x == 2.0690897184, y ==
-0.785458685751], [x == -2.08897196262, y == 0.935164613209], [x ==
(0.00551694210392 + 1.15257220423*I), y == (-0.0573325779446 +
2.78408620946*I)], [x == (0.00551694210392 - 1.15257220423*I), y ==
(-0.0573325779446 - 2.78408620946*I)], [x == (-0.4 + 1.2*I), y == (-3/5*I
- 4/5)], [x == (-0.4 - 1.2*I), y == (3/5*I - 4/5)], [x == -1, y == -2], [x
== 1, y == 3]]
}}}
Breaks with 5.5
{{{
sage: solve([f.gradient()[0]==0,f.gradient()[1]==0],x,y)
[2*(x - 1)*((y + 2)^2 + (x + 1)^2)/(x^2 + y^2 + 1) + 2*(x + 1)*((y - 3)^2
+ (x - 1)^2)/(x^2 + y^2 + 1) - 2*((y + 2)^2 + (x + 1)^2)*((y - 3)^2 + (x -
1)^2)*x/(x^2 + y^2 + 1)^2 == 0, 2*(y - 3)*((y + 2)^2 + (x + 1)^2)/(x^2 +
y^2 + 1) + 2*(y + 2)*((y - 3)^2 + (x - 1)^2)/(x^2 + y^2 + 1) - 2*((y +
2)^2 + (x + 1)^2)*((y - 3)^2 + (x - 1)^2)*y/(x^2 + y^2 + 1)^2 == 0]
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/15499>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.