## Problem Statement

Calculate the definite integral:

$$
\int_{0}^{\pi}\left(x^{2}-3 x+2\right) \sin x d x
$$
## Solution

$$
\int_{0}^{\pi}\left(x^{2}-3 x+2\right) \sin x d x=
$$

Let:

$$
\begin{aligned}
& u=x^{2}-3 x+2 ; d u=(2 x-3) d x \\
& d v=\sin x d x ; v=-\cos x
\end{aligned}
$$

Using the integration by parts formula $\int u d v=u v-\int v d u$. We get:

$$
\begin{aligned}
& =\left.\left(x^{2}-3 x+2\right) \cdot(-\cos x)\right|_{0} ^{\pi}-\int_{0}^{\pi}(-\cos x) \cdot(2 x-3) \cdot d x= \\
& =\left(\pi^{2}-3 \cdot \pi+2\right) \cdot(-\cos \pi)-\left(0^{2}-3 \cdot 0+2\right) \cdot(-\cos 0)+\int_{0}^{\pi} \cos x \cdot(2 x-3) \cdot d x= \\
& =\left(\pi^{2}-3 \pi+2\right) \cdot 1-2 \cdot(-1)+\int_{0}^{\pi} \cos x \cdot(2 x-3) \cdot d x=\pi^{2}-3 \pi+4+\int_{0}^{\pi} \cos x \cdot(2 x-3) \cdot d x=
\end{aligned}
$$

Let:

$$
\begin{aligned}
& u=2 x-3 ; d u=2 d x \\
& d v=\cos x d x ; v=\sin x
\end{aligned}
$$

Using the integration by parts formula $\int u d v=u v-\int v d u$. We get:

$$
\begin{aligned}
& =\pi^{2}-3 \pi+4+\left(\left.(2 x-3) \cdot \sin x\right|_{0} ^{\pi}-\int_{0}^{\pi} \sin x \cdot 2 d x\right)= \\
& =\pi^{2}-3 \pi+4+\left((2 \cdot \pi-3) \cdot \sin \pi-(2 \cdot 0-3) \cdot \sin 0-2 \int_{0}^{\pi} \sin x d x\right)= \\
& =\pi^{2}-3 \pi+4+\left((2 \cdot \pi-3) \cdot 0-(-3) \cdot 0-\left.2(-\cos x)\right|_{0} ^{\pi}\right)= \\
& =\pi^{2}-3 \pi+4+(2 \cos \pi-2 \cos 0)=\pi^{2}-3 \pi+4+(2 \cdot(-1)-2 \cdot 1)=
\end{aligned}
$$

$$
=\pi^{2}-3 \pi+4-4=\pi^{2}-3 \pi
$$

Source — "http://pluspi.org/wiki/index.php/%D0%97%D0%B0%D0%B4%D0%B0%D1%87%D0%BD%D0%B8%D0%BA_%D0%9A%D1%83%D0%B7%D0%BD%D0%B5%D1%86%D0%BE%D0%B2%D0%B0_%D0%98%D0%BD%D1%82%D0%B5%D0%B3%D1%80%D0%B0%D0%BB%D1%8B_2-15"

Categories: Kuznetsov's Problem Book Integrals Problem 2 | Integrals

Ukrainian Banner Network

- Last modified: 21:25, 26 February 2009.
- Content is available under CC-BY-SA 3.0.