<s>[INST] 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$$
 [/INST] $$\int  \frac { 1 }{ (x+2)^{ 2 }+3 } dx=\int { \frac { dx }{ 3\left( 1+{ \left( \frac { x+2 }{ \sqrt { 3 }  }  \right)  }^{ 2 } \right)  }  } =\frac { 1 }{ \sqrt { 3 }  } \int { \frac { d\left( \frac { x+2 }{ \sqrt { 3 }  }  \right)  }{ 1+{ \left( \frac { x+2 }{ \sqrt { 3 }  }  \right)  }^{ 2 } }  } =\\=\frac { 1 }{ \sqrt { 3 }  } \arctan { { \left( \frac { x+2 }{ \sqrt { 3 }  }  \right)  } } +C$$
</s>