On 2013-02-16, Rupert Swarbrick <rswarbrick at gmail.com> wrote:
> --===============4312626398652341693==
> Content-Type: multipart/signed; boundary="=-=-=";
> micalg=pgp-sha1; protocol="application/pgp-signature"
>
> --=-=-=
> Content-Type: text/plain
>
> 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)
in the first case it returns what looks like nonsense.
Is there any compelling reason for SOLVEX to return []
rather that the noun form?
Dmitrii
>
> 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/
>
> --=-=-=
> Content-Type: application/pgp-signature
>
> --=-=-=--
>
>
> --===============4312626398652341693==
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
> --===============4312626398652341693==--
>
>