Rupert Swarbrick | 16 Feb 17:05 2013
Picon

Bug 2546: Solve with duplicate equations

A few days ago, bug 2546 was filed [1], describing slightly inconsistent
behaviour of solve() when given duplicate equations. Transcript:

  (%i1) solve([sin(x)=cos(x), sin(x)=cos(x)],x);
  (%o1) []

  (%i2) solve([sin(x)=cos(x)],x);
  (%o2) [sin(x) = cos(x)]

(solve() doesn't actually return anything helpful in either case, but
 that's not really what the bug is about)

What's going on is that $SOLVE calls either SSOLVE (for a single
equation) or SOLVEX (for multiple equations). When they can't find any
useful solution, their behaviour is different.

We could insert a call to REMOVE-DUPLICATES on the equation list before
deciding what to do, but I think this would be fooled by pretty
obviously identical equations (eg. x+y and y+x are different; x*(1+x)
and x+x^2 are different...). I'm not sure whether it makes much sense to
try and do anything cleverer - calling expand on the equations might be
a bit bonkers...

So, in my opinion, this isn't really a bug. The weird behaviour is that
SSOLVE returns a sort of partial result when it gets stuck and SOLVEX
returns an empty list. Weirdness like this is why I don't call solve()
in scripts and instead rely on eg. algsys() where at least I know what
I'll get if it fails.

Does anyone have strong feelings here? Otherwise, I'll close the bug as
wontfix (or more like "wontfix any time soon, sorry").

Rupert

[1] https://sourceforge.net/p/maxima/bugs/2546/
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima

Gmane