Open 9dd22736-ae7b-4fcc-871e-f43b962cbafd opened 14 years ago
Changed author from Alexandre Casamayou to none
What is the expected improvement in this ticket?
The solve()
function in Sage is just a wrapper around maxima for now. In this case we just return the result from maxima.
There are two problems here:
If this ticket is about improving the capabilities of solve to handle the given input properly, this is an enhancement request. Do we know of any algorithm that will help with this?
Otherwise, this ticket is a duplicate of #2617.
Comments?
the issue here is not only that Sage returns undefined points (which indeed duplicates #2617) but that it fails to find the following (trivial) solutions, which is a defect:
sage: sys=[diff(f(x,y), x), diff(f(x,y), y)]
sage: map(lambda s: s.subs(x=0,y=1),sys)
[0, 0]
sage: map(lambda s: s.subs(x=0,y=-1),sys)
[0, 0]
sage: map(lambda s: s.subs(x=1/e,y=0),sys)
[0, 0]
sage: map(lambda s: s.subs(x=-1/e,y=0),sys)
[0, 0]
For example Maple finds:
> f := (x,y) -> (x^2 + y^2)^x:
> solve({diff(f(x,y), x), diff(f(x,y), y)}, {x, y}, Explicit=true);
exp(1) exp(1)
{x = 0, y = 1}, {x = 0, y = -1}, {x = - ------, y = 0}, {x = ------, y = 0}
exp(2) exp(2)
When some solutions are lost, at least a warning should be issued.
Replying to @zimmermann6:
the issue here is not only that Sage returns undefined points (which indeed duplicates #2617) but that it fails to find the following (trivial) solutions, which is a defect:
Upstream: Reported upstream. Little or no feedback.
Maxima 5.23.2 http://maxima.sourceforge.net
using Lisp ECL 11.1.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) solve([(2*x^2/(x^2 + y^2) + log(x^2 + y^2))*(x^2 + y^2)^x,2*x*y*(x^2 + y^2)^(x - 1)],[x,y]);
(%o1) [[x = 0, y = 0]]
So still present in 4.7.alpha1.
This is a pretty straightforward Maxima bug/enhancement need.
The issue about it not being a critical point is irrelevant, since this is exactly equivalent to the uninterpreted
solve([(2*x^2/(x^2 + y^2) + log(x^2 + y^2))*(x^2 + y^2)^x,2*x*y*(x^2 + y^2)^(x - 1)],[x,y])
So the relevant problem is that it's returning something not in the domain of the functions in question, which is indeed a problem. In addition to not finding other solutions.
This is now Maxima bug 3216684.
Stopgaps: #12730
Changed upstream from Reported upstream. Little or no feedback. to Reported upstream. No feedback yet.
Just a random comment: sympy can solve this. I tested it in the 'live shell' in their webpage:
solve([(x**2 + y**2)**x*(2*x**2/(x**2 + y**2) + log(x**2 + y**2)),2*(x**2 + y**2)**(x - 1)*x*y],x,y)
[(0,−1),(0,1),(−1/e,0),(1/e,0)]
(I edited the output because copy&paste mangled it).
It would be nice to have an 'algorithm=sympy' option to solve(). It seems that nobody is working in the Maxima bug.
We search the critical points of the function x|-> (x2 + y2)^x
This function has four critical points : ±(0,1) and ±(1/e,0)
However the function solve can not find any of this.
More, solve returns (0,0) which is not a critical point since f is not differentiable at (0,0) !
Upstream: Reported upstream. No feedback yet.
CC: @kcrisman @robert-marik @jasongrout
Component: calculus
Keywords: solve
Stopgaps: #12730
Issue created by migration from https://trac.sagemath.org/ticket/8862