# Why does $\arctan(x)= \frac{1}{2i}\log \left( \frac{x-i}{x+i}\right)+k$?

Letting $x=\tan(u)$, $$\int\frac{1}{1+x^2} \, dx=\int\frac{1}{1+\tan(u)^2}\sec^2(u) \, du=u+k=\arctan(x)+k$$ Also, $$\int\frac{1}{1+x^2} \, dx=\int\frac{1}{(x-i)(x+i)} \, dx=\frac{1}{2i}\int\frac{1}{(x-i)}-\frac{1}{(x+i)} \, dx$$ $$=\frac{1}{2i}\left(\ln(x-i)-\ln(x+i)\right)+c$$ $$=\frac{1}{2i}\ln \left(\frac{x-i}{x+i} \right)+c$$ Giving $$\arctan(x)=\frac{1}{2i}\ln \left(\frac{x-i}{x+i} \right)+q$$

Why is this correct? What is the nature of $q$ (is it 'flexible' so the equality doesn't really mean much)?

I think it probably has something to do with the relationship between $\log(z)$ and $\arg(z)$, but $\arg(z\pm i)$ is hard to calculate neatly.

• $e^{iz} = \cos z+i\sin z$. I've posted a fairly short argument based on that. Jun 7 '13 at 22:29
• It would be a nice exercise to plug in x = 1 on both sides of that equation. arctan(1) is ofcourse a well known value. Try to get that value from the right side too... Jun 7 '13 at 23:16
• Are there typos in the u-substitution? Jun 7 '13 at 23:52
• Don't think so, what would be incorrect? Jun 8 '13 at 0:15
• Well. I'm seeing x replaced with tan(x), and not all the x's substituted out of the integrand. Jun 8 '13 at 0:58

The basic identity used here was discovered in the 18th century by Leonhard Euler: $$e^{iz} = \cos z+i\sin z$$ where of course the cosine and the sine are of $$x$$ in radians.

It follows that $$\cos z = \dfrac{e^{iz}+e^{-iz}}{2}$$ and $$\sin z = \dfrac{e^{iz}-e^{-iz}}{2i}$$.

Therefore $$a= \tan z = \frac{e^{iz}-e^{-iz}}{i(e^{iz}+e^{-iz})} = -i\frac{e^{2iz}-1}{e^{2iz}+1} = -i\frac{b-1}{b+1}.$$ \begin{align} a & = -i\frac{b-1}{b+1} \\[10pt] (b+1)a & = -i(b-1) \\[10pt] b(i+a) & = i-a \\[10pt] b & = \frac{i-a}{i+a} \\[10pt] e^{2iz} & = \frac{i-a}{i+a} \\[10pt] 2iz & = \log \frac{i-a}{i+a} \end{align} The logarithm, like the arctangent, is "multiple-valued".

• Thank you, it's nice to have things explicitly stated from the basics.
– Meow
Jun 7 '13 at 22:33

We have that $$i\sin z=\sinh iz$$ $$\cos z=\cosh iz$$

This means that $$i\tan z=\tanh iz$$

But $$\tanh^{-1}z=\frac 1 2\log\left(\frac{1+z}{1-z}\right)$$

• Does that definition for $\tanh^{-1}(z)$ come from $\tanh(z)= \frac{e^z-e^{-z}}{e^z+e^{-z}}$? That's the problem I was having.
– Meow
Jun 7 '13 at 22:10
• @Alyosha Yes. Actually, it is easier yo use $$\tanh z=\frac{e^{2z}-1}{e^{2z}+1}$$ to find the inverse. Jun 7 '13 at 22:11

This is correct, and by letting $x$ tend to $+\infty$ you can find the constant term: $$\arctan(x) = \frac{1}{2i} \log(\frac{x-i}{x+i}) + \frac{\pi}{2},$$ since $\log(\frac{x-i}{x+i})$ tends to $\log(1) = 0$ and $\arctan(x)$ tends to $\pi / 2$.

This is valid for $x > 0$. Unfortunately, there is a difficulty with the $\log$ function at $-1$, and for $x < 0$ we get the formula $$\arctan(x) = \frac{1}{2i} \log(\frac{x-i}{x+i}) - \frac{\pi}{2}$$ by a similar argument.

That the logarithm and inverse trigonometric functions are related shouldn't be surprising, though. Remember Euler's formula: $e^{ix} = \cos(x) + i \sin(x)$ that relates the exponential to the trigonometric functions.

• Surely the logarithmic term will be multivalued? Or this covered by the fact the inverse tangent is also multivalued? (Infact, now I think about it, it is indeed) Jun 7 '13 at 22:04
• @AndrewD You're right, both are multivalued, but unfortunately not in quite the same way Jun 7 '13 at 22:17