Definite integral - Different answers while using different approaches to solve I wanted to ask whether it is possible to get 2 different answers for the same definite integral, using two different approaches to solve it.
My friend and I have received an exercise in which we were requested to evaluate the result of a definite integral.
I've used the universal trigonometric substitution, and got an answer which was a combination of ln(x) functions, while he has used regular substitution, and has received an answer that was composed out of arctan(x) functions.
How is this possible?
Both of us, have checked our way multiple times, and are sure of our solutions.
The integral I was referring to:
$$\int_{0}^{\frac{\pi}{2}} \frac{\sin(x)}{\cos^{2}(x) + 4\cdot \cos(x) + 5} dx$$
Thanks!
 A: Some functions are related by deep connections. Consider the innocent-looking function $\operatorname{arctanh}$ ("hyperbolic arctangent").
If $x = \operatorname{arctanh} t$, then $\tanh x = t$, which means $\frac {\Bbb e^x - \Bbb e^{-x}} {\Bbb e^x + \Bbb e^{-x}} = t$. With the notation $u = \Bbb e^t$, the above becomes $u - \frac 1 u - tu - t \frac 1 u = 0$, which rearranges to $u^2(1-t) = 1+t$, so $u = \frac {1+t} {1-t}$ (I chose the positive root because $u = \Bbb e ^x >0$). Taking the logarithm, you get $x = \ln \frac {1+t} {1-t}$, which shows that $\operatorname{arctanh} t = \ln \frac {1+t} {1-t}$ - which I bet that you were not expecting.
I believe that something similar happens in your case (sometimes one can get results like these by taking a real formula, moving it to the complex plane, doing some manipulations on it, and finally miraculously taking it back to the reals). It is known that $\arctan$ can be expressed in terms of $\ln$, like $\operatorname{arctanh}$ above, but the price to pay is the usage of $\sqrt {-1}$.
