Skip to main content
1-Visitor
October 17, 2022
Question

Symbolic solving without using variable numerical values

  • October 17, 2022
  • 1 reply
  • 4382 views

Hello All, I am relatively new to MathCAD and am having an issue developing a set of symbolically solved equations for a system. I have assigned values to the variables however throughout my analysis I would like to solve or simplify equations ONLY symbolically for a particular variable and KEEPING all variables as symbols, NOT replacing them with their numerical values.

Is this possible?

1 reply

25-Diamond I
October 17, 2022

You can accomplish what you want in a couple of ways.

 

1) define the numerical values below the symbolic solve evaluation

 

2) turn the symbolic solve into a function of the variables you assigned a value before

 

3) use clear.sym(<variable list>) to clear the values for symbolic evaluation only

 

Here is a simple example:

Werner_E_0-1666021715877.png

 

1-Visitor
October 17, 2022

Thank you so much for the quick response!

 

These are all great options and if I am not mistaken they all tell me that if I want to solve purely symbolic sets of equations I have to rethink how I set up my document. In other words, I will be going through assembling equations for a variety of components that interact with each other (free body diagrams).  I am going to get some relatively complex algebraic equations that describe the combined behavior. 

 

It seems to me that the best option may be (1), i.e. to avoid assigning all numerical values to parameters and instead create a set of symbolic-only equations? Then once I have the overall solution equations I add the numerical values at the end and solve numerically?

25-Diamond I
October 17, 2022

Option 1) sure is a good choice, but I would recommend nonetheless turning all the calculations into functions depending on the variables you want to set in later - even if you do not intend to vary these variables.

Something like

Werner_E_0-1666032031729.png

Doing so may be troublesome but if you don't, the only way to use the symbolic results you calculated at the top would be to copy and paste the symbolic results which is not desirable and error prone.

In the case of quite elaborate and complicated equations, however, you run the risk of reaching the limits of Prime's capabilities, since the symbolics in Prime is relatively weak, especially compared to Maple or Mathematica.