I need to integrate this:
$$\int \ln\left(x^2-2x-3\right)\,dx$$
I'm thinking of going this direction:
$$\int \ln\left(x^2-2x-3\right)\,dx=\int \ln((x-3)(x+1))\,dx$$
Which would then equal $$\int \ln(x-3)\,dx + \int \ln(x+1)\,dx$$
What do you think? I guess I could also go this way: $$u=\ln\left(x^2-2x-3\right) \; \; \; dv=1\,dx$$ meaning I could integrate by parts. Which way is the best way? Can I only choose one?
For $x>3$ we obtain: $$\int\ln(x^2-2x-3)dx=\int\ln(x+1)dx+\int\ln(x-3)dx=$$ $$=(x+1)\ln(x+1)-(x+1)+(x-3)\ln(x-3)-(x-3)+C=$$ $$=(x+1)\ln(x+1)+(x-3)\ln(x-3)-2x+C.$$