1269. Calculate the integrals:
1) $\int_{0}^{1} x e^{-x} d x$
2) $\int_{1}^{2} x \log _{2} x d x$
3) $\int_{1}^{e} \ln ^{2} x d x$
Solution. 1) Using formula (1). Let $u=x$, $d v=e^{-x} d x$ we have $d u=d x, v=-e^{-x}$, therefore,

$$
\int_{0}^{1} x e^{-x} d x=-\left.x e^{-x}\right|_{0} ^{1}+\int_{0}^{1} e^{-x} d x=\left.\left(-x e^{-x}-e^{-x}\right)\right|_{0} ^{1}=1-\frac{2}{e}
$$

2) Let $u=\log _{2} x, d v=x d x$, we have $d u=\frac{d x}{x \ln 2}, v=\frac{x^{2}}{2}$, therefore,

$$
\int_{1}^{2} x \log _{2} x d x=\left.\frac{1}{2} x^{2} \log _{2} x\right|_{1} ^{2}-\int_{1}^{2} \frac{x d x}{2 \ln 2}=
$$

$=\left.\left(\frac{1}{2} x^{2} \log _{2} x-\frac{x^{2}}{4 \ln 2}\right)\right|_{1} ^{2}=\left(2-\frac{1}{\ln 2}\right)-\left(-\frac{1}{4 \ln 2}\right)=2-\frac{3}{4 \ln 2}$.

3) Let $u=\ln ^{2} x, d v=d x$, we have $d u=\frac{2}{x} \ln x d x, v=x$, therefore,

$$
\int_{1}^{e} \ln ^{2} x d x=\left.x \ln ^{2} x\right|_{1} ^{e}-2 \int_{1}^{e} \ln x d x .
$$

The integral $\int_{1}^{e} \ln x d x$ is found again by parts. Let $u=\ln x$, $d v=d x$, then $d u=\frac{d x}{x}, v=x$ and

$$
\int_{1}^{e} \ln x d x=\left.x \ln x\right|_{1} ^{e}-\int_{1}^{e} d x=\left.(x \ln x-x)\right|_{1} ^{e}
$$

Finally, we get

$$
\int_{1}^{e} \ln ^{2} x d x=\left.\left(x \ln ^{2} x-2 x \ln x+2 x\right)\right|_{1} ^{e}=e-2
$$

Using the integration by parts formula, calculate the integrals: