Example. Compute the integral

$$
\int_{-\infty}^{+\infty} \frac{x+1}{x^{2}-2 x+2} \cos x d x
$$
Solution. To solve the problem, it is sufficient to compute the improper integral

$$
\int_{-\infty}^{+\infty} \frac{x+1}{x^{2}-2 x+2} e^{i x} d x
$$

and use the formula

$$
\int_{-\infty}^{+\infty} \frac{x+1}{x^{2}-2 x+2} \cos x d x=\operatorname{Re} \int_{-\infty}^{+\infty} \frac{x+1}{x^{2}-2 x+2} e^{i x} d x
$$

1. To apply the residue theorem, we introduce the function of a complex variable

$$
f(z)=\frac{z+1}{z^{2}-2 z+2} e^{i z}
$$

and construct a contour consisting of the segment of the real axis $[-\varrho, \varrho]$ and the semicircle $C_{\varrho}=\{|z|=\varrho, \operatorname{Im} z \geqslant 0\}$, choosing $\varrho$ so that all singular points $z_{k}(k=1,2, \ldots, n)$ of the function $f(z)$, lying in the upper half-plane, are inside the contour. Then, by the residue theorem,

$$
\int_{-\varrho}^{\varrho} \frac{x+1}{x^{2}-2 x+2} e^{i x} d x+\int_{C_{\varrho}} f(z) d z=2 \pi i \sum_{k=1}^{n} \operatorname{res}_{z=z_{k}} f(z)
$$

We take the limit as $\varrho \rightarrow+\infty$. Since in our case

$$
g(z)=\frac{z+1}{z^{2}-2 z+2}
$$

is a proper rational fraction and $\lambda=1>0$, the conditions of Jordan's lemma are satisfied, and therefore,

$$
\lim _{\varrho \rightarrow+\infty} \int_{C_{\varrho}} f(z) d z=0
$$

Since the right-hand side in (5) does not depend on $\varrho$, we have

$$
\int_{-\infty}^{+\infty} \frac{(x+1)}{x^{2}-2 x+2} e^{i x} d x=2 \pi i \sum_{k=1}^{n} \operatorname{res}_{z_{k}} \frac{z+1}{z^{2}-2 z+2} e^{i z}
$$

where $z_{k}$ are the singular points of the function

$$
f(z)=\frac{z+1}{z^{2}-2 z+2} e^{i z}
$$

lying in the upper half-plane.

2. We find the singular points of the function

$$
f(z)=\frac{z+1}{z^{2}-2 z+2} e^{i z}=\frac{z+1}{(z-1-i)(z-1+i)} e^{i z}
$$

as the zeros (of the first order) of its denominator: $z=1+i$ and $z=1-i$. Thus, the points $z=1+i$ and $z=1-i$ are poles of the first order. In the upper half-plane, there is only one point $z=1+i$.

3. We compute the residue at the simple pole $z=1+i$ using the formula

$$
\operatorname{res}_{z=z_{0}} \frac{\varphi(z)}{\psi(z)}=\frac{\varphi\left(z_{0}\right)}{\psi^{\prime}\left(z_{0}\right)}
$$

where $\varphi(z)=(z+1) e^{i z}$ and $\psi(z)=z^{2}-2 z+2$. We get

$$
\operatorname{res}_{z=1+i} \frac{(z+1) e^{i z}}{z^{2}-2 z+2}=\left.\frac{(z+1) e^{i z}}{2 z-2}\right|_{z=1+i}=\frac{(2+i) e^{-1+i}}{2 i}
$$

4. We compute the improper integral using formula (6):

$$
\int_{-\infty}^{+\infty} \frac{x+1}{x^{2}-2 x+2} e^{i x} d x=2 \pi i \frac{(2+i) e^{-1+i}}{2 i}=\pi e^{-1}(2+i)(\cos 1+i \sin 1)
$$

5. Using formula (4), we compute the desired integral

$$
\int_{-\infty}^{+\infty} \frac{x+1}{x^{2}-2 x+2} \cos x d x=\operatorname{Re}\left[\int_{-\infty}^{+\infty} \frac{x+1}{x^{2}-2 x+2} e^{i x} d x\right]=
$$

$$
=\operatorname{Re}\left(\pi e^{-1}(2+i)(\cos 1+i \sin 1)\right)=\pi e^{-1}(2 \cos 1-\sin 1)
$$

Answer. $\int_{-\infty}^{+\infty} \frac{x+1}{x^{2}-2 x+2} \cos x d x=\pi e^{-1}(2 \cos 1-\sin 1)$.

### Conditions of the Problems. Compute the integrals using residues.

1. $\int_{-\infty}^{+\infty} \frac{x \cos x}{x^{2}-2 x+10} d x$.
2. $\int_{-\infty}^{+\infty} \frac{\cos 2 x}{x^{2}-x+1} d x$
3. $\int_{-\infty}^{+\infty} \frac{(x-1) \cos x}{x^{2}-2 x+2} d x$
4. $\int_{-\infty}^{+\infty} \frac{x \sin 6 x}{x^{2}+4 x+13} d x$.
5. $\int_{-\infty}^{+\infty} \frac{(x+1) \cos x}{x^{2}-4 x+6} d x$
6. $\int_{0}^{\infty} \frac{x \sin x}{x^{4}+1} d x$.
7. $\int_{0}^{\infty} \frac{\cos x}{\left(x^{2}+4\right)^{2}} d x$.
8. $\int_{0}^{\infty} \frac{\cos x}{\left(x^{2}+4\right)\left(x^{2}+9\right)} d x$.
9. $\int_{0}^{\infty} \frac{x \sin 3 x}{x^{2}+16} d x$.
10. $\int_{0}^{\infty} \frac{x \sin x}{\left(x^{2}+1\right)^{2}} d x$.

### Answers.

1. $\frac{\pi}{3} e^{-3}(\cos 1-3 \sin 1)$.
2. $\frac{2 \pi}{\sqrt{3}} e^{-\sqrt{3}} \cos 1$.
3. $-\pi e^{-1} \sin 1$.
4. $\frac{\pi}{3} e^{-18}(3 \cos 12+2 \sin 12)$.
5. $\frac{\pi}{\sqrt{2}} e^{-4 \sqrt{2}}(3 \cos 8-\sqrt{2} \sin 8)$.
6. $\frac{\pi}{2} e^{-1 / \sqrt{2}} \sin \frac{1}{\sqrt{2}}$. 7. $\frac{3 \pi}{32} e^{-2}$.
7. $\frac{\pi}{10}\left(\frac{e^{-2}}{2}-\frac{e^{-3}}{3}\right)$.
8. $\frac{\pi}{2} e^{-12}$.
9. $\frac{\pi}{4} e^{-1}$.

### Chapter 2

### OPERATIONAL CALCULUS

When studying the topic of OPERATIONAL CALCULUS, you will become familiar with the concepts of the original function and its image (by Laplace), study the properties of originals and images, and learn to apply them to solve ordinary differential equations and systems using the operational method.

Using the RESHEBNIK VM package, you will be able to compute integrals, find the partial fraction decomposition of rational functions, compute derivatives, and perform all other actions necessary for studying the topic. Once you are proficient in it, you will be able to compute images and restore originals from their images with simple keystrokes on the computer keyboard, using the capabilities of the STEM Plus module, which is part of the RESHEBNIK VM package.

### 2.1. Concepts of Original and Image

### Problem Statement. Prove that the function $f(t)$ is an original and find its image (by Laplace).

### Plan of Solution. A complex-valued function $f(t)$ of a real variable $t$ is called an original if it satisfies three conditions:

a) $f(t) \equiv 0$ for all $t<0$ and $s \geqslant 0$ such that

$$
|f(t)|<M e^{s t} \quad \text{for all } t>0
$$

The smallest number $s$ for which this inequality holds is called the growth indicator of the function $f(t)$.

If $f(t)$ is an original, then its Laplace transform $F(p)$ (where $p$ is a complex variable) is defined by the formula

$$
F(p)=\int_{0}^{\infty} e^{-p t} f(t) d t
$$

The function $F(p)$ of the complex variable $p$ is also called the image (by Laplace) of the function $f(t)$. The connection between the original and the image is denoted by the symbol

$$
f(t) \longleftrightarrow F(p) .
$$

Remark. In the half-plane $\operatorname{Re} p>s$ (where $s$ is the growth indicator of the original $f(t)$), the integral (1) converges absolutely and defines an analytic function $F(p)$.

1. We prove that the function $f(t)$ is an original by verifying the conditions a)-c). We determine the growth indicator $s$ of the function $f(t)$.
2. We find the