Skip to main content
1-Visitor
December 29, 2016
Solved

Solving a system of 5 equations with 7 variables

  • December 29, 2016
  • 4 replies
  • 13282 views

I find myself constantly using a system of 5 equations with 7 different variables. I always know two of the variables, but the two that I know changes. Is there a way to write a single calculator that can solve for the unknowns instead of writing a different calculator for each combination?

equations:

mt=mf+mw

c=mf/mt

vf=mf/8.34

vw=mw/8.34

vt=vf+vw

Using the solve function only lets me solve for unknowns, so I'd have to rewrite the unknowns each time.

Using the find function requires me to guess, but I don't know how to distinguish from a known and a guess.

I could use if statements, but I'd have to write a huge set of formulas, which isn't ideal.

Any help would be appreciated.

Best answer by LucMeekes

Something like this:

Success!

Luc

4 replies

LucMeekes23-Emerald IVAnswer
23-Emerald IV
December 29, 2016

Something like this:

Success!

Luc

25-Diamond I
December 29, 2016

You can turn Luc's solution into a function with the two conditions (the two known variable values) as arguments.

I add those equations to Luc's EQ and solve this system for all 7 variables, so you always get all 7 variables as result.

Drawback is that you have to evaluate this function symbolically.

24-Ruby IV
December 30, 2016

2 equations, 3 unknowns - my solution

24-Ruby IV
December 30, 2016

By help user function creating and using:

21-Topaz II
December 30, 2016

Hi David,

Here below I give you an example of how to solve a non-normal system:

not normal system.jpg

Greetings FM

25-Diamond I
December 30, 2016

F.M. wrote:

Hi David,

Here below I give you an example of how to solve a non-normal system:

But Davids system is not "non-normal"! He always has a system consisting of 5 equations with 5 unknowns!

Unfortunately, while the 5 equations are always the same, the 5 unknowns vary and can be any of 7 variables - 2 are always known.

As he does not want to create 21 separate solve blocks or symbolic solve statements, he was asking for a more compact solution.

21-Topaz II
December 30, 2016

Hi Werner,

fortunately I have based my answer on the header of the problem providing  a generic  example, but I have not even looked at the given system.

Bye