You are here: Home > Working with Complex Numbers in Mathcad
A complex number is an expression of the form |
where x and y are real numbers, and |
For example, the following is a complex number: |
To enter this number, type 2 + 13i in a math region. |
Note: If the coefficient of i in a complex number is 1, you must type 1i when entering the number. Otherwise, Mathcad interprets i as an undefined variable. For example, to enter i itself, type 1i. |
Mathcad does not display the coefficient 1. Note that i is the square root of -1. |
Addition and multiplication of complex numbers is defined as follows: |
For a complex number x + yi, x is called the real part and y is called the imaginary part. The functions Re and Im return the real and imaginary parts, respectively. |
Representing Complex Numbers as Points in the Plane |
You can represent a complex number x + yi as the point (x, y) in the plane. For example, 2 + 3i corresponds to the point (2, 3), as shown in the graph below. |
This representation is useful for visualizing operations such as multiplication on the complex numbers. |
The argument of a complex number z is the angle in radians that the vector corresponding to z makes with the x-axis. The argument, denoted arg(z), is assumed to be between -π and .π |
The function arg returns the argument of z. |
When you multiply two complex numbers, the argument of the product is the sum of their arguments, provided the sum is between -π and -.π For example, |
Since the argument of i is π/2 or 90 degrees, multiplying a complex number by i rotates the corresponding point by 90 degrees in the counter-clockwise direction. |
The magnitude of a complex number is the distance from the point to the origin. You can compute the magnitude using the absolute value operator on the Calculator toolbar. |
The magnitude of the product of two complex numbers is the product of their magnitudes. |
The Complex Exponential Function |
The usual exponential function on the real numbers can be extended to the complex numbers by the following definition. |
When the exponent is purely imaginary – that is, when its real part is 0, this equation becomes |
The magnitude of e^{yi} is |
So e^{yi }corresponds to a point on the unit circle in the complex plane. For example, |
If you square a complex number z on the unit circle, the magnitude is 1, since |
The argument of z^{2} is twice the argument of z, since |
In the complex numbers, the equation |
has n distinct solutions, called the nth roots of unity. These are defined as follows. Let |
α corresponds to the point on the unit circle in the complex plane whose angle is _{}/n. |
Note that α is a solution to the equation |
The nth roots of unity are the numbers |
For example, if n = 3, the cube roots of unity are the numbers |
Since raising αto any power k multiplies the argument of α by k, the powers of α are evenly spaced around the unit circle. The following graph shows the case n = 3. |
Note that each of these numbers is a solution to the equation |
Complex Results and the Principal Value |
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. |
The principal value is not always the positive root. Mathcad’s arg function can be used to validate this assertion. |
returns the principal argument of z between – and , including . |
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. |
Source: PTC Express
Tags: how to calculate magnitude of complex numbers in mathcad, how to enter complex number in mathcad, Mathcad, mathcad complex number, mathcad complex roots, mathcad how do i get arg to return degrees, mathcad only real solutions, mathcad recources centre, mathcad solve complex equations, mathcad tips, pangkat kompleks dalam fungsi variabel kompleks, principal argument of complex number, PTC, Tips
Leave a Reply