Why are these two integrals different even though they should be equal?

70 Views Asked by At

$\int\frac{x^2}{x^2-4}dx$ and $\int\frac{x^2-4}{x^2-4}dx+\int\frac{4}{x^2-4}dx$

The first one is $\ln |x-2|-\ln|x+2|$ and the second one is $x+\frac{1}{4}\ln |x-2|-\frac{1}{4}\ln|x+2|$. Shouldn't they have the same answer? For full context, the problem I am trying to solve is $\int\ln\sqrt{x^2-4}\ dx$. Thank you very much in advance.

2

There are 2 best solutions below

1
On

I am sure that you computed the value of $\int_{}^{}\frac{x^2}{x^2-4}dx$ wrong. I shall show it via partial fraction decomposition $$\int_{}^{}\frac{x^2}{x^2-4}dx=\frac{1}{4}\int_{}^{}\frac{x^2}{x-2}dx+\frac{1}{4}\int_{}^{}\frac{x^2}{x+2}dx$$ Substitute $u=x-2\implies du=dx$ and $v=x+2\implies dv=dx$ First integral will be $$\int_{}^{}\frac{(u+2)^2}{u}du$$ Expansion of $(u+2)^{2}$ using binomial theorem we have $$\int_{}^{}udu+4\int_{}^{}\frac{du}{u}+4\int_{}^{}\frac{du}{u}$$. I hope you can proceed from here and also calculate second integral too

0
On

$$ \begin{aligned} I &=\int \ln \sqrt{x^{2}-4} d x \\ &=\frac{1}{2} \int \ln \left(x^{2}-4\right) d x \\ &=\frac{1}{2}[\ln [(x+2)(x-2)] d x\\ &=\frac{1}{2}\left[\int \ln (x+2) d x+\int \ln (x-2) d x\right] \\ \because \int \ln y d y&=y \ln y-\int y \cdot \frac{1}{y} d y =y\ln y-y+C_1\\ \therefore I&=\frac{1}{2}[(x+2) \ln (x+2)-(x+2)+(x-2) \ln (x-2)-(x-2)]+C_{2} \\ &=\frac{1}{2}[(x+2) \ln (x+2)+(x-2) \ln (x-2)-2 x] +C_{3} \end{aligned} $$