cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Solve - Defined Variables

JT_10720159
2-Explorer

Solve - Defined Variables

Hi all,

 

This may be a silly question but I'm just getting started with Mathcad (Prime 9.0) and learning the ropes.

 

In the attached spreadsheet I can't seem to use the solve function to find RB with predefined variables in the equation. If I manually input all the variables into the equation the solve function works but if I leave it as I have it, it does not.

 

Am I doing something wrong or can you just not use pre-defined variables?

 

Thanks,

James

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:JT_10720159)

You have to know that the engine to do the symbolic calculations like "solve" is nothing native to Prime. This engine does not know  anything about units and treats them as unknown variables. Furthermore units are not always seen as units in symbolic calculations as you can see in the results you get that not all units are displayed in blue.

It often helps to turn on "Units/Constants in Symbolics" in the Calc options

Werner_E_0-1698337401776.png

As the screenshot shows it actually helps in your case and its a good idea to turn on this option by default.

But the symbolics still don't understand units. Lets display w in N/m instead of kN/m

Werner_E_1-1698337552811.png

The symbolics does not know that kN=10^3 N and treats kN and N as two different variables and so can't simplify it result any further.

But R.B and R.A still can displayed using numeric evaluation

Werner_E_2-1698337667924.png

Using numeric evaluation also allows you to change der default unit N to kN, something you can't do in symbolic results.

 

But as a rule you should only use the symbolics if you need a symbolic, non-numeric result.

For numeric result its better to use Primes native numeric methods. These are a solve block with "find" or the "root" function.

You can use the root function in two ways - either provide a range within the solution should be found (I show this for R.B) or you provide a guess value (as shown for R.A).

Werner_E_3-1698337989490.png

 

I usually prefer the root function over the solve block because a solve block looks ugly and unnatural and takes up a lot of space. I use a solve block with "find" if there are additional constraints which have to be considered.

Nonetheless here a solve block for R.B (you must always provide a start/guess value)

Werner_E_4-1698338396392.png

 

 

View solution in original post

3 REPLIES 3
Werner_E
25-Diamond I
(To:JT_10720159)

You have to know that the engine to do the symbolic calculations like "solve" is nothing native to Prime. This engine does not know  anything about units and treats them as unknown variables. Furthermore units are not always seen as units in symbolic calculations as you can see in the results you get that not all units are displayed in blue.

It often helps to turn on "Units/Constants in Symbolics" in the Calc options

Werner_E_0-1698337401776.png

As the screenshot shows it actually helps in your case and its a good idea to turn on this option by default.

But the symbolics still don't understand units. Lets display w in N/m instead of kN/m

Werner_E_1-1698337552811.png

The symbolics does not know that kN=10^3 N and treats kN and N as two different variables and so can't simplify it result any further.

But R.B and R.A still can displayed using numeric evaluation

Werner_E_2-1698337667924.png

Using numeric evaluation also allows you to change der default unit N to kN, something you can't do in symbolic results.

 

But as a rule you should only use the symbolics if you need a symbolic, non-numeric result.

For numeric result its better to use Primes native numeric methods. These are a solve block with "find" or the "root" function.

You can use the root function in two ways - either provide a range within the solution should be found (I show this for R.B) or you provide a guess value (as shown for R.A).

Werner_E_3-1698337989490.png

 

I usually prefer the root function over the solve block because a solve block looks ugly and unnatural and takes up a lot of space. I use a solve block with "find" if there are additional constraints which have to be considered.

Nonetheless here a solve block for R.B (you must always provide a start/guess value)

Werner_E_4-1698338396392.png

 

 

Amazing! Thank you so much for taking the time to write such a comprehensive explanation / solution.

Werner_E
25-Diamond I
(To:JT_10720159)

Here as an example how to use the symbolic engine for symbolic results.

The symbolic is used either before the variables are defined or you use clear.sym(...) to make the variables unknown to the symbolics.

You let the symbolic engine symbolically solve for R.B and assign the result to a function with all needed variables as arguments.

Now you can use this function to calculate R.B for different sets of input values

Werner_E_0-1698339024922.png

 

Announcements

Top Tags