### The Maxima on-line user's manual

Algebra Calculator

#### Carg

Function: carg (<z>) Returns the complex argument of <z>. The complex argument is an angle theta in (-%pi, %pi] such that r exp (theta %i) = <z> where r is the magnitude of <z>.

carg is a computational function, not a simplifying function.

carg ignores the declaration declare (<x>, complex), and treats <x> as a real variable. This is a bug. See also abs (complex magnitude), polarform, rectform, realpart, and imagpart.

Examples:

(%i1) carg (1);
(%o1)                           0
(%i2) carg (1 + %i);
%pi
(%o2)                          ---
4
(%i3) carg (exp (%i));
(%o3)                           1
(%i4) carg (exp (%pi * %i));
(%o4)                          %pi
(%i5) carg (exp (3/2 * %pi * %i));
%pi
(%o5)                         - ---
2
(%i6) carg (17 * exp (2 * %i));
(%o6)                           2

(%o1)                                true
(%i2)

### Related Examples

##### carg-realpart-solve-sqrt

eq1: carg( 200/((1 + ...

eq2: impart(200/((1 +...

solve(eq1, w);

Calculate

##### carg-float

float(carg(2+i*3));

Calculate

##### carg-linsolve-pi-plot2d-rhs

eq1: Vint=-Iint/(s*C);

eq2: Iint=k*Iin;

eq3: Iin=Vin/30000 + ...

Calculate

##### carg-float

float(carg(2+i*3));

Calculate

carg(3+%i);

Calculate

##### carg-imagpart-realpart-sqrt

a:realpart(((1-(%i)*s...

b:imagpart(((1-(%i)*s...

sqrt((a^2)+(b^2));

Calculate

##### carg

mnewton([carg(0.4*(%i...

Calculate

##### carg-linsolve

Z: %i*L*w + -%i/(C*w)...

eq: carg(Z) = %pi/4;

linsolve([eq],[w]);

Calculate

realpart(((1-(%i)*sqr...

a:%;

imagpart(((1-(%i)*sqr...

Calculate

##### carg

carg((3^(3/2)/2)+(3*i...

Calculate