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.
 A: Hint:
$$\int{\frac{(x^2 + 4)dx}{x^2 + 6x +10}}=\int{\frac{x^2 + 6x + 10-6x-6}{x^2 + 6x +10}}dx=x-6\int{\frac{x+1}{x^2 + 6x +10}}dx$$
Next hint:
$$6\frac{x+1}{x^2 + 6x +10}=3\frac{\color{blue}{2x+6}-4}{x^2 + 6x +10}$$
Next hint:
$$x^2 + 6x +10 = (x+3)^2+1$$
A: 
$$\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$   
A: HINT: we have $$x^2+6x+10=(x+3)^2+1$$ and you can set $t=x+3$ with $dx=dt$
the result is given by $$x-3\,\ln  \left( {x}^{2}+6\,x+10 \right) +12\,\arctan \left( x+3
 \right) 
+C$$
A: Using long division,
$$ \frac{x^2+4}{x^2+6x+10} = 1 -6\frac{x+1}{x^2+6x+10}= 1 -\frac{6x}{x^2+6x+10}-\frac{6}{x^2+6x+10}$$
Integrating $$1 -\frac{6x}{x^2+6x+10}-\frac{6}{x^2+6x+10} $$ should be straight forward
Note that $x^2+6x+10= (x+3)^2 +1$
A: \begin{align}
\int \frac{x^2+4}{x^2+6x+10}dx&=\int \frac{x^2+6x+10-(6x+18)+12}{x^2+6x+10}dx\\
&=\int1dx-3\int \frac{2x+6}{x^2+6x+10}dx+12\int \frac{1}{x^2+6x+10}dx\\
&=x-3\ln(x^2+6x+10)+12\int \frac{1}{(x+3)^2+1}dx\\
&=x-3\ln(x^2+6x+10)+12\int \frac{\sec^2u}{\tan^2u+1}du\\
&=x-3\ln(x^2+6x+10)+12\int 1du\\
&=x-3\ln(x^2+6x+10)+12\tan^{-1}(x+3)+C\\
\end{align}
A: $$\int{\frac{x^2 + 4}{x^2 + 6x +10}}dx=x-6\int{\frac{x+1}{x^2 + 6x +10}}dx$$
$$\int{\frac{x+1}{x^2 + 6x +10}}dx=\int{\frac{x+1}{(x+3)^2+1}}dx$$ now we can use $u$ substitution where $u=x+3$ and $du = dx$ so
$$\int{\frac{u-2}{u^2+1}}du=\int{\frac{u}{u^2+1}}du-2\int{\frac{1}{u^2+1}}du=\frac{\ln|u^2+1|}{2}-2\arctan(u)+C$$ now just substitute whatever u is.
