Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to make a substitution-based equation solver?

  1. Aug 3, 2012 #1
    I have a fluid dynamics problem I need to solve. There are 6 equations, and 6 unknowns, but the form of the equations are non-linear. Some unknown variables are not only multiplied by coefficients, but also by other unknown variables. Thus, I can't just do a Gaussian elimination matrix. I'm trying to come up with a way to write a program that uses substitution to solve non-linear algebraic equations. (I'm using Matlab, but I'm also somewhat familiar with Python, if need be).

    My question is this: is this a topic that has a wealth of information on it? Has it been done before, is it common practice? I need to know if I'm reinventing a wheel.

    If I am reinventing the wheel that is a substitution-based equation solver, then does anyone know where I can find, say, a sample code that does this?
  2. jcsd
  3. Aug 3, 2012 #2


    User Avatar
    Science Advisor

  4. Aug 7, 2012 #3
    Hmm. Well, not having maple at hand, I may never know. Anything similar in Matlab? Any way to create a solve function like that one?
  5. Aug 7, 2012 #4


    User Avatar
    Science Advisor

    MATLAB is not like Maple in that Maple is a symbolic platform, where-as MATLAB is more to do with a numerical computational platform.

    You would have to check the libraries for MATLAB to see if they have general multi-equation (systems of equations or inequalities) solver routines. Personally, I think you might have to implement your own routines that do solutions for very specific kinds of relationships (polynomials etc), because again MATLAB is not designed to be a core symbolic computational platform like Maple.

    What you might be able to do is to send commands to the Maple engine to execute and then pipe the results back to MATLAB. You can do this with a bit of programming know how and understanding of calling the Maple Engine, and to be frank, if you need to do this thing a lot for a wide range of functions, this would be the way to go if you have access to Maple already.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - substitution based equation Date
Mathematica Plotting with base 10 as the interval Apr 6, 2017
Using Gambit or a substitute for use with Fluent. Nov 28, 2012
Mathematica: Substituting in for integrand Mar 15, 2012
Substitution in Mathematica Nov 21, 2011
Substitutions with ODE23/45 in MATLAB Oct 5, 2011