[Maxima] Declarations - how to compare two equations?
macrakis at alum.mit.edu
Mon Jan 23 11:41:47 CST 2012
Though this is a good approach for equivalence of *expressions*, I don't
think it works well for equations, even for simple cases. The
equations* a*= 1, 200*
*a *= 200, *a* + 37 = 38, and (a-1)^201 = 0 all have the same solution set,
but LHS-RHS and LHS/RHS are different for all *a* <> 1. Even if you happen
to test the a=1 case, you still don't know that the solution sets are the
same. Of course, it is much worse in the multivariate case.
On Sun, Jan 22, 2012 at 14:56, Richard Fateman <fateman at eecs.berkeley.edu>wrote:
> On 1/22/2012 11:22 AM, Gerd Kortemeyer wrote:
>> . Is there any better way to compare two equations (that LON-CAPA does
>> not "know" the first thing about) inside MAXIMA, and if not, how could I
>> begin to address the issue? Thanks! - Gerd.
> say that you want to tell if A=B and C=D express the same truth.
> let e1 = A-B and e2= C-D.
> let X=[x1,x2,...,xn] be the set of variables that occur in e1 and e2.
> Choose n random floating point numbers for x1, ..., xn, and evaluate e1
> and e2.
> If the results are the same, approximately, then you say "yes".
> This can also be done with values chosen from a finite field, followed by
> evaluation using modular arithmetic. This is called hash-coding of
> The results would be identical.
> Details to consider:
> how many times to repeat the test.
> what to do with overflow, underflow, divide by zero.
> how close is equal.
> These ideas are not original with me, but (especially) the floating point
> has been proposed and maybe used in student test grading.
> Maxima mailing list
> Maxima at math.utexas.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Maxima