Example. Find the solution to the Cauchy problem

$$
y^{\prime \prime}+y=\frac{1}{\cos x}
$$

with initial conditions $y(0)=1, y^{\prime}(0)=0$.
Solution.

1. We write the corresponding homogeneous equation:

$$
y^{\prime \prime}+y=0
$$

We find the fundamental system of solutions $y_{1}=\cos x$ and $y_{2}=\sin x$ and the general solution of the homogeneous equation

$$
y=C_{1} \cos x+C_{2} \sin x
$$

2. We apply Lagrange's method (method of variation of arbitrary constants):
a) we look for a solution of the given non-homogeneous equation in the form

$$
y=C_{1}(x) \cos x+C_{2}(x) \sin x
$$

b) we write the system of equations to determine the functions $C_{1}^{\prime}(x)$ and $C_{2}^{\prime}(x):$

$$
\left\{\begin{array}{l}
C_{1}^{\prime}(x) \cos x+C_{2}^{\prime}(x) \sin x=0 \\
C_{1}^{\prime}(x)(-\sin x)+C_{2}^{\prime}(x) \cos x=1 / \cos x
\end{array}\right.
$$

Solving it (since we are looking for a solution in the neighborhood of the point $x=0$, then $\cos x>0$), we get

$$
C_{1}^{\prime}(x)=-\operatorname{tg} x, \quad C_{2}^{\prime}(x)=1
$$

Integrating, we find

$$
C_{1}(x)=\ln \cos x+C_{1}^{*}, \quad C_{2}(x)=x+C_{2}^{*}
$$

c) we write the obtained general solution of the given non-homogeneous equation

$$
y=\left(\ln \cos x+C_{1}^{*}\right) \cos x+\left(x+C_{2}^{*}\right) \sin x
$$

3. Using the initial conditions, we determine the constants $C_{1}^{*}$ and $C_{2}^{*}$. Since

$$
y(0)=\left(\ln \cos 0+C_{1}^{*}\right) \cos 0+\left(0+C_{2}^{*}\right) \sin 0=0
$$

then $C_{1}^{*}=1$. Since

$y^{\prime}(0)=\left(\ln \cos 0+C_{1}^{*}\right) \sin 0+\left(-\frac{\sin 0}{\cos 0}\right) \cos 0+\sin 0+\left(0+C_{2}^{*}\right) \cos 0=0$, then $C_{2}^{*}=0$.

Answer. $y=\cos x(\ln \cos x+1)+x \sin x$.

Conditions of the Problem. Find the solutions of the Cauchy problems for differential equations.

1. $y^{\prime \prime}+2 y^{\prime}+y=\frac{e^{-x}}{x}, \quad y(1)=0, \quad y^{\prime}(1)=0$.
2. $y^{\prime \prime}+y=\frac{1}{\sin x}$,

$y\left(\frac{\pi}{2}\right)=1, \quad y^{\prime}\left(\frac{\pi}{2}\right)=0$.
3. $y^{\prime \prime}+4 y=2 \operatorname{tg} x$,

$y(0)=0$,

$y^{\prime}(0)=-2$.
4. $y^{\prime \prime}+4 y=\frac{1}{\cos 2 x}$

$y(0)=0$,

$y^{\prime}(0)=0$.
5. $y^{\prime \prime}+y=\operatorname{tg} x$,

$y(0)=2$,

$y^{\prime}(0)=1$.
6. $y^{\prime \prime}-2 y^{\prime}+y=\frac{e^{x}}{x}$

$y(1)=e$,

$y^{\prime}(1)=3 e$.
7. $y^{\prime \prime}-y=\operatorname{th} x$,

$y(0)=2+\frac{\pi}{2}, \quad y^{\prime}(0)=1$.
8. $y^{\prime \prime}-2 y=4 x^{2} e^{x^{2}}$,

$y(0)=3$,

$y^{\prime}(0)=0$.
9. $y^{\prime \prime}-y=\frac{4 x^{2}+1}{x \sqrt{x}}$

$y(1)=e-4$,

$y^{\prime}(1)=e-2$.
10. $y^{\prime \prime}-2 y+y=\frac{x^{2}+2 x+2}{x^{3}}, \quad y(-1)=\frac{1}{e}-1, \quad y^{\prime}(-1)=\frac{1}{e}-1$.

Answers.

1. $y=(1-x+x \ln x) e^{-x}$.
2. $y=\frac{\pi}{2} \cos x+\sin x-x \cos x+\sin x \ln |\sin x|$.
3. $y=-x \cos 2 x-\frac{1}{2} \sin 2 x+\sin 2 x \ln |\cos x|$.
4. $y=\frac{1}{4} \cos 2 x \ln |\cos 2 x|+\frac{x}{2} \sin 2 x$.
5. $y=\cos x+\sin x+\cos \ln \left|\operatorname{ctg}\left(\frac{x}{2}+\frac{\pi}{4}\right)\right|$.
6. $y=x e^{x}(1+\ln x)$.
7. $y=\left(e^{x}+e^{-x}\right)\left(1+\operatorname{arctg} e^{x}\right)$.
8. $y=e^{x \sqrt{2}}+e^{-x \sqrt{2}}+e^{x^{2}}$.
9. $y=e^{x}-4 \sqrt{x}$.
10. $y=e^{x}+\frac{1}{x}$.

## $\Gamma$ lav a 12

## MULTIPLE INTEGRALS

When studying the topic of MULTIPLE INTEGRALS, you will learn to describe regions (on the plane and in space) using inequalities in Cartesian, polar, cylindrical, and spherical coordinates, set integration limits, and reduce multiple integrals to iterated integrals. You will also learn to solve problems in geometry and mechanics using double and triple integrals (in Cartesian, polar, generalized polar, cylindrical, and spherical coordinates).

Using the package RESHEBNIK.VM, you can solve inequalities, compute the resulting iterated integrals, perform all numerical calculations, and check the correctness of the results you obtained.

## 12.1. Changing the Order of Integration

PROBLEM STATEMENT. Change the order of integration

$$
I=\int_{a}^{b} d y \int_{x_{1}(y)}^{x_{2}(y)} f(x, y) d x+\int_{c}^{d} d y \int_{x_{3}(y)}^{x_{4}(y)} f(x, y) d x
$$

SOLUTION PLAN.

1. The region of integration consists of two regions $D_{1}$ and $D_{2}$. We define them using inequalities

$$
\begin{aligned}
& D_{1}=\left\{(x, y): \begin{array}{c}
a \leq y \leq b \\
x_{1}(y) \leq x \leq x_{2}(y)
\end{array}\right\} \\
& D_{2}=\left\{(x, y): \begin{array}{c}
c \leq y \leq d \\
x_{3}(y) \leq x \leq x_{4}(y)
\end{array}\right\}
\end{aligned}
$$

2. We solve the systems of inequalities defining the regions $D_{1}$ and $D_{2}$ with respect to $y$ and obtain

$$
y_{1}^{(1)}(x) \leq y \leq y_{2}^{(1)}(x), \quad y_{1}^{(2)}(x) \leq y \leq y_{2}^{(2)}(x)
$$

3. We determine the boundaries of variation of $x$ by solving the inequalities

$$
y_{1}^{(1)}(x) \leq y_{2}^{(1)}(x), \quad y_{1}^{(2)}(x) \leq y_{2}^{(2)}(x)
$$

We get $l_{1} \leq x \leq m_{1}$ and $l_{2} \leq x \leq m_{2}$.

4. The regions $D_{1}$ and $D_{2}$ can be represented as

$$
\begin{aligned}
& D_{1}=\left\{\begin{array}{cc}
(x, y): & l_{1} \leq x \leq m_{1}, \\
y_{1}^{(1)}(x) \leq y \leq y_{2}^{(1)}(x)
\end{array}\right\} \\
& D_{2}=\left\{(x, y): \begin{array}{c}
l_{2} \leq x \leq m_{2} \\
y_{1}^{(2)}(x) \leq y \leq y_{2}^{(2)}(x)
\end{array}\right\}
\end{aligned}
$$

5. We write the integrals $I$ with the changed order of integration:

$$
I=\int_{l_{1}}^{m_{1}} d x \int_{y_{1}^{(1)}(x)}^{y_{2}^{(1)}(x)} f(x, y) d y+\int_{l_{2}}^{m_{2}} d x \int_{y_{1}^{(2)}(x)}^{y_{2}^{(2)}(x)} f(x, y) d