<s>[INST] Solve definite integral: $\int_{-1}^{1}\arctan(\sqrt{x+2})\ dx$ I need to solve:
$$\int_{-1}^{1}\arctan(\sqrt{x+2})\ dx$$
Here is my steps, first of all consider just the indefinite integral:
$$\int \arctan(\sqrt{x+2})dx = \int \arctan(\sqrt{x+2}) \cdot 1\ dx$$
$$f(x) = \arctan(\sqrt{x+2})$$
$$f'(x) = \frac{1}{1+x+2} \cdot \frac{1}{2\sqrt{x+2}} = \frac{1}{(2x+6)\sqrt{x+2}}$$
$$g'(x) = 1$$
$$g(x) = x$$
So:
$$\bigg[\arctan(\sqrt{x+2}) \cdot x\bigg]_{-1}^{1} - \int_{-1}^{1} \frac{x}{(2x-6)\sqrt{x+2}}\ dx$$
How should I proceed with the new integral?
 [/INST] $$\int_{-1}^{1}\tan^{-1}(\sqrt{x+2})dx=\int_{1}^{3}\tan^{-1}\sqrt{x}\,dx$$
if$f$ be differentiable, increasing and one-to-one on $[a,b]$ such that $f(a)=\alpha$ and $f(b)=\beta$  then
$$\int_{a}^{b}f(x)dx+\int_{\alpha}^{\beta}f^{-1}(x)dx=b\beta-a\alpha$$
therfore
 $$\int_{1}^{3}\tan^{-1}\sqrt{x}\,dx+\int_{\large\frac{\pi}{4}}^{\large\frac{\pi}{3}}\tan^{2}x\,dx=\pi-\frac{\pi}4$$
we have
 $$\int_{1}^{3}\tan^{-1}\sqrt{x}\,dx=\frac{5\pi}6-\sqrt{3}+1$$
</s>