In a rectangular garden, a plum tree grows. This tree is 5 meters and 12 meters away from two adjacent corners of the garden, and the distance between these two corners is 13 meters. Additionally, we know that the plum tree stands on the diagonal of the garden. How large can the area of the garden be?

(M. Mach)

Idea. Use the Pythagorean theorem appropriately, or its converse.
Let's denote the rectangle representing the garden's plan as $A B C D$, and the plum tree on one of its diagonals is represented by point $X$. Let's say two adjacent corners from the problem are $A, B$ and it is given that $|A X|=5, |B X|=12, |A B|=13$. (All lengths are in meters and units will not be written further.) These numbers form a Pythagorean triple, meaning $5^{2}+12^{2}=13^{2}$. Therefore, triangle $A X B$ is a right triangle with hypotenuse $A B$, i.e., with a right angle at vertex $X$.

Point $X$ can lie either on diagonal $A C$ or on diagonal $B D$, and we will discuss both possibilities. In each case, the distance from point $X$ to the other vertex on the diagonal will be denoted by $x$, and the unknown side length of the rectangle will be denoted by $y$. From the given information, we will determine $y$, and the area of the garden (in square meters) will be $13 y$.
![](https://cdn.mathpix.com/cropped/2024_04_17_aa8865afb54b9c300d40g-7.jpg?height=1270&width=1374&top_left_y=240&top_left_x=341)

I. Point $X$ lies on diagonal $A C$. According to the Pythagorean theorem for right triangles $A B C$ and $B X C$, we set up a system of two equations with two unknowns:

$$
\begin{aligned}
(5+x)^{2} & =13^{2}+y^{2} \\
y^{2} & =12^{2}+x^{2}
\end{aligned}
$$

Substitute $y^{2}$ into the first equation and solve for $x$:

$$
\begin{aligned}
(5+x)^{2} & =13^{2}+12^{2}+x^{2}, \\
25+10 x+x^{2} & =169+144+x^{2}, \\
10 x & =288, \\
x & =\frac{144}{5} .
\end{aligned}
$$

Substitute $x$ into the second equation and simplify the expression:

$$
y^{2}=12^{2}+\left(\frac{144}{5}\right)^{2}=144+\frac{20736}{25}=\frac{24336}{25} .
$$

Thus, $y=\frac{156}{5}$ and the area of rectangle $A B C D$, i.e., the area of the garden (in square meters), in this case is:

$$
13 \cdot \frac{156}{5}=\frac{2028}{5}=405.6 .
$$

II. Point $X$ lies on diagonal $B D$. According to the Pythagorean theorem for right triangles $D A B$ and $D X A$, we set up a system of two equations with two unknowns:

$$
\begin{aligned}
(12+x)^{2} & =13^{2}+y^{2} \\
y^{2} & =5^{2}+x^{2}
\end{aligned}
$$

Substitute $y^{2}$ into the first equation and solve for $x$:

$$
\begin{aligned}
(12+x)^{2} & =13^{2}+5^{2}+x^{2}, \\
144+24 x+x^{2} & =169+25+x^{2}, \\
24 x & =50, \\
x & =\frac{25}{12} .
\end{aligned}
$$

Substitute $x$ into the second equation and simplify the expression:

$$
y^{2}=5^{2}+\left(\frac{25}{12}\right)^{2}=25+\frac{625}{144}=\frac{4225}{144} .
$$

Thus, $y=\frac{65}{12}$ and the area of rectangle $A B C D$, i.e., the area of the garden (in square meters), in this case is:

$$
13 \cdot \frac{65}{12}=\frac{845}{12} \approx 70.42
$$

Note. Notice the calculation of the length $x$. By using the Pythagorean theorem twice, we derived in the first case that $5 x=144$, which corresponds to $|A X| \cdot|X C|=|X B|^{2}$. This calculation essentially proves that this equality holds in any right triangle $A B C$, where $X$ is the foot of the altitude on the hypotenuse $A C$. This statement is known as the Theorem of the Altitude by Euclid.

Another idea. Notice the similar triangles.

Another solution. With the same notation as above, we can discuss the individual cases as follows.

I. Point $X$ lies on diagonal $A C$. Triangles $A B C$ and $A X B$ are both right triangles and have the same interior angle at the common vertex $A$. Therefore, these triangles are similar, and it follows that:

$$
\frac{|B C|}{|A B|}=\frac{|X B|}{|A X|}
$$

or

$$
\frac{y}{13}=\frac{12}{5}
$$

Thus, $y=\frac{156}{5}$, and the conclusion is the same as in the previous solution.

II. Point $X$ lies on diagonal $B D$. Triangles $D A B$ and $A X B$ are both right triangles and have the same interior angle at the common vertex $B$. Therefore, these triangles are similar, and it follows that:

$$
\frac{|D A|}{|A B|}=\frac{|A X|}{|X B|}
$$

or

$$
\frac{y}{13}=\frac{5}{12}
$$

Thus, $y=\frac{65}{12}$, and the conclusion is the same as in the previous solution.