Skip to main content
1-Visitor
April 23, 2015
Solved

Simplifying Algebraic Expressions with variables

  • April 23, 2015
  • 5 replies
  • 3047 views

hi

im very new to this mathcad programming stuff.

What im trying to do is since im working on a proyect in which i have to program complex equations im trying to use mathcad to simplyfy those equations for me and just programming the most simple expression with all variables so that the user can input those values.Maybe im doing something wroing, i dont know. I've looked through the forums and still not able to find a solution, if it is already posted somewhere else i would appreciate the link, or an answer to my problem.

sorry if there is any grammar fail, English is not my native language.

Regards

Best answer by RichardJ

Mathcad has two processing engines for doing math: numeric and symbolic. Numeric math assigns numeric values to variables using the numeric assignment operator, which is typed as ":", and appears as ":=". If you have r1:=r1 the numeric processor flags an error because it cannot assign a numeric value to the variable on the left of the assignment operator, because r1 on the right of the assignment operator has no numeric value assigned to it. If instead you have

r1:=10

r1:=r1*10

Then you will get no error. You can look at the numeric value assigned to r1 by using the numeric evaluation operator, which is typed as "=" and appears the same way. You would see

r1=100.

Symbolic math is completely different. The symbolic math engine rearranges math expressions, and does not care if a variable has an assigned numeric value. It does not even care if it is using a variable for which the numeric math engine has flagged an error. For both the numeric and symbolic engines your definitions r1:=r1, w1:=w1, and w2:=w2 do nothing. If you delete them you will get exactly the same results. Your definition Delta_w:=w2-w1 shows an error from the numeric engine because w1 and w2 have no numeric values assigned to them. The symbolic processor does not care though, and will use that definition in a subsequent symbolic evaluation (right arrow operator).

5 replies

19-Tanzanite
April 23, 2015

You have undefined variables (i.e. numerically undefined), so you can't have the numeric assignment on the left.

1-Visitor
April 24, 2015

thank you very much for your response, ill try to practice applying your corrections.