Example 5. Given the probability density function of a two-dimensional random variable $(X, Y)$

$$
\begin{aligned}
& p(x, y)=0.5 \sin (x+y) \quad\left(0 \leq x \leq \frac{\pi}{2}, 0 \leq y \leq \frac{\pi}{2}\right) . \\
& p(x, y)=0 \quad \text { outside the square } \quad S=\left[0, \frac{\pi}{2} ; 0, \frac{\pi}{2}\right] .
\end{aligned}
$$

Find the distribution function $F(x, y)$ of this variable. Calculate the probability that $X$ and $Y$ take values: $X<\frac{\pi}{6}, Y<\frac{\pi}{6}$.
Solution. By formula (2.8.12) we get

$$
\begin{aligned}
& F(x, y)=\int_{0}^{x} \int_{0}^{y} 0.5 \sin (u+v) d u d v=\int_{0}^{x}\left[\int_{0}^{y} 0.5 \sin (u+v) d v\right] d u= \\
& \int_{0}^{x}\left(-0.5 \cos (u+v)\right|_{v=0} ^{v=y} d u=-0.5 \int_{0}^{x}[\cos (u+y)-\cos u] d u= \\
& =-0.5 \int_{0}^{x} \cos (u+y) d u+0.5 \int_{0}^{x} \cos u d u=-0.5 \sin (u+y)\left|_{u=0} ^{u=x}\right.+ \\
& +0.5 \sin u\left|_{u=0} ^{u=x}\right.=-0.5[\sin (x+y)-\sin y]+0.5 \sin x .
\end{aligned}
$$

Thus,

$$
F(x, y)=0.5[\sin x+\sin y-\sin (x+y)]
$$

According to formula (2.8.7), we find

$$
P\left(X<\frac{\pi}{6}, Y<\frac{\pi}{6}\right)=F\left(\frac{\pi}{6}, \frac{\pi}{6}\right)=0.5\left[\sin \frac{\pi}{6}+\sin \frac{\pi}{6}-\sin \frac{\pi}{3}\right] \approx 0.67
$$