Evaluate $\int_{-1}^1 \frac{x^2e^{\arctan x}}{\sqrt{{1+x^2}}}\ \mathrm{d}x$ $$\int_{-1}^1 \frac{x^2e^{\arctan x}}{\sqrt{{1+x^2}}}\ \mathrm{d}x$$
My try:
I tried substituting $x= \tan\theta$ and got,
$\displaystyle\int e^\theta \tan^2\theta \sec\theta\ \mathrm{d}\theta$ and cannot move forward. so I thought of finding two integrals($I$ and $J$)one of which is required and the other is taken such that $I+J, I-J$ are easy to find.but couldn't find such $J$ $\left(I=\displaystyle\int\frac{x^2e^{\arctan x}}{1+x^2}\ \mathrm{d}x\right)$
Also, I don't think I could make use of definite integral properties.
WolframAlpha result for the integral is
$\frac{(x-1)\sqrt{1+x^2}e^{arctanx}}{2}+C$
I also want to know how you got the idea for the solution.

Observe that:
$$(e^{\arctan(x)} \sqrt{1+x^2})' = \frac{e^{\arctan(x)}}{\sqrt{1+x^2}} + \frac{xe^{\arctan(x)}}{\sqrt{1+x^2}}$$
$$x(e^{\arctan(x)}\sqrt{1+x^2})' = \frac{xe^{\arctan(x)}}{\sqrt{1+x^2}} + \frac{x^2 e^{\arctan(x)}}{\sqrt{1+x^2}}$$
Let us integrate the left-hand side. So, we have:
$$J = \int_{-1}^{1} x(e^{\arctan(x)}\sqrt{1+x^2})' \ dx = [x\sqrt{1+x^2}e^{\arctan(x)}]_{-1}^{1} - \int_{-1}^{1} e^{\arctan(x)} \sqrt{1+x^2} \ dx$$
Now, we have:
$$I = \int_{-1}^{1} \frac{xe^{\arctan(x)}}{\sqrt{1+x^2}} \ dx$$
Let $u = e^{\arctan(x)}$ and $dv = \frac{x}{\sqrt{1+x^2}} \ dx$. Then, $du = \frac{e^{\arctan(x)}}{1+x^2} \ dx$ and $v = \sqrt{1+x^2}$. So, we have that:
$$I = [\sqrt{1+x^2}e^{\arctan(x)}]_{-1}^{1} - \int_{-1}^{1} \frac{e^{\arctan(x)}}{\sqrt{1+x^2}} \ dx$$
Let the integral we want be denoted by $K$. Then:
$$K = J-I = 2\sqrt{2}e^{-\frac{\pi}{4}} + \int_{-1}^{1} -\frac{x^2e^{\arctan(x)}}{\sqrt{1+x^2}} \ dx$$
$$2K = 2\sqrt{2}e^{-\frac{\pi}{4}}$$
$$K = \sqrt{2}e^{-\frac{\pi}{4}}$$
as was desired. I initially had the idea of playing around with the product of $e^{\arctan(x)}$ and $\sqrt{1+x^2}$ because I basically observed that $\frac{x^2e^{\arctan(x)}}{\sqrt{1+x^2}} = x \cdot \frac{xe^{\arctan(x)}}{\sqrt{1+x^2}}$ and I had the idea that the second portion could be obtained by differentiating $e^{\arctan(x)}\sqrt{1+x^2}$.
