How to select a choice of $u$ to solve $\int \frac{x^2}{1+x^2} dx$ by substitution? I have the following integral:
$$\int \frac{x^2}{1+x^2} dx$$
Now, I know that there is a fairly simple way to solve this integral by doing some manipulation on the numerator and then splitting up the expression into two fractions. From this method, I know that my answer should be $x - \arctan(x) + C$.
However, I am required to use $u$-substitution to solve this problem. Maybe I'm missing something really simple here, but I'm completely flummoxed on what my choice of $u$ should be. Any suggestions?
 A: This can be computed in fewer steps than the other answer here, and this also avoids using hyperbolic functions in your substitution. It suffices to use the substitution $x=\tan(u)$ .
Here we have:
$$
dx = \frac{1}{\cos^2(u)} \, du
$$
Substituting all of this in and simplifying gives us the following integral:
$$
\int \tan^2(u) \, du
$$
Note: I am making use of the identity:
$$
1 + \tan^2(y) = \frac{1}{\cos^2(y)}
$$
This then fairly straightforwardly evaluates to $\tan(u) - u + c$ and so we can substitute $u = \arctan(x)$ into our result to give us the final answer.
A: You may try the substitution $x = \sinh(y)$, whence one has that $\mathrm{d}x = \cosh(y)\mathrm{d}y$. Therefore we get that
\begin{align*}
\int\frac{x^{2}}{1 + x^{2}}\mathrm{d}x & = \int\frac{\sinh^{2}(y)\cosh(y)}{1 + \sinh^{2}(y)}\mathrm{d}y\\\\
& = \int\frac{\sinh^{2}(y)\cosh(y)}{\cosh^{2}(y)}\mathrm{d}y\\\\
& = \int\frac{\sinh^{2}(y)}{\cosh(y)}\mathrm{d}y\\\\
& = \int\frac{\cosh^{2}(y) - 1}{\cosh(y)}\mathrm{d}y\\\\
& = \int\cosh(y)\mathrm{d}y - \int\frac{\mathrm{d}y}{\cosh(y)}
\end{align*}
Can you take it from here?
A: Sometimes trig substitution overlaps with u substitution. Imagine a right triangle having one leg length 1 the other leg length x. Then:
$\int \frac{x^2}{1+x^2}dx$
$\frac{x^2}{1+x^2}=\sin^2{\theta}$
$x=\tan{\theta}\implies dx=\sec^2{\theta} d\theta$.
$\int \tan^2{\theta}d\theta=\int \sec^2{\theta}-1 d\theta=\tan{\theta}-\theta +C=x-\arctan{x}+C$
Thus reproducing FD_bfa's answer through a slightly different route.
