<s>[INST] Solve integral $\int{\frac{x^2 + 4}{x^2 + 6x +10}dx}$ Please help me with this integral:
$$\int{\frac{x^2 + 4}{x^2 + 6x +10}}\,dx .$$
I know I must solve it by substitution, but I don't know how exactly.
 [/INST] 
$$\int{\frac{x^2 + 4}{x^2 + 6x +10}}dx$$

Hints:
$$(1)\int\bigg({1-\frac{6x+6}{x^2 + 6x +10}}\bigg)dx$$
$(2)$rewrite the  integrand 
${\frac{x+1}{x^2 + 6x +10}}$ as $\frac{2x+6}{2(x^2+6x+10)}-\frac{2}{x^2 + 6x +10}$
$(3)$ for inegrand $\frac{2x+6}{2(x^2+6x+10)}$ substitute $u=x^2+6x+10$ and $du=(2x+6)dx$   
</s>