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?
 A: $$\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$$
A: Integration by parts yields
\begin{equation}
\int_{-1}^{1}\arctan\sqrt{x+2}\ dx=x\arctan\sqrt{x+2}\ \bigg|_{-1}^{1}-\frac12\int_{-1}^{1}\frac{x}{(x-1)\sqrt{x+2}}\ dx
\end{equation}
Making substitution $u^2=x+2$, then
\begin{align}
\int_{-1}^{1}\arctan\sqrt{x+2}\ dx&=\frac{\pi}{3}+\frac{\pi}{4}-\int_{1}^{\sqrt3}\frac{u^2-2}{u^2-3}\ du\\[10pt]
&=\frac{7\pi}{12}-\int_{1}^{\sqrt3}\frac{u^2-3+1}{u^2-3}\ du\\[10pt]
&=\frac{7\pi}{12}-\int_{1}^{\sqrt3}\ du-\int_{1}^{\sqrt3}\frac{1}{u^2-3}\ du\\[10pt]
\end{align}
Can you take it from here?
A: It is sometimes better to take $x+a$ (for some constant $a$) as the antiderivative of $1$. In this case
$$
\int \arctan\sqrt{x+2}\,dx=(x+a)\arctan\sqrt{x+2}-\frac{1}{2}\int(x+a)\frac{1}{1+x+2}\cdot\frac{1}{\sqrt{x+2}}\,dx,
$$
so $a=3$ seems to be a good choice. 
I think you can continue from here.
A: hint: take $\sqrt{x+2}=t$ and then integrate by parts . integrate the linear part and differentiate $\arctan$ part
A: $$\int \arctan(\sqrt{x+2})\, dx$$
$$=\int \arctan (\sqrt{x+2})\, d(x+2)$$
$$=2\int (\arctan(\sqrt{x+2}))(\sqrt{x+2})\, d(\sqrt{x+2})$$
$$=2\int (\arctan u)(u)\, du,$$
where $u=\sqrt{x+2}$. Now use integration by parts:
$$=2\left((\arctan u)\left(\frac{u^2}{2}\right)-\int \frac{u}{u^2+1}\, du\right)$$
$$=2\left((\arctan u)\left(\frac{u^2}{2}\right)-\frac{1}{2}\int \frac{d\left(u^2+1\right)}{u^2+1}\right)$$
$$=2\left((\arctan u)\left(\frac{u^2}{2}\right)-\frac{1}{2}\ln\left|u^2+1\right|\right)$$
A: You can set $t=\sqrt{x+2}$. For $x=-1$ we have $t=1$, for $x=1$ we have $t=\sqrt{3}$. Moreover $x=t^2-2$, so $dx=2t\,dt$. Therefore the integral is
$$
\int_{1}^{\sqrt{3}}2t\arctan t\,dt=
\underbrace{\Bigl[t^2\arctan t\Bigr]_1^{\sqrt{3}}}_A-
\underbrace{\int_{1}^{\sqrt{3}}\frac{t^2}{1+t^2}\,dt}_B
$$
(by parts). Then
$$
A=3\cdot\frac{\pi}{3}-\frac{\pi}{4}
$$
Let's examine $B$:
$$
B=\int_{1}^{\sqrt{3}}\frac{1+t^2-1}{1+t^2}\,dt=
\Bigl[t-\arctan t\Bigr]_{1}^{\sqrt{3}}=
\left(\sqrt{3}-\frac{\pi}{3}\right)-\left(1-\frac{\pi}{4}\right)
$$
