Example 1.4. Calculate $\int e^{x} \cos x d x$.
Solution. Let $u=\cos x, d v=e^{x} d x$. Then $d u=-\sin x d x, v=e^{x}$, and by formula (1.10) we have:

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

The second integral on the right side of the obtained equality is integrated by parts again, and the necessary actions for integration by parts are conveniently written as follows:

$$
\begin{aligned}
\int e^{x} \sin x d x & =\left|\begin{array}{l}
d v=e^{x} d x, v=e^{x} \\
u=\sin x, d u=\cos x d x
\end{array}\right|= \\
& =e^{x} \sin x-\int e^{x} \cos x d x
\end{aligned}
$$

We now get:

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

The required indefinite integral $\int e^{x} \cos x d x$ appears in the right side of this equality. Transferring it to the left side of the equality, we get

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

From which it follows that $\int e^{x} \cos x d x=\frac{e^{x}}{2}(\cos x+\sin x)+C$ (we added the constant of integration $C$, since it is clear that the function $\frac{e^{x}}{2}(\cos x+\sin x)$ is one of the antiderivatives of the function $e^{x} \cos x$).

Integration by parts is typically used for calculating indefinite integrals of the form

$$
\int x^{m} \sin \alpha x d x, \int x^{m} \cos \beta x d x, \int x^{m} e^{\gamma x} d x
$$

( $m$ - a positive integer, $\alpha, \beta, \gamma$ - constants);

$$
\begin{gathered}
\int e^{\alpha x} \cos \beta x d x, \int e^{\alpha x} \sin \beta x d x, \int \arcsin x d x \\
\int \operatorname{arcctg} x d x, \int x^{n} \ln x d x
\end{gathered}
$$

and others.

Remark. The process of integration generally involves the judicious application of the methods described above (algebraic transformations of the integrand, integration by parts, integration by substitution) to reduce the given integral to an integral (or integrals) that are already known or whose evaluation presents no difficulty.

To implement this integration program in practice, it is necessary to be able to integrate those classes of elementary functions for which integration methods are well developed. It is important to remember that for any function continuous on an interval $(a ; b)$, there exists an antiderivative on this interval and, consequently, an indefinite integral.

## 1.3 .  INTEGRATION OF SOME CLASSES OF ELEMENTARY FUNCTIONS