1120. Find the integrals:
1) $\int(x+2) \ln x \, dx$
2) $\int x^{2} \arcsin x \, dx$
3) $\int \arccos x \, dx$
4) $\int e^{x} \sin x \, dx$
5) $\int\left(x^{2}+2 x+1\right) \sin 3 x \, dx$
6) $\int x^{2} e^{3 x} \, dx$
Solution. 1) Using formula (1). Let $u=\ln x$, $d v=(x+2) d x$, then $d u=\frac{d x}{x} ; \quad v=\int(x+2) d x=\frac{x^{2}}{2}+2 x=$ $=x\left(\frac{x}{2}+2\right)$, therefore,

$\int(x+2) \ln x d x=x\left(\frac{x}{2}+2\right) \ln x-\int x\left(\frac{x}{2}+2\right) \frac{d x}{x}=$ $=\frac{x}{2}(x+4) \ln x-\frac{x^{2}}{4}-2 x+C$.

2) Let $u=\arcsin x, \quad d v=x^{2} d x$, then $d u=\frac{d x}{\sqrt{1-x^{2}}}$, $v=\int x^{2} d x=\frac{x^{3}}{3}$, therefore,

$$
\int x^{2} \arcsin x d x=\frac{1}{3} x^{3} \arcsin x-\int \frac{x^{3}}{3} \cdot \frac{d x}{\sqrt{1-x^{2}}}
$$

Now we find the integral on the right side using the substitution $1-x^{2}=t^{2}$. Differentiating, we get $-2 x d x=2 t d t$ or $x d x=$ $=-t d t$, therefore,

$$
\begin{gathered}
\frac{1}{3} \int \frac{x^{3}}{\sqrt{1-x^{2}}} d x=\frac{1}{3} \int \frac{\left(1-t^{2}\right)(-t) d t}{t}=-\frac{1}{3}\left(t-\frac{t^{3}}{3}\right)= \\
=-\frac{1}{3} \sqrt{1-x^{2}}+\frac{1}{9} \sqrt{\left(1-x^{2}\right)^{3}}
\end{gathered}
$$

Substituting this result into equation (a), we find $\int x^{2} \arcsin x d x=\frac{1}{3}\left(x^{3} \arcsin x+\sqrt{1-x^{2}}-\frac{1}{3} \sqrt{\left(1-x^{2}\right)^{3}}\right)+C$.

3) Let $u=\arccos x, d v=d x$, then $d u=-\frac{\mathrm{d} x}{\sqrt{1-x^{2}}}$, $v=\int d x=x$, therefore,

$$
\int \arccos x d x=x \arccos x-\int \frac{-x d x}{\sqrt{1-x^{2}}}
$$

We find the integral on the right side using the substitution

$$
1-x^{2}=t^{2} ; x d x=-t d t
$$

$$
\int \frac{x d x}{\sqrt{1-x^{2}}}=-\int \frac{t d t}{t}=-\int d t=-t=-\sqrt{1-x^{2}}
$$

Substituting this result into equation (b), we get

$$
\int \arccos x d x=x \arccos x-\sqrt{1-x^{2}}+C
$$

4) Let $u=\sin x, \quad d v=e^{x} d x$, then $d u=\cos x d x$, $v=\int e^{x} d x=e^{x}$, therefore,

$$
\int e^{x} \sin x d x=e^{x} \sin x-\int e^{x} \cos x d x
$$

We take the integral on the right side again by parts. Let $u=\cos x, \quad d v=e^{x} d x$, then $d u=-\sin x d x, \quad v=\int e^{x} d x=e^{x}$, therefore,

$\int e^{x} \cos x d x=e^{x} \cos x-\int-e^{x} \sin x d x=e^{x} \cos x+\int e^{x} \sin x d x$.

Substituting this result into equation (c), we get

$$
\int e^{x} \sin x d x=e^{x} \sin x-e^{x} \cos x-\int e^{x} \sin x d x
$$

from which

$$
2 \int e^{x} \sin x d x=e^{x}(\sin x-\cos x)+2 C
$$

Therefore,

$$
\int e^{x} \sin x d x=\frac{e^{x}}{2}(\sin x-\cos x)+C
$$

5) Let $u=x^{2}+2 x+1, \quad d v=\sin 3 x d x$, then $d u=$ $=2(x+1) d x, \quad v=-\frac{1}{3} \cos 3 x$, therefore,

$$
\begin{gathered}
\int\left(x^{2}+2 x+1\right) \sin 3 x d x=-\frac{1}{3}\left(x^{2}+2 x+1\right) \cos 3 x+ \\
+\frac{2}{3} \int(x+1) \cos 3 x d x
\end{gathered}
$$

We take the integral on the right side again by parts. Let $u=x+1, \quad d v=\cos 3 x d x, \quad$ then $\quad d u=d x, \quad v=\int \cos 3 x d x=$ $=\frac{1}{3} \sin 3 x$, therefore,

$$
\int(x+1) \cos 3 x d x=\frac{1}{3}(x+1) \sin 3 x-\frac{1}{3} \int \sin 3 x d x
$$

Substituting this result into equation (d), we get

$$
\begin{gathered}
\int\left(x^{2}+2 x+1\right) \sin 3 x d x=-\frac{1}{3}\left(x^{2}+2 x+1\right) \cos 3 x+ \\
+\frac{2}{9}(x+1) \sin 3 x+\frac{2}{27} \cos 3 x+C
\end{gathered}
$$

6) Let $u=x^{2}, d v=e^{3 x} d x$, then $d u=2 x d x, v=\frac{1}{3} e^{3 x}$, therefore,

$$
\int x^{2} e^{3 x} d x=\frac{1}{3} x^{2} e^{3 x}-\frac{2}{3} \int x e^{3 x} d x
$$

We compute the integral on the right side of equation (e): $u=x$, $d v=e^{3 x} d x, \quad d u=d x, \quad v=\frac{1}{3} e^{3 x}$, therefore,

$$
\begin{gathered}
\int x e^{3 x} d x=\frac{x}{3} e^{3 x}-\frac{1}{3} \int e^{3 x} d x=\frac{x}{3} e^{3 x}-\frac{1}{9} e^{3 x}+C_{1}= \\
=\frac{1}{9} e^{3 x}(3 x-1)+C_{1}
\end{gathered}
$$

Substituting this result into equation (e), we get

$$
\begin{aligned}
\int x^{2} e^{3 x} d x & =\frac{1}{3} x^{2} e^{3 x}-\frac{2}{27} e^{3 x}(3 x-1)+C= \\
& =\frac{1}{27} e^{3 x}\left(9 x^{2}-6 x+2\right)+C
\end{aligned}
$$