404. Determine the area of a quadrilateral inscribed in a circle given the sides $a, b, c, d$.

## Euler's Problems.
404. Let the diagonals of quadrilateral $ABCD$ (Fig. 89) be $AC = x$; $BD = y$. According to the theorem of Hipparchus, also known as Ptolemy's theorem, we have:

$$
x y = ac + bd
$$

Moreover,

$$
\frac{x}{y} = \frac{ad + bc}{ab + cd}
$$

From this,

$$
\begin{aligned}
& x = \sqrt{\frac{(ac + bl)(ad + bc)}{ab + cd}} \\
& y = \sqrt{\frac{(ac + bi)(ab + cd)}{ad + bc}}
\end{aligned}
$$

*) This equality can be proven as follows. The area of $\triangle ABD = \frac{ady}{4R}$, and the area of $\triangle BCD = \frac{bcy}{4R}$ (see problem 256). Therefore, the area of $ABCD = \frac{(ad + bc)y}{4R}$. Similarly, the area of $\triangle ABC = \frac{abx}{4R}$, and the area of $\triangle ACD = \frac{dcx}{4R}$, so the area of

$$
ABCD = \frac{(ab + cd)x}{4R}
$$

By comparing both expressions obtained for the area of $ABCD$, we find that

$$
\frac{x}{y} = \frac{ad + bc}{ab + cd}
$$

If the radius of the circumscribed circle is $R$, then for triangle $ABC$ (with sides $a, b$, and $x$), we have:

$$
\begin{aligned}
& R = \frac{abx}{\sqrt{(a+b+x)(a+b-x)(a+x-b)(b+x-a)}} = \\
& = \frac{abx}{\sqrt{\left(2ab + a + b^2 - x^2\right)\left[2ab - \left(a^2 + b^2 - x^2\right)\right]}} = \\
& = \frac{abx}{\sqrt{4ab^2 - \left(a^2 + b^2 - x^2\right)^2}}
\end{aligned}
$$

Substituting the value of $x$ gives:

$$
R = \sqrt{\frac{(ac + bd)(ad + bc)(ab + cd)}{(a+b+c-a)(a+b+d-c)(a+c+d-b)(b+c+d-u)}}
$$

But the area of $\triangle ABC = \frac{abx}{4R}$ and $\triangle ACD = \frac{cdx}{4R}$, so the area of quadrilateral $ABCD$ is $S = \frac{1}{4R} \cdot (ab + cd)x$. Substituting the values of $x$ and $R$ here, we find:

$$
S = \frac{1}{4} \sqrt{(a+b+c-d)(a+b+d-c)(a+c+d-b)(b+c+d-a)}
$$

Letting the semiperimeter $\frac{a+b+c+d}{2}$ be $p$, we finally find:

$$
S = \sqrt{(p-a)(p-b)(p-c)(p-d)}
$$

This remarkable relation was known to the Indians. Setting $d = 0$, we find the well-known Heron's formula for the area of triangle $\triangle = \sqrt{p(p-a)(p-b)(p-c)}$.

Euler, Leonhard (born in Basel in 1707, died in St. Petersburg in 1783), a Swiss by origin, one of the greatest mathematicians, extraordinarily prolific and solving the most difficult problems with amazing ease and virtuosity. His academic activities were closely linked to the prosperity of the St. Petersburg Academy of Sciences, whose publications were adorned with Euler's memoirs, the most indefatigable of its members. Euler lived in Russia for a total of more than 30 years. Number theory, the theory of equations, geometry, trigonometry, the analysis of infinitesimals, mechanics, and astronomy owe equally to Euler's genius, all of whose works are striking in their richness and depth of ideas, diversity of methods and transformations, ingenuity and originality of proofs, and the number of successful notations that have become permanent in science. His pen produced the excellent textbook "Vollständige Anleitung zur Algebra", 1770.

$$
\text{405. } \frac{(8-5\sqrt{2})(3+2\sqrt{2})}{9-8} = 4 + \sqrt{2}
$$