Here is the question:
Using the substitution $u=e^x$, find the exact value of $\int_{0}^{\frac{1}{2}\ln3}\dfrac{1}{e^x+e^{-x}}dx$
The actual to this answer is $\dfrac{\pi}{12}$, and in the official working out it seems they took the arctan of two numbers: (official working)
This surprised me because I've never seen arctan used in these questions before so I didn't even think about doing that: could anyone also explain when to take the arctan in these sort of questions please?
My working:
$u=e^x, x=\ln(u)$
$\int_{0}^{\frac{1}{2}\ln3}\dfrac{1}{e^x+e^{-x}}dx = \int_{0}^{\frac{1}{2}\ln3}\dfrac{1}{u+u^{-1}}dx $
$\frac{du}{dx} = e^x \therefore \frac{du}{e^x}=dx$
$\int_{1}^{\sqrt{3}}\frac{1}{u^2+1} du = \int_{1}^{\sqrt{3}}({u^2+1})^{-1} du$
$\int_{1}^{\sqrt{3}}(u^{-2}+1) du = [-u^{-1}+u]_1^\sqrt{3}$
$(-\sqrt{3}^{-1}+\sqrt{3}) - (-1 + 1) = \frac{2}{\sqrt{3}}$