Example 3. Find $\int \frac{d x}{\sqrt{4+x+x^{2}}}$.
Solution. In the expression under the root, we will complete the square to apply formula 13 for \(u=x+1/2\).

\[
\begin{gathered}
\int \frac{d x}{\sqrt{4+x+x^{2}}}=\int \frac{d x}{\sqrt{\frac{15}{4}+\left(\frac{1}{4}+x+x^{2}\right)}}=\int \frac{d x}{\sqrt{\left(x+\frac{1}{2}\right)^{2}+\left(\frac{\sqrt{15}}{2}\right)^{2}}}= \\
=\left\{\begin{array}{c}
u=x+\frac{1}{2} \\
m=\frac{\sqrt{15}}{2}
\end{array}\right\}=\ln \left(x+\frac{1}{2}+\sqrt{\left(x+\frac{1}{2}\right)^{2}+\left(\frac{\sqrt{15}}{2}\right)^{2}}\right)+C= \\
=\ln \left(x+\frac{1}{2}+\sqrt{4+x+x^{2}}\right)+C
\end{gathered}
\]

Note the coincidence of the expression under the root in the answer and in the original integral (the penultimate expression could have been omitted).

Remark. In cases where the expression under the logarithm is positive, the absolute value sign is omitted.

\[
\text{Example } 4. \text{ Find } \int \frac{d x}{\sqrt{3+4 x-2 x^{2}}} \text{. }
\]

Solution. The leading coefficient of the quadratic trinomial is negative (-2). Therefore, when completing the square, we need to refer to formula 11. It is recommended to factor out the coefficient 2. Let's format this as follows:

\[
\begin{gathered}
\int \frac{d x}{\sqrt{3+4 x-2 x^{2}}}= \\
=\left\{\begin{array}{l}
3+4 x-2 x^{2}=2\left(\frac{3}{2}+2 x-x^{2}\right)= \\
=2\left(\frac{3}{2}+1-\left(1-2 x+x^{2}\right)\right)=2\left(\frac{5}{2}-(x-1)^{2}\right)
\end{array}\right\}= \\
=\int \frac{d x}{\sqrt{2} \cdot \sqrt{\frac{5}{2}-(x-1)^{2}}}=\left\{\begin{array}{c}
u=x-1 \\
m^{2}=\frac{5}{2}
\end{array}\right\}= \\
=\frac{1}{\sqrt{2}} \cdot \arcsin \frac{x-1}{\sqrt{\frac{5}{2}}}+C=\frac{1}{\sqrt{2}} \arcsin \frac{\sqrt{2}(x-1)}{\sqrt{5}}+C
\end{gathered}
\]

Once again, we emphasize the need to memorize the table of integrals and to master formula (*).

\[
\begin{aligned}
& \text{For example, } \int \frac{d x}{\cos ^{2}(a x+b)}=\frac{1}{a} \operatorname{tg}(a x+b)+C ; \int \frac{d x}{m^{2}+(a x+b)^{2}}= \\
& =\frac{1}{a} \operatorname{arctg} \frac{a x+b}{m}+C ; \int \frac{d x}{\sqrt{m^{2}-(a x+b)^{2}}}=\frac{1}{a} \arcsin \frac{a x+b}{m}+C . \\
& \text{Example 5. Find } \int \frac{d x}{3 x^{2}+x+1} .
\end{aligned}
\]

Solution. The denominator of the integrand does not have real roots. Therefore, we refer to formula 12, completing the square (it is recommended to factor out the leading coefficient without involving it in the transformations). We have:

\[
\begin{aligned}
& \int \frac{d x}{3 x^{2}+x+1}= \\
& =\left\{\begin{array}{c}
3 x^{2}+x+1=3\left(x^{2}+\frac{1}{3} x+\frac{1}{3}\right)= \\
=3\left[\left(x^{2}+\frac{1}{3} x+\frac{1}{36}\right)-\frac{1}{36}+\frac{1}{3}\right]= \\
=3\left[\left(x+\frac{1}{6}\right)^{2}+\frac{11}{36}\right] ; u=x+\frac{1}{6}, m^{2}=\frac{11}{36}
\end{array}\right\}= \\
& =\frac{1}{3} \int \frac{d x}{\left(x+\frac{1}{6}\right)^{2}+\left(\frac{\sqrt{11}}{6}\right)^{2}}=\frac{1}{3} \cdot \frac{6}{\sqrt{11}} \operatorname{arctg} \frac{x+\frac{1}{6}}{\frac{\sqrt{11}}{6}}+C= \\
& =\frac{2}{\sqrt{11}} \operatorname{arctg} \frac{6 x+1}{\sqrt{11}}+C
\end{aligned}
\]