3. Heron's Formula says that if a triangle has side lengths $a, b$ and $c$, then its area equals $\sqrt{s(s-a)(s-b)(s-c)}$, where $s=\frac{1}{2}(a+b+c)$ is called the semi-perimeter of the triangle.
(a) In the diagram, $\triangle A B C$ has side lengths $A B=20, B C=99$, and $A C=101$. If $h$ is the perpendicular distance from $A$ to $B C$, determine the value of $h$.
(b) In the diagram, trapezoid $P Q R S$ has $P S$ parallel to $Q R$. Also, $P Q=7$, $Q R=40, R S=15$, and $P S=20$. If $x$ is the distance between parallel sides $P S$ and $Q R$, determine the value of $x$.
(c) The triangle with side lengths 3, 4 and 5 has the following five properties:
- its side lengths are integers,
- the lengths of its two shortest sides differ by one,
- the length of its longest side and the semi-perimeter differ by one,
- its area is an integer, and
- its perimeter is less than 200.
Determine all triangles that have these five properties.
3. (a) Solution 1
Our strategy is to calculate the area of $\triangle A B C$ in two different ways, which will give us an equation for $h$.
Since $\triangle A B C$ has side lengths 20,99 and 101, its semi-perimeter is $s=\frac{1}{2}(20+99+101)$ which equals $\frac{1}{2}(220)$ or 110 .
By Heron's formula, the area of $\triangle A B C$ is thus
$$
\begin{aligned}
\sqrt{110(110-20)(110-99)(110-101)} & =\sqrt{110(90)(11)(9)} \\
& =\sqrt{11(10)(9)(10)(11)(9)} \\
& =\sqrt{9^{2} 10^{2} 11^{2}} \\
& =9 \cdot 10 \cdot 11 \\
& =990
\end{aligned}
$$

Also, $\triangle A B C$ can be viewed as having base 99 and height $h$.
Thus, the area of $\triangle A B C$ also equals $\frac{1}{2}(99) h$.
Equating the two representations of the area, we obtain $\frac{1}{2}(99) h=990$ or $\frac{1}{2} h=10$ from which $h=20$.

Solution 2
Since $20^{2}+99^{2}=101^{2}$, then $\triangle A B C$ is right-angled at $B$.
Therefore, $A B$ is the perpendicular height of the triangle from $A$ to $B C$.
Thus, $h=20$.
(b) As in (a), we calculate the area of the figure in two different ways. Since $P Q R S$ is a trapezoid with parallel sides $P S=20$ and $Q R=40$ and the distance between the parallel sides is $x$, then the area of $P Q R S$ is $\frac{1}{2}(20+40) x=30 x$.
To determine a second expression for the area, we drop perpendiculars from $P$ and $S$ to points $X$ and $Y$ on $Q R$.

Then $P S Y X$ is a rectangle since $P S$ and $X Y$ are parallel and the angles at $X$ and $Y$ are right angles.
The area of rectangle $P S Y X$ is $20 x$.
If we cut out rectangle $P S Y X$ and "glue" the two small triangles together along $P X$ and $S Y$ (which are equal in length and each perpendicular to the base), we obtain a triangle with side lengths $P Q=7, S R=15$, and 20 . (The third side has length 20 since we removed a segment of length 20 from a side of length 40 .)
This triangle has semi-perimeter $\frac{1}{2}(7+15+20)=21$ and so, using Heron's formula, its area is
$$
\sqrt{21(21-7)(21-15)(21-20)}=\sqrt{21(14)(6)}=\sqrt{2^{2} 3^{2} 7^{2}}=42
$$

The area of trapezoid $P Q R S$ is equal to the area of the rectangle plus the area of the triangle, or $20 x+42$.
Equating expressions for the area, we obtain $30 x=20 x+42$, which gives $10 x=42$ and so $x=4.2$.
(c) Consider a triangle that has the given properties. Call the side lengths $a, b, c$, for some integers $a, b$ and $c$, with $a \leq b \leq c$. Since the lengths of the two shortest sides differ by 1 , then $b=a+1$.
Thus, we call the side lengths $a, a+1$, and $c$.
In a given triangle, each side must be less than half of the perimeter of the triangle. This is a result called the Triangle Inequality.

For example, in the triangle shown, the shortest path from $B$ to $C$ is the straight line segment of length $a$. Therefore, the path from $B$ to $A$ to $C$ (of length $c+b$ ) must be longer than $a$.
This means that $c+b>a$ and so the perimeter $a+b+c$ is greater than $a+a$, or $a$ is less than half of the perimeter. The same logic applies to each of the other sides too.
The semi-perimeter of the triangle with side lengths $a, a+1, c$ is $s=\frac{1}{2}(a+a+1+c)$.
Since the longest side length, $c$, and the semi-perimeter, $s$, differ by 1 and since $c$ must be less than $s$, then $c=s-1$ or $s=c+1$.
Therefore, $c+1=\frac{1}{2}(a+a+1+c)$ and so $2 c+2=2 a+1+c$ or $c=2 a-1$.
Thus, the side lengths of the triangle are $a, a+1$, and $2 a-1$.
The perimeter of the triangle, in terms of $a$, is thus $a+(a+1)+(2 a-1)=4 a$, and so the semi-perimeter is $2 a$.
Since the perimeter of the triangle is less than 200 , then $4 a<200$ or $a<50$.
We have now used four of the five conditions, and still need to use the fact that the area of the triangle is an integer.
Since the semi-perimeter is $2 a$, by Heron's formula, the area of the triangle is
$$
\begin{aligned}
\sqrt{s(s-a)(s-b)(s-c)} & =\sqrt{2 a(2 a-a)(2 a-(a+1))(2 a-(2 a-1))} \\
& =\sqrt{2 a(a)(a-1)(1)} \\
& =\sqrt{a^{2}(2 a-2)}
\end{aligned}
$$

For the area to be an integer, $\sqrt{a^{2}(2 a-2)}$ must be an integer.
For $\sqrt{a^{2}(2 a-2)}$ to be an integer, $a^{2}(2 a-2)$ must be a perfect square.
For $a^{2}(2 a-2)$ to be a perfect square, then $2 a-2$ must be a perfect square.
Now, $2 a-2$ is a multiple of 2 and so is even. Also, since $a$ is a positive integer with $1 \leq a<50$, then $2 a-2$ is an integer with $0 \leq 2 a-2<98$.
The even perfect squares in this range are $0,4,16,36,64$.
In these cases, we have $a=1,3,9,19,33$.
Since the triangle has side lengths $a, a+1$, and $2 a-1$, then this gives triangles with side lengths
$$
\begin{array}{lllll}
1,2,1 & 3,4,5 & 9,10,17 & 19,20,37 & 33,34,65
\end{array}
$$

The first set of integers are not the side lengths of a triangle, since $1+1=2$.
Each of the four remaining sets of integers do form a triangle, since each side length is less than the sum of the other two side lengths.

Therefore, the four triangles that satisfy the five given conditions have side lengths
$$
3,4,5 \quad 9,10,17 \quad 19,20,37 \quad 33,34,65
$$