How to solve $\int \frac{1}{x^2+4x+7} dx$? How to solve $\int \frac{1}{x^2+4x+7} dx$?
I think the first step is to write it in the following form: $$\int \frac{1}{(x+2)^2+3} dx$$

With the substitution $u=\frac{x+2}{\sqrt{3}}$:
\begin{align*}\int \frac{1}{(x+2)^2+3} \mathrm{d}x &= \int \frac{1}{3(\frac{x+2}{\sqrt{3}})^2+3} \mathrm{d}x \\  &= \frac13\int \frac{1}{(\frac{x+2}{\sqrt{3}})^2+1} \mathrm{d}x \\ &= \frac{1}{3}\sqrt{3}\int \frac{1}{u^2+1} \mathrm{d}u  \\  &= \frac{1}{3}\sqrt{3} \arctan(u)+C \\ &= \frac{1}{3}\sqrt{3} \arctan\left(\frac{x+2}{\sqrt{3}}\right)+C \end{align*}
