As the integral of $f(x)=\frac{x^2 + 4 x + 2}{x^2 + 2 x}$ with respect to $x \in {\rm I\!R}$, both my solution sheet as well as Mathematica provide $x+ln(x)+ln(2+x)$ as the solution.
However, using integration via substitution, I ended at $x+ln[x(2+x)]$ and felt afraid to disentangle the logarithm. $f(x)$ is defined over the negative realm of ${\rm I\!R}$, too. Hence, using the solution from by sheet and Mathematica, I could not calculate area under the curve for $x<0$. For $x \in [-2,0]$, I am still screwed, but ... it is something?
Presumably, this is a fatuous question about "what is the solution to an integral", as I picked this randomly from the internet just for fun, having no profound mathematical knowledge whatsoever and in terms of being the antiderivative, both functions "$+~C$" seem to do the job. But how does one tackle this kind of problem?