On Sun, Dec 21, 2008 at 6:26 PM, evans <ev...@artofproblemsolving.com> wrote:
>
> All these are identical (unless there are typos)...
>
> x^2 + ((2-y)/3)x + 3 = 0
>
> x^2 + (2/3-y/3)x + 3 = 0
>
> x^2 + (\frac{2}{3}-\frac{y}{3}) x + 3 = 0
>
> x^2 + \frac{(2-y)}{3}x + 3 = 0
>
> x^2 + \frac{(2-y)}{3} * x + 3 = 0
>
> 3 + x^2 + \frac{(2-y)}{3}x + 5 = 2
>
> What I need is something that could take any two of these equations
> and tell me if they are equal or not. I could possibly do some LaTeX
> parsing beforehand to make it look like a regular equation if need be.
>
> Note that in the above examples there are differences not only in
> polynomial order, but in the way the fractions are written. Also, the
> above is just one set of equivalent equations. I would need this to
> work with any expression or equation.
>
> I would think something like Sage's api stuff could do something like
> this. However, I don't know how to implement it. I played with Sage
> some, but I could never get it to compare properly. I just kept
> getting syntax errors.
>
> Anyone have any thoughts on how to solve this issue?

The only way to do this is, as you suggest, to write a latex --> sage
parser. This is a subtle thing, since latex is potentially somewhat
ambiguous, since it's output as a mathematical expression is supposed
to be interpreted by a human not a machine.   Anyway, it can surely be
done.   Nobody has done it though, as far as I know.

I've thought about it, since there is a nice jsmath-based equation
editor, and it outputs latex.  To use it to input Sage expressions, we
would need a latex --> sage parser.

 -- William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to