integration by parts !!!!  PD: I did a little change in the denominator  !!!!
I need to solve this integral using integration by parts.
$\displaystyle\int\frac{x\,dx}{\sqrt{(a^2+b^2)+(x-c)^2}}$
Thanks!
PS: I know that I can to do:
$\displaystyle\int\frac{x\,dx}{\sqrt{(a^2+b^2)+(x-c)^2}}=\int\frac{(x-c)\,dx}{\sqrt{(a^2+b^2)+(x-c)^2}}+c\int\frac{dx}{\sqrt{(a^2+b^2)+(x-c)^2}}$
but according to the book it is easier using integration by part.
 A: Let $x-c=\sqrt{a^2+b^2} \tan \theta,$ then $d x=\sqrt{a^2+b^2} \sec ^2 \theta d \theta$ and
$$
\begin{aligned}
\int \frac{x d x}{\sqrt{\left(a^2+b^2\right)+(x-c)^2}} &=\int \frac{c+\sqrt{a^2+b^2 \tan \theta}}{\sqrt{a^2+b^2 \sec \theta}} \sqrt{a^2+b^2 \sec ^2 \theta} d \theta\\
&=\int\left(c+\sqrt{a^2+b^2} \tan \theta\right) \sec \theta d \theta \\
&=c \ln |\sec \theta+\tan \theta|+\sqrt{a^2+b^2} \sec \theta+C\\
&=c \ln \left|\frac{x-c+\sqrt{a^2+b^2+(x-c)^2}}{\sqrt{a^2+b^2}}\right|+\sqrt{a^2+b^2+(x-c)^2}+C
\end{aligned}
$$
A: You don't actually need integration by parts. First, observe the following:
$$\left[\sqrt{a^2+b^2+(x-c)^2}\right]'=\frac {x-c}{\sqrt{a^2+b^2+(x-c)^2}}$$
Integrating both sides and isolating the integral under question gives
$$\int\frac x{\sqrt{a^2+b^2+(x-c)^2}}\,\mathrm dx=\sqrt{a^2+b^2+(x-c)^2}+c\int\frac {\mathrm dx}{\sqrt{a^2+b^2+(x-c)^2}}$$
The latter integral can be evaluated using an Euler Substitution. A more detailed explanation of how to perform an Euler Substitution can be found on the Wikipedia page, but the substitution to make here is
$$t=x-c+\sqrt{a^2+b^2+(x-c)^2}$$
Differentiating gives
\begin{align*}
\mathrm dt & =1+\frac {x-c}{\sqrt{a^2+b^2+(x-c)^2}}\,\mathrm dx\\ & =\frac {x-c+\sqrt{a^2+b^2+(x-c)^2}}{\sqrt{a^2+b^2+(x-c)^2}}\,\mathrm dx\\ & =\frac t{\sqrt{a^2+b^2+(x-c)^2}}\,\mathrm dx
\end{align*}
As in
$$\frac {\mathrm dt}t=\frac {\mathrm dx}{\sqrt{a^2+b^2+(x-c)^2}}$$
The integral is then
\begin{align*}
 & \int\frac x{\sqrt{a^2+b^2+(x-c)^2}}\,\mathrm dx\\ & =\sqrt{a^2+b^2+(x-c)^2}+c\int\frac {\mathrm dt}t\\ & =\sqrt{a^2+b^2+(x-c)^2}+c\log\left(x-c+\sqrt{a^2+b^2+(x-c)^2}\right)+K
\end{align*}
