<s>[INST] Evaluate $\int \frac{x^2 + x+3}{x^2+2x+5}\ dx$ How can we evaluate $$\displaystyle\int \frac{x^2 + x+3}{x^2+2x+5} dx$$  
To be honest, I'm embarrassed. I decomposed it and know what the answer should be but
I can't get the right answer. 
 [/INST] Hint Use the decomposition
$$\frac{x^2 + x+3}{x^2+2x+5}=1-\frac{ x+2}{x^2+2x+5}=1-\frac{1}{2}\frac{ 2x+2}{x^2+2x+5}-\frac{ 1}{x^2+2x+5}$$
and 
$$\frac{ 1}{x^2+2x+5}=\frac{ 1}{(x+1)^2+4}=\frac{1}{4}\frac{ 1}{(\frac{x+1}{2})^2+1}$$
the first fraction is on the form $\frac{f'}{f}$ and the second have the form $\frac{1}{u^2+1}$ by change of variable.
</s>