-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Solving multivariate equations #218
Comments
Thanks. Yes, solving equations would be awesome. It is ok with you to mark this issue as a duplicate of #38 and continue any discussion there? |
Thanks, I'll reply on that ticket. |
(Tried to mark as duplicate. I think you need to be a project owner) |
DavidDoesDev: Just to make sure – this request is not restricted to solving systems of linear equations? (Sorry for continuing the discussion on this closed thread – this question didn't seem appropriate in issue #38.) |
(No worries.) My math skills are pretty rudimentary, so please ask me a different way if I don't totally answer your question. You're asking if exponential and other equation types of equations should be included? Ideally, for sure. Solving for multivariate linear equations alone would still be useful, though. But, I think at some point you're gonna wish you had the full functionality. My main use case for this feature is in balancing chemical formulas, which often go into that hairy territory. I'm sure there are other use cases too. I like this guy's implementation a lot. See this for a little more depth on the feature I'm talking about: http://www.aaron-powell.com/posts/2013-01-22-hello-mathy.html |
DavidDoesDev: Sorry for using geeky lingo in my question. What I really wanted to ask is this. 3x – 2y + 1.9z + … + 6w = 22 …and so on? (Exactly one constant coefficient for each variable, and only sums. The number of equations must also match the number of unknowns.) Your example is close to this, but the last equation has a 3/x term which spoils things. If this is the case, there is a straight-forward way of solving the equations by using matrices (which mathsj already handles). Let me know if this would be useful, and I'll summarize the method. |
Thanks, yeah, I think that would handle my immediate needs. |
Hi Sorry for the late reply. I started writing up something about how to solve systems of equations using matrices, but then I realized that others have done this in a much better way already. Here's a page that covers it quite nicely: I have a weak spot for Khan Academy, and here's a video where Salman Khan (eventually) solves systems of equations using matrices: The syntax for using matrices in mathjs is I hope that helps! |
Amazing! I think that would absolutely work! My equations are slightly more complicated, though. How would you approach something like this? I think this is still the same coefficient situation as your example, but there are 2 important gotchas:
This is a pretty typical example of what my application would need to solve. There might be more ingredients or groupings, but the structure of the equation will be like this pretty much always. You wouldn't know of a super helpful video for this (for dummies), would you? Infinite thanks! |
I guess you could rewrite If you have two variables which have a static ratio (like |
Many thanks |
Hi. This library looks amazing! Thanks for making it. Pardon my simpleness, but I couldn't figure this out with the docs—are you able to solve for multivariate equations in mathjs at this point? Something along these lines?
I'm writing a program which may need to solve about 50 interrelated variables. A library that could handle that would be a lifesaver!
The text was updated successfully, but these errors were encountered: