Example. Solve the first mixed problem for the heat equation on the interval:

$$
\begin{aligned}
& u_{t}=u_{x x}, \quad x \in(0,1), \quad t \in(0, \infty) \\
& u(x, 0)=\sin ^{3} 2 \pi x, \quad x \in(0,1) \\
& u(0, t)=u(1, t)=0, \quad t \in(0, \infty)
\end{aligned}
$$
## Solution.

1. We find auxiliary solutions of equation (5) in the form

$$
v(x, t)=X(x) T(t),
$$

where $v(0, t)=v(1, t)=0$, i.e., $X(0)=X(1)=0$. For this, we substitute the function $v(x, t)=X(x) T(t)$ into equation (5) and separate the variables:

$$
\frac{X^{\prime \prime}}{X}=\frac{T^{\prime}}{T}=\lambda
$$

Therefore, the functions $X(x)$ and $T(t)$ are solutions of the related problems:

a) $X^{\prime \prime}(x)-\lambda X(x)=0, \quad X(0)=X(l)=0$

b) $T^{\prime}-\lambda T=0$.

3. We solve problem (a).

The equation $X^{\prime \prime}-\lambda X=0$ has the general solution

$$
X(x)=C e^{\sqrt{\lambda} x}+D e^{-\sqrt{\lambda} x}
$$

From the boundary conditions $X(0)=X(l)=0$, it follows that

$$
\lambda_{n}=-\pi^{2} n^{2}, \quad X_{n}=C_{n} \sin \pi n x, \quad n=1,2, \ldots
$$

4. We solve problem (b). For $\lambda=\lambda_{n}=-\pi^{2} n^{2}$, we have

$$
T^{\prime}+\pi^{2} n^{2} T=0
$$

The general solution of this equation is

$$
T_{n}=A_{n} e^{-\pi^{2} n^{2} t}, \quad n=1,2, \ldots
$$

5. Therefore, the auxiliary solutions of equation (5) have the form

$$
v_{n}(x, t)=C_{n} \widetilde{A}_{n} e^{-\pi^{2} n^{2} t} \sin \frac{\pi n}{l} x=A_{n} e^{-\pi^{2} n^{2} t} \sin \frac{\pi n}{l} x
$$

where $A_{n}=C_{n} \widetilde{A}_{n}$.

6. We seek the solution of problem (5)-(7) in the form

$$
u(x, t)=\sum_{n=1}^{\infty} v_{n}(x, t)=\sum_{n=1}^{\infty} A_{n} e^{-\pi^{2} n^{2} t} \sin \pi n x
$$

This function is a solution of equation (5) and satisfies the boundary conditions (7) for any $A_{n}$ for which the series (8) converges. It can be differentiated term by term twice.

7. We find the coefficients $A_{n}$ such that $u(x, t)$ satisfies the initial condition (6), which we write as

$$
u(x, 0)=\sin ^{3} 2 \pi x=\frac{3}{4} \sin 2 \pi x-\frac{1}{4} \sin 6 \pi x
$$

Setting $t=0$ in (8), we get

$$
u(x, 0)=\sum_{n=1}^{\infty} A_{n} \sin \pi n x=\frac{3}{4} \sin 2 \pi x-\frac{1}{4} \sin 6 \pi x
$$

From this,

$$
A_{2}=\frac{3}{4}, A_{6}=-\frac{1}{4}, A_{1}=A_{3}=A_{4}=A_{5}=0, \quad A_{n}=0, n \geqslant 7
$$

Substituting these coefficients into formula (8), we get

$$
u(x, t)=\frac{3}{4} e^{-4 \pi^{2} t} \sin 2 \pi x-\frac{1}{4} e^{-36 \pi^{2} t} \sin 6 \pi x
$$

Answer. $u(x, t)=\frac{3}{4} e^{-4 \pi^{2} t} \sin 2 \pi x-\frac{1}{4} e^{-36 \pi^{2} t} \sin 6 \pi x$.

Conditions of the problems. Solve the first mixed problem for the heat equation on an interval.

1. $u_{t}=4 u_{x x}, x \in(0,2), \quad t \in(0, \infty)$,

$$
u(x, 0)=\sin ^{3} 2 \pi x-\sin 4 \pi x, \quad u(0, t)=u(2, t)=0
$$

2. $u_{t}=9 u_{x x}, \quad x \in(0,3), \quad t \in(0, \infty)$,

$$
u(x, 0)=4 \sin ^{3} 3 \pi x+2 \sin 6 \pi x, \quad u(0, t)=u(3, t)=0
$$

3. $u_{t}=4 u_{x x}, x \in(0,1), t \in(0, \infty)$,

$$
u(x, 0)=16 \sin ^{3} \pi x-3 \sin 2 \pi x, \quad u(0, t)=u(1, t)=0
$$

4. $u_{t}=u_{x x}, \quad x \in(0,2), \quad t \in(0, \infty)$,

$$
u(x, 0)=8 \sin ^{3} 4 \pi x-2 \sin 6 \pi x, \quad u(0, t)=u(2, t)=0
$$

5. $u_{t}=u_{x x} / 4, x \in(0,1 / 2), \quad t \in(0, \infty)$,

$$
u(x, 0)=\sin ^{3} \pi x+4 \sin 2 \pi x, \quad u(0, t)=u(1 / 2, t)=0
$$

6. $u_{t}=u_{x x} / 9, \quad x \in(0,3), \quad t \in(0, \infty)$,

$u(x, 0)=8 \sin ^{3} 3 \pi x-4 \sin 12 \pi x, \quad u(0, t)=u(3, t)=0$.
7. $u_{t}=4 u_{x x}, \quad x \in(0,4), \quad t \in(0, \infty)$,

$$
u(x, 0)=2 \sin ^{3} \pi x+\sin 4 \pi x, \quad u(0, t)=u(4, t)=0
$$

8. $u_{t}=4 u_{x x}, \quad x \in(0,1 / 2), \quad t \in(0, \infty)$,

$$
u(x, 0)=8 \sin ^{3} \pi x-\sin 2 \pi x, \quad u(0, t)=u(1 / 2, t)=0
$$

9. $u_{t}=u_{x x}, \quad x \in(0,1 / 3), \quad t \in(0, \infty)$,

$$
u(x, 0)=2 \sin ^{3} 2 \pi x-\sin \pi x, \quad u(0, t)=u(1 / 3, t)=0 .
$$

10. $u_{t}=9 u_{x x}, \quad x \in(0,1), \quad t \in(0, \infty)$,

$$
u(x, 0)=4 \sin ^{3} \pi x-\sin 2 \pi x, \quad u(0, t)=u(1, t)=0
$$

## Answers.

