Troubles with integrals and WA

84 Views Asked by At

I'm trying to compute $\int x \log (\sqrt{1+x^2}) dx$ but I have had some trouble... I explain :

Previously, I've done $\int \log (\sqrt{1+x^2})= x \log(\sqrt{x^2+1})-x+tan^{-1}(x)$(I've checked it in WA),

so I thought the most straightforward way of resolving the new integral was using integration by

parts..with f=x and g'=$\log (\sqrt{1+x^2})$, and I got:

$\int x \log (\sqrt{1+x^2}) =x[x \log(\sqrt{x^2+1})-x+tan^{-1}]-\int x \log(\sqrt{x^2+1})-x+tan^{-1}(x)$

Then, passing $\int x \log (\sqrt{1+x^2})$ to the other side of the equation, I finally get:

$\int x \log (\sqrt{1+x^2})=\dfrac{1}{2}[\dfrac{-1}{1+x^2}-\dfrac{x^2}{2}+x^2\log \sqrt{1+x^2}+x \tan^{-1}(x)]$.

On the other hand, Wolfram says that the right answer is enter image description here, while computing the derivative of my answer I get:enter image description here

I know that two functions with the same derivative differ from a constant, so the graphics should be one over the other, but they are not...I've already checked my computations trice, but I see no mistake..Could you help me, please?

2

There are 2 best solutions below

1
On BEST ANSWER

From

$\int x \log (\sqrt{1+x^2}) =x[x \log(\sqrt{x^2+1})-x+tan^{-1}]-\int x \log(\sqrt{x^2+1})-x+tan^{-1}(x)$

to

$\int x \log (\sqrt{1+x^2})=\dfrac{1}{2}[\dfrac{-1}{1+x^2}-\dfrac{x^2}{2}+x^2\log \sqrt{1+x^2}+x \tan^{-1}(x)]$

I believe that you used that

$$\int \tan^{-1}x\ dx=\frac{1}{x^2+1}+C$$

which is not correct.

0
On

HINT:

$$\int x\ln\left(\sqrt{1+x^2}\right)\space\text{d}x=$$


Use integration by parts;

$\int f\space\text{d}g=fg-\int g\space\text{d}f$ where $f=\ln\left(\sqrt{1+x^2}\right), \text{d}g=x\space\text{d}x,\text{d}f=\frac{x}{x^2+1}\space\text{d}x,g=\frac{x^2}{2}$:


$$\frac{x^2\ln\left(\sqrt{1+x^2}\right)}{2}-\frac{1}{2}\int\frac{x^3}{x^2+1}\space\text{d}x=$$


Substitute $u=x^2$ and $\text{d}u=2x\space\text{d}x$:


$$\frac{x^2\ln\left(\sqrt{1+x^2}\right)}{2}-\frac{1}{4}\int\frac{u}{u+1}\space\text{d}u=$$ $$\frac{x^2\ln\left(\sqrt{1+x^2}\right)}{2}-\frac{1}{4}\int\left[1-\frac{1}{u+1}\right]\space\text{d}u$$