Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In a table of integrals, I see the following two formulas:

$\int \frac{dx}{(a+x)(b+x)} = \frac{1}{b-a}\ln\frac{a+x}{b+x}$, and $\int \frac{dx}{ax^2+bx+c} = \frac{2}{\sqrt{4ac-b^2}}\tan^{-1}\frac{2ax+b}{\sqrt{4ac-b^2}}$.

How can these both be true? It seems like if we expand $(a+x)(b+x)$ out to $x^2+(a+b)x+ab$, we can apply the 2nd equation to get

$\int \frac{dx}{(a+x)(b+x)} = \frac{2}{\sqrt{4ab-(a+b)^2}}\tan^{-1}\frac{2x+a+b}{\sqrt{4ab-(a+b)^2}}$, which is surely not equivalent to $\frac{1}{b-a}\ln\frac{a+x}{b+x}$ (one involves a logarithm and the other involves an arctan, so no amount of algebraic fussing can reconcile them, can it?!)

share|cite|improve this question
Well, $\log$ and $\tan^{-1}$ are related via the complex exponential... – Zhen Lin Nov 9 '12 at 17:53

Take a look at the logarithmic form of the complex arctangent:


For instance, consider the integral

$$\int\frac{dx}{(1+x)(2+x)}=\int\frac{dx}{x^2+3x+2}\;.$$ The two integration formulas yield the antiderivatives

$$\ln\frac{1+x}{2+x}\tag{2}$$ and


From $(1)$ we have

$$\begin{align*} \frac2i\tan^{-1}\frac{2x+3}i&=\Big(\ln(1-(2x+3))-\ln(1+2x+3)\Big)\\ &=\ln\frac{-2-2x}{4+2x}\\ &=\ln\frac{-1-x}{2+x}\\ &=\ln\frac{1+x}{2+x}+\ln(-1)\\ &=\ln\frac{1+x}{2+x}+i\pi\;, \end{align*}$$

using the principal value of the log. Thus, $(2)$ and $(3)$ really do differ only by a constant, and there is no problem.

share|cite|improve this answer

You take the square root of a negative number $\left(-(a-b)^2\right)$, so the argument of arctan is complex. Using the following formula you should be able to turn one solution into the other: $$\arctan(z) = {\ln(1 - iz) - \ln(1 + iz) \over 2}$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.