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.
 A: As the integrand contains a factor of $e^{\arctan x}$ we expect the result to contain the same. Writing $$\frac{x^2e^{\arctan x}}{\sqrt{1+x^2}}=(e^{\arctan x}f(x))’$$ we obtain $(1+x^2)f’(x)+f(x)=x^2\sqrt{1+x^2}$. It is convenient to make the substitution $f(x)=g(x)\sqrt{1+x^2}$ as this will make the RHS a polynomial. This gives $$(1+x^2)g’(x)+(1+x)g(x)=x^2.$$ Consider the power series $g(x)=a_0+a_1x+a_2x^2+\cdots$ so that $$x^2=(1+x^2)(a_1+2a_2x+3a_3x^2+\cdots)+(1+x)(a_0+a_1+a_2x^2+\cdots).$$ Equating constant and linear terms gives $a_1=-a_0$ and $a_2=0$. Equating quadratic terms gives $a_3=(1+2a_0)/3$ with all higher-order coefficients being a constant multiple of $a_3$. Therefore, we have the general solution $$\int\frac{x^2e^{\arctan x}}{\sqrt{1+x^2}}\,dx=e^{\arctan x}\sqrt{1+x^2}\left(a_0(1-x)+\frac{1+2a_0}3x^3h(x)\right)$$ where $h(x)$ is a power series. Taking $a_0=-1/2$ conveniently eliminates $h(x)$ and the result follows.
A: Substitute $x=\tan t$
\begin{align}
I= \int_{-1}^1 \frac{x^2e^{\arctan x}}{\sqrt{{1+x^2}}}\ {d}x
&= \int_{-\pi/4}^{\pi/4} e^{t}\tan^2 t\sec t\>dt\\
&=\int_{-\pi/4}^{\pi/4} e^{t}\sec t \> d(\tan t-1)
- \int_{-\pi/4}^{\pi/4} e^{t}\sec t \> dt\\
&= e^{t}\sec t (\tan t - 1) \bigg|_{-\pi/4}^{\pi/4}- I=\sqrt2e^{-\frac\pi4}
\end{align}
A: 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}$.
A: I directly give the solution that give the indefinite integral. I solved this by using integration by parts. Let's call the indefinite integral $I$.
$$Let\; u=xe^{arctan(x)}\;,dv=\frac{x}{\sqrt{1+x^2}}dx.$$
We find
$$I=xe^{arctan(x)}(\sqrt{1-x^2})-\int\left(e^{arctan(x)}+\frac{xe^{arctan(x)}}{1+x^2}\right)\sqrt{1+x^2}\; dx$$
Again, by letting
$$u=e^{arctan(x)},dv=\frac{x}{\sqrt{1+x^2}}dx$$
\begin{align}
I&=(x-1)\sqrt{1+x^2}e^{arctan(x)}-\int e^{arctan(x)}\left(\frac{x^2}{\sqrt{1+x^2}}\right)\\
&=(x-1)\sqrt{1+x^2}e^{arctan(x)}-I.
\end{align}
Then you get what you want by rearranging the equation.
A: Based on @Matthew pilling's comment...
Take $u=xe^{arctanx}$,$v=\frac {x}{\sqrt{1+x^2}}$
$I=xe^{arctanx}\sqrt{1+x^2}-\int (e^{arctanx}.1+\frac{x}{1+x^2})\sqrt{1+x^2}$
$\implies I=xe^{arctanx}\sqrt{1+x^2}-J.......(1)$
For $J$,I would like to take $e^{arctanx}\sqrt{1+x^2}.x=t$.now,
$dt=\frac{e^{arctanx}x^2}{\sqrt{1+x^2}}+\frac{x}{\sqrt{1+x^2}}+e^{arctanx}\sqrt{1+x^2}$
$dt= d(J+I)$
$\implies J=t-I$ substituting in equation $(1)$ we get the answer
