0

i know that $\int{\frac{1}{1+x²}dx}=\arctan(x)$ but a colleague showed me that we can do this trick : $$\int{\frac{1}{1+x²}dx}=\int{\frac{1}{(x+i)(x-i)}dx} =\frac{1}{2}i\int{\frac{1}{x+i}}dx-\frac{1}{2}i\int{\frac{1}{(x-i)}dx}$$ then we find the following: $\int{\frac{1}{1+x²}}dx=\frac{1}{2}i\log\frac{x+i}{x-i}$ so does this mean that $\arctan(x)=\frac{1}{2}i\log\frac{x+i}{x-i}$ when $x \in [-1,1]$ ?

J. W. Tanner
  • 60,406
  • 2
    See this https://math.stackexchange.com/questions/1102389/arctan-in-complex-logarithm-form – Guillermo García Sáez Jul 09 '23 at 16:52
  • Yes, the formula is correct. – TheSilverDoe Jul 09 '23 at 16:52
  • 2
    They could differ by a constant – J. W. Tanner Jul 09 '23 at 16:53
  • 1
    Any antiderivative (if it exists) has at least an infinite family of answers, hence $+C$. When it comes to trig functions this means that antiderivatives can look very formally different, since constant factors are the difference between one trig function and another (or some expression involving exponentials or logs). In this case, you are right up to a constant, because on the complex plane $\log$ is only defined locally up to a constant multiple of $2\pi i$ (which constant determines your "branch cut"). – Charles Hudgins Jul 09 '23 at 16:56
  • 1
    This is, in my opinion, a duplicate of https://math.stackexchange.com/q/3453558/ . – Xander Henderson Jul 09 '23 at 18:18

3 Answers3

3

$$\arctan(x)=\frac{1}{2}i\log\frac{x+i}{x-i}+C$$ $$ C=\arctan(0)-\frac{1}{2}i\log(-1)=0-\frac{1}{2}i^2\pi=\frac{\pi}{2} $$

Finally: $$\arctan(x)=\frac{1}{2}i\log\frac{x+i}{x-i}+\frac{\pi}{2}$$

Mostafa
  • 1,479
  • 14
2

Given $y=\arctan x$ we have $x = \tan y$ so $$ x=\frac{e^{iy}-e^{-iy}}{i(e^{iy}+e^{-iy})} . $$ We may solve this to get $$ e^{2 i y} = \frac{i-x}{i+x} , \\ y = \frac{i}{2}\log\frac{x+i}{x-i} + C $$ for some $C$. As noted in a comment: both $\arctan$ and $\log$ are multi-valued complex functions; so the constant $C$ may depend on the branches chosen.


For fun, try to write $\arcsin y$ in terms of complex numbers and logarithms.

GEdgar
  • 111,679
  • I think it's $e^{2iy}=\dfrac{i-x}{i+x}$. Moreover this equation has infinitely many solutions, differing by $\pi$, so we need some more work. For instance for $x\to+\infty$ we know $\arctan x\to\pi/2$. – Jean-Claude Arbaut Jul 09 '23 at 18:20
0

Actually, the two answers are equivalent (up to a constant). The second one can be rewritten as $-i\,\mathrm{arctanh}\,ix $. Yet, trigonometric and hyperbolic functions are related such that $\tan x = -i\tanh ix$, hence the said equivalence.

Abezhiko
  • 8,153