Complex Results in Mathcad
by Mathcad Staff
|
In Mathcad, certain calculations may result in complex numbers. A complex number in Mathcad is indicated by an "i" following the number. A common example is finding the square root of a negative number. You can calculate this with the square root operator or the exponentiation operator as shown below: |
|
In fact, using the exponentiation operator to find the nth root of a negative number often returns a complex solution, even though a real solution may be present. Consider the cube root of -27: |
|
When there are multiple roots, as is the case here, the exponentiation operator returns the principal value, that is the value with the smallest positive angle with respect to the positive real axis in the complex plane. |
|
Note that the nth root operator always defaults to the positive root, if one is available. (Note the nth root operator is on the Calculator toolbar or type [Ctrl]] [\]. |
|
If there is no real root, the nth root operator defaults to the principal value. |
|
Obviously, the principal value need not be the positive root. Mathcad's arg function can be used to validate this assertion. |
|
returns the principal argument of z between -p and p, including p. |
|
To find all three solutions, including the positive root, you can solve for the roots symbolically. First, set up an equation to solve using any variable and the Boolean equality from the Boolean toolbar or by typing [Ctrl] = | 
|
Next, use the solve keyword from the Symbolic toolbar to find the roots. |
|
Note that Mathcad displays all values simultaneously, both real and complex. |
|
It is also possible to find these roots numerically, using the polyroots function. |
[PRINTER FRIENDLY VERSION]
|