<s>[INST] Integration of rational functions How would you integrate a rational function like this:
$$\frac{2x+3}{x^2+2x+10}$$
 [/INST] Notice that:
$$\frac{2x + 3}{x^2 + 2x + 10} = \frac{2x + 2}{x^2 + 2x + 10} + \frac{ 1}{x^2 + 2x + 10} = \frac{2x + 2}{x^2 + 2x + 10} + \frac{ 1}{(x+1)^2 + 3^2}$$
Therefore, 
$$\int \frac{2x + 3}{x^2 + 2x + 10} dx = \int\frac{2x + 2}{x^2 + 2x + 10}dx+ \int\frac{ 1}{(x+1)^2 + 3^2}dx$$
$$ = \ln|x^2 + 2x + 10| +  \int\frac{ 1}{(x+1)^2 + 3^2}dx $$
$$= \ln|x^2 + 2x + 10| +   \int\frac{1/9}{(\frac{x+1}{3})^2 + 1}dx $$
$$= \ln|x^2 + 2x + 10| +   \int\frac{1/9}{(\frac{x+1}{3})^2 + 1}dx$$ 
$$= \ln|x^2 + 2x + 10| +   \frac{1}{9}\int\frac{1}{(\frac{x+1}{3})^2 + 1}dx$$ 
$$= \ln|x^2 + 2x + 10| +   \frac{1}{3} \arctan(\frac{x+1}{3}) + c$$ 
We can safely drop the absolute value, because $x^2 + 2x + 10 > 0 \quad \forall x \in \mathbb{R}$, obtaining:
$$\int \frac{2x + 3}{x^2 + 2x + 10} dx = \ln(x^2 + 2x + 10) +   \frac{1}{3} \arctan(\frac{x+1}{3}) + c$$ 
</s>