# A question about the log of a rational function

We have the rational function : $$f(x)=\frac{(1+ix)^{n}-1}{(1-ix)^{n}-1}\;\;\;,\;\;n\in \mathbb{Z}^{+}$$ It's not hard to prove that : $$\frac{(1+ix)^{n}-1}{(1-ix)^{n}-1}=(-1)^{n}\prod_{k=1}^{n-1}\frac{x+i(\xi_{n}^{k}-1)}{x-i(\xi_{n}^{k}-1)}\;\;\;,\;\;\xi_{n}^{k}=e^{2\pi i k/n}$$ Now we want to compute $\log f(x)$ for $x>0$. The logarithm of the individual factors can be written as :

$$\log\left(\frac{x+i(\xi_{n}^{k}-1)}{x-i(\xi_{n}^{k}-1)}\right)=2i\tan^{-1}\left(\frac{x}{1-\xi_{n}^{k}}\right)+i\pi;\;\;\;\;x>0$$ So, one would expect: $$\log f(x)=-i\pi+2i\pi n+2i\sum_{k=1}^{n-1}\tan^{-1}\left(\frac{x}{1-\xi_{n}^{k}}\right)$$ But it looks nothing like what wolframalpha returns. What am i doing wrong here ?

• what does WA return? – tired Jul 26 '16 at 20:51
• Could you provide what wolframalpha returned? Your answer might actually be the same, but we don't know what we're comparing to, to answer the question. – Simply Beautiful Art Jul 26 '16 at 20:52
• Does $\tan^{-1}=\cot\text{ or }\arctan$? – Simply Beautiful Art Jul 26 '16 at 20:53
• $\tan^{-1}$ is $\arctan$ – Mohammad Al Jamal Jul 27 '16 at 5:29
• WF returns the difference as a sum of step functions linkl – Mohammad Al Jamal Jul 27 '16 at 6:30

I think that, if you use the standard branch of $\log$ used by Wolfram Alpha, your third identity should read:
$$\log\left(\frac{x+i(\xi_{n}^{k}-1)}{x-i(\xi_{n}^{k}-1)}\right)=2i\tan^{-1}\left(\frac{x}{1-\xi_{n}^{k}}\right)-\pi i,\quad x>0.$$
You are using a branch of the logarithm, so in general it is not true that $\log (ab) = \log(a) + \log(b)$. You can check that the difference between the corrected expression $$\log f(x)=-\pi(n-1)i + 2i\sum_{k=1}^{n-1}\tan^{-1}\left(\frac{x}{1-\xi_{n}^{k}}\right),$$ and the original $\log f(x)$ is a multiple of $\pi$.
• Like I said, $\log(ab) \ne \log(a) + \log(b)$, for example $\log(e^{\pi i} \cdot e^{\pi i}) = 0$, and $\log(e^{\pi i}) = \pi i$. So the difference in general is going to be a multiple of $\pi i$. – sometempname Jul 31 '16 at 9:08
• i understand that. but what are the points at which there is a step difference by a multiple of $\pi i$ – Mohammad Al Jamal Jul 31 '16 at 9:52
• The jumps are at the points where the sum is equal to a multiple of $\pi i$. – sometempname Aug 2 '16 at 21:30