- Arg (mathematics)
In
mathematics the arg function is a logical function that extracts the angular component of acomplex number or function.An alternative definition is available atComplex argument (continued fraction) . The essential difference is the treatment of arg("0" + "i0").] The angular component is also referred to as the "argument". Forreal numbers "x" and "y", arg("x" + "iy") is equivalent to a function used in three computer languages calledatan2 ("y", "x"), which is constrained to the range (−π, π] . That is, for "y" ≠ 0::arg(x+iy) = egin{cases}phicdot sgn(y) & qquad x > 0 \frac{pi}{2}cdot sgn(y) & qquad x = 0 \(pi - phi)cdot sgn(y) & qquad x < 0 \end{cases}
where phi, is the angle in [0,π/2) such that: an(phi) = left| frac{y}{x} ight|., And sgn is the
sign function .And:
:arg(x+i0) = egin{cases}0 & qquad x > 0 \ ext{undefined} & qquad x = 0 \pi & qquad x < 0 \end{cases}
This produces results in the range (−π, π] , which can be mapped to
[ 0, 2π) by adding 2π to the negative values.arg is also used less formally to represent an unconstrained angle. For instance, when:
* phi(t), is a continuous function of time (such as omega t),,
* and z(t) = r,mathrm{e}^{i phi(t)}, (called "exponential" form),
* or z(t) = r,(cos phi(t) + isin phi(t)), (called "trigonometric" form),arg("z"("t")) often denotes the continuous function, phi(t).,Alternative implementation
If r = sqrt{x^2+y^2} is readily available, a potentially simpler implementation of arg("x" + "iy") is also available.
For "y" ≠ 0:
:arg(x + iy) = heta cdot sgn(y),,
where heta, is the angle in [0,π) such that: cos( heta) = frac{x}{r}.,
And arg(x+i0), is defined as before.
arg(0 + i 0)
When x and y are both zero, r = 0,, and any angle phi, satisfies:
Therefore, arg(0 + "i" 0) is sometimes defined as 0, for the sake of uniqueness. However, solving EquationNote|Eq.1 for phi, gives:
:arg(x + iy) = phi = -ilog_efrac{x+iy}{r}, , which is indeterminate/undefined when r=0. In this viewpoint, arg("x" + "i y") is not necessarily perceived as an angle.
Arg of rational complex numbers
If z1 and z2≠0 are two complex numbers then:
:argleft(frac{z_1}{z_2} ight) = [ arg(z_1) - arg(z_2) ] _{mod 2pi}.
E.g.::argleft(frac{-1-i}{i} ight) = arg(-1-i) - arg(i) = -frac{3pi}{4} - frac{pi}{2} = -frac{5pi}{4} stackrel{mod 2pi}{longrightarrow}quad frac{3pi}{4}.
Notes
External links
*MathWorld|title=ComplexArgument|urlname=ComplexArgument
Wikimedia Foundation. 2010.