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?!)