Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for solving multivariate equations #130

Open
tkosan opened this issue Feb 18, 2017 · 5 comments
Open

Support for solving multivariate equations #130

tkosan opened this issue Feb 18, 2017 · 5 comments

Comments

@tkosan
Copy link
Contributor

tkosan commented Feb 18, 2017

This is blocked on #128 (new parser) because it depends on how we parse equations.

I have been working on giving mathsteps the ability to solve multivariate equations as the first phase of giving it the ability to solve simultaneous equations. The following file shows what I have working so far:

solving_multivariate_equations_test.v.01.txt

Each of the equations in this document (which came from the list of problems Ahmed posted in
issue #96) was solved with mathsteps and with MathPiper's conventional solver. Their results were then checked to make sure they were equivalent. If these tests look okay, I will submit a pull request that contains this multivariate solving capability.

@kevinbarabash
Copy link
Contributor

@tkosan cool stuff. It's interesting looking at the different forms of the solutions. I like how MathPiper puts the x term first, but mathsteps definitely provides much simpler solutions in general, e.g.

solveEquation("2*x + 2*y = 15", "y")
  MathSteps: y = 15/2 - x
  MathPiper: y == (-2*x + 15)/2
  Equivalent: True

@tkosan
Copy link
Contributor Author

tkosan commented Feb 18, 2017

MathPiper's conventional equation solver can be configured to return results in different forms:

In> Solve(MathParse("2*x + 2*y = 15"), y, Rational:True, AllFac:False)
Result: [y == -x + 15/2]

@evykassirer
Copy link
Contributor

cool! would love to see the code for this 😄 and what the steps along the way look like

side note: your equivalent function would be very helpful for #132 - would you up for adding that to mathsteps too?

@tkosan
Copy link
Contributor Author

tkosan commented Feb 20, 2017

I will create a pull request for the multivariate support I am working on after the parser has been changed from mathjs to math-parser.

@evykassirer
Copy link
Contributor

Sounds good, I'll prioritize that then. Depending on how similar the trees can be, it might take a few weeks to move everything over. I'll ping Kevin to clarify next steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants