Problem: Evaluate the integral
Solution: This is a typical integral from the box "integration by parts", namely the type "removing logarithm", so we apply the recommended method. We also notice that the integral is defined on the whole real line, so the given interval poses no problem. During the integration we then check that there will be no problem with points in this interval.
We obtained a rational function that we integrate using the usual procedure. First the long division, the remainder will lead to some arctangents or integrals solved by substitution (or both).
Thus we got the answer and it was not too difficult. However, a smart
integrator could save some work. Indeed, the square in the logarithm can be
eliminated by substitution at the very beginning. Does the substitution
By the way, try to determine the indefinite integral, you should get
Remark: There is an interesting trick which can significantly shorten the first solution. Note that there is nothing forcing us to choose for g the simplest antiderivative, we can add a constant of our choice. In this example one can use it smartly.