Symbolics > The Symbolic Engine
The Symbolic Engine
In addition to performing numerical calculations with PTC Mathcad, you can also perform operations on symbolic expressions that contain variables or mathematical symbols. PTC Mathcad returns the results in symbolic form.
Symbolic evaluation of functions is not supported inside solve blocks.
In symbolic calculation, expressions are evaluated using the symbolic evaluation operator → rather than the numerical evaluation operator =. You can evaluate all of the standard PTC Mathcad operators and many built-in functions symbolically.
The benefits of using symbolic evaluation of expressions follow:
Unlike the numerical evaluation, with symbolics you can evaluate expressions without assigning values to variables.
Symbolic results can reveal relationships among variables that might not be apparent from numerical results.
Symbolic calculations are immune to the round-off errors that are inherent in numerical calculations.
Examples
Following are some examples of symbolic calculation:
Click to copy this expression
Click to copy this expression
Click to copy this expression
Comparing Symbolic with Arithmetic Results
Evaluating an expression symbolically can be more accurate than evaluating the same expression with the equal sign. The difference is illustrated in the following two examples:
Approximation of fraction addition:
Click to copy this expression
Click to copy this expression
The first result, which is evaluated with the equal sign, is a numerical approximation of the result of adding the two fractions. The number of displayed digits is dependent on the current setting of Display Precision. The second result, which is evaluated with the symbolic evaluation operator, is exact. While the difference in this case is insignificant, in other problems, symbolic results can be substantially more accurate than results evaluated with the equal sign.
Approximation of built-in constants:
Click to copy this expression
Click to copy this expression
In PTC Mathcad, the constant π is an approximation to π and not its exact value.Therefore, the numeric evaluation of sin(π) is using that approximation and the result is, in fact, its sin.That isn’t a bug in sin, it’s an artifact of what happens when you approximate a real number.
Units in Symbolic Calculation
In symbolic calculation, PTC Mathcad treats units as undefined variable names. It does not combine units of the same quantity unless they are the same unit.
Click to copy this expression
Click to copy this expression
Was this helpful?