# finding an argument of a complex number

What is the simplest way to find the argument of the following function? ((1 - E^((I π (1 - α))/(β - α)) z)/(1 - E^(-((I π (1 - α))/(β - α))) z)) as I tried the polar way, but it is so complicated and I didn't reach the result yet.

Thank you.

-
Is z a real or complex number? Same for $\alpha,\,\beta$. –  Jens May 10 '13 at 5:21
z is a complex number while alpha and beta are real numbers . with alpha is less than 1 ,and beta is greater than 1 –  user6921 May 10 '13 at 5:56

## 3 Answers

Here's one path... define your function and translate to trig form:

f[x_, z_] := ExpToTrig[((1 -
E^((I \[Pi] (1 - \[Alpha]))/(\[Beta] - \[Alpha])) z)/(1 -
E^(-((I \[Pi] (1 - \[Alpha]))/(\[Beta] - \[Alpha]))) z))]//.
(\[Pi] (1 - \[Alpha]))/(-\[Alpha] + \[Beta]) -> x


using a replacement of a new real variable x for the more complicated expression involving alphas and betas. This gives f[x,z] as

 (1 - z Cos[x] - I z Sin[x])/(1 - z Cos[x] + I z Sin[x])


Now break this apart so that it has real denominator (using a function from the help files for the Conjugate function)

 toRealDenominator[rat_] :=
With[{c = ComplexExpand[Conjugate[Denominator[rat]]]},
Expand[Numerator[rat] c]/Expand[Denominator[rat] c]]


And so

Simplify[toRealDenominator[f[x, z]]]


gives a complicated expression. But, since we're only interested in the phase, and the denominator is real-valued, we can just use the Numerator. Hence

Simplify[Numerator[toRealDenominator[f[x, z]]]]


gives

(-1 + z Cos[x] + I z Sin[x])^2


Now this is something squared, so the phase is 2 times the phase of that something. Hence

ComplexExpand[-1 + z Cos[x] + I z Sin[x] //. z -> a + b I]


gives the answer

-1 + a Cos[x] - b Sin[x] + I (b Cos[x] + a Sin[x])


For any z (defined via a and b) and any x (defined via alpha and beta) this is a complex number in the form of A + B I and so you can find its phase using Arg or ArcTan.

-
thank you very much .. I will try the both ways. –  user6921 May 10 '13 at 12:24

My idea is first rewriting the complex function to $a+ib$ form then extract the real and imaginary part. So ComplexExpand and Cases is needed. Here is my code

expr = (1 - E^((I \[Pi] (1 - \[Alpha]))/(-\[Alpha] + \[Beta])) z)/(
1 - E^(-((I \[Pi] (1 - \[Alpha]))/(-\[Alpha] + \[Beta]))) z);

newexpr = expr /. z -> (r E^(I \[Theta]));
{realPart, imPart} = First@Cases[ComplexExpand@newexpr, a_ + I b_ :> {a, b}, {0}]


The output is very complicated so I will not post here. Then you can calculate the argument.

-

Assuming you want to express the solution with Re[z] and Im[z], here is a solution :

  ComplexExpand[
Arg[((1 - E^((I \[Pi] (1 - \[Alpha]))/(\[Beta] - \[Alpha])) z)/(1 -
E^(-((I \[Pi] (1 - \[Alpha]))/(\[Beta] - \[Alpha]))) z))], {z},
TargetFunctions -> {Re, Im}] //Simplify


$\text{ArcTan}\left[\frac{1-\text{Cos}\left[\frac{\pi (-2+\alpha +\beta )}{\alpha -\beta }\right] \text{Im}[z]^2+2 \text{Cos}\left[\frac{\pi -\pi \beta }{\alpha -\beta }\right] \text{Re}[z]-\text{Cos}\left[\frac{\pi (-2+\alpha +\beta )}{\alpha -\beta }\right] \text{Re}[z]^2}{1+\text{Im}[z]^2+2 \text{Cos}\left[\frac{\pi -\pi \beta }{\alpha -\beta }\right] \text{Re}[z]+\text{Re}[z]^2-2 \text{Im}[z] \text{Sin}\left[\frac{\pi -\pi \beta }{\alpha -\beta }\right]},-\frac{2 \left(\text{Cos}\left[\frac{\pi -\pi \beta }{\alpha -\beta }\right] \text{Im}[z]^2+\text{Re}[z]+\text{Cos}\left[\frac{\pi -\pi \beta }{\alpha -\beta }\right] \text{Re}[z]^2\right) \text{Sin}\left[\frac{\pi -\pi \beta }{\alpha -\beta }\right]}{1+\text{Im}[z]^2+2 \text{Cos}\left[\frac{\pi -\pi \beta }{\alpha -\beta }\right] \text{Re}[z]+\text{Re}[z]^2-2 \text{Im}[z] \text{Sin}\left[\frac{\pi -\pi \beta }{\alpha -\beta }\right]}\right]$

-