Previous Page Next Page Contents

arg -- the argument (polar angle) of a complex number

Introduction

arg(x, y) returns the argument of the complex number with real part x and imaginary part y.

Call(s)

arg(x, y)

Parameters

x, y - arithmetical expressions representing real numbers

Returns

an arithmetical expression.

Overloadable:

x, y

Side Effects

When called with floating point arguments, the function is sensitive to the environment variable DIGITS which determines the numerical working precision.

Related Functions

arctan, Im, Re, rectform

Details

Example 1

We demonstrate some calls with exact and symbolic input data:

>> arg(2, 3), arg(x, 4), arg(4, y), arg(x, y), arg(10, y + PI)
                                    / y \
      arctan(3/2), arg(x, 4), arctan| - |, arg(x, y),
                                    \ 4 /
      
               / y    PI \
         arctan| -- + -- |
               \ 10   10 /
>> arg(x, infinity), arg(-infinity, 3), arg(-infinity, -3)
                                PI
                                --, PI, -PI
                                2

Floating point values are computed for floating point arguments:

>> arg(2.0, 3), arg(2, 3.0), arg(10.0^100, 10.0^(-100))
                   0.9827937233, 0.9827937233, 1.0e-200

Example 2

arg reacts to properties:

>> assume(x > 0): assume(y < 0): arg(x, y)
                                      / y \
                                arctan| - |
                                      \ x /
>> assume(x < 0): assume(y > 0): arg(x, y)
                                        / y \
                             PI + arctan| - |
                                        \ x /
>> assume(x <> 0): arg(x, 3)
                      PI (1 - sign(x))         / 3 \
                      ---------------- + arctan| - |
                             2                 \ x /
>> unassume(x), unassume(y):

Example 3

Certain simplifications may occur in unevaluated calls. In particular, numerical factors are eliminated from the first argument:

>> arg(3*x, 9*y), arg(-12*sqrt(2)*x, 12*y) 
                                             1/2
                       arg(x, 3 y), arg(- x 2   , y)

Example 4

Use rewrite to convert symbolic calls of arg to the logarithmic representation:

>> rewrite(arg(x, y), ln) 
                                /   x + I y    \
                          - I ln| ------------ |
                                \ abs(x + I y) /

Example 5

System functions such as diff, float, limit, or series handle expressions involving arg:

>> diff(arg(x, y), x), float(arg(PI, ln(2)))
                               y
                          - -------, 0.2171564814
                             2    2
                            x  + y
>> limit(arg(x, x^2/(1+x)), x = infinity) 
                                    PI
                                    --
                                    4
>> series(arg(x, x^2), x = 1, 4, Real) 
                                     2          3
           PI   / x       \   (x - 1)    (x - 1)             4
           -- + | - - 1/2 | - -------- + -------- + O((x - 1) )
           4    \ 2       /      4          12

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000