How to make a substitution-based equation solver?

  • Thread starter Thread starter OffTheRecord
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the challenge of solving a system of non-linear algebraic equations in fluid dynamics using substitution methods. Participants explore the feasibility of implementing such a solver in programming environments like Matlab and Python, and inquire about existing resources or examples.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes a fluid dynamics problem involving 6 non-linear equations with 6 unknowns, expressing the need for a substitution-based solver and questioning the availability of existing resources.
  • Another participant suggests a Maple resource for solving systems of equations, indicating that it may not be directly applicable to Matlab.
  • A participant expresses uncertainty about the availability of similar functionality in Matlab and seeks alternatives.
  • It is noted that Matlab is primarily a numerical computational platform, contrasting it with Maple's symbolic capabilities, and suggests that custom routines may be necessary for specific types of equations.
  • One participant proposes the idea of interfacing Matlab with the Maple engine to leverage its symbolic solving capabilities, contingent on having access to Maple.

Areas of Agreement / Disagreement

Participants generally agree that Matlab and Maple serve different purposes, with no consensus on the best approach to implement a substitution-based solver in Matlab. The discussion remains unresolved regarding the existence of a ready-made solution or the best method to proceed.

Contextual Notes

Participants express uncertainty about the capabilities of Matlab in handling non-linear systems and the potential need for custom implementations. There are also limitations regarding access to Maple and the specific types of equations being addressed.

Who May Find This Useful

This discussion may be useful for individuals working on fluid dynamics problems, those interested in numerical and symbolic computation, and programmers looking for methods to solve non-linear algebraic equations.

OffTheRecord
Messages
17
Reaction score
0
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?
 
Physics news on Phys.org
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?
 
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.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 28 ·
Replies
28
Views
2K
  • · Replies 16 ·
Replies
16
Views
4K
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K