I've been attempting several other integrals and have a hit a massive wall in terms of this question:
$$\int\frac{x^2}{x^2-4}dx$$
I tried looking into substitutions to perform but couldn't find any useful ones on my own, so after consulting an online calculator, the following method was used:

How is this performed? I cannot understand how "adding 0" in the numerator yields the fraction $\int(\frac{4}{x^2-4}+1)dx$. Can anyone help shed light on this? I feel like it's very basic, but I haven't a clue how it was done :S
Alternatively, consider the general way of adding fractions together $$\frac{a}{b}+\frac{c}{d} = \frac{ad+bc}{db}\, \qquad (b, d) \neq 0$$
The answer given considers \begin{align} 1+\frac{4}{x^{2}-4} &= \frac{1}{1}+\frac{4}{x^{2}-4} \\ &= \frac{(1)(x^{2}-4)+4(1)}{(1)(x^{2}-4)} \\ &= \frac{x^{2}-4+4}{x^{2}-4} \\ &= \frac{x^{2}}{x^{2}-4}\, \qquad (\text{QED}) \end{align}