The above diagram is a plan of a prison compound. The outer square \(ABCD\) represents the walls of the compound (whose height may be neglected), while the inner square \(XYZT\) is the Black Tower, a solid stone structure. A guard patrols along segment \(AE\) of the walls, for a distance of up to 4 units from \(A\). Determine the distance from \(A\) of points at which the area of the courtyard that he can see is
as small as possible,
as large as possible.
[\(Hint. \)It is suggested that you express the area he \textit{cannot
}see in terms of \(p\), his distance from \(A\).]
Solution:
The area he cannot see is
\begin{align*}
&&A &= \underbrace{8^2}_{\text{everywhere above}(4,4)} - \underbrace{4^2}_{\text{inner square}} - \underbrace{\frac12 \cdot 4 \cdot (\frac32(4-p)+p - 4)}_{\text{blue triangle}} - \underbrace{\frac12 \cdot 4 \cdot \frac{4(12-p)}{8-p}}_{\text{green triangle}} \\
&&&= 48 - 3(4-p)-2(p-4) - \frac{8(12-p)}{8-p} \\
&&&= 36-5p-\frac{32}{8-p} \\
\\
\Rightarrow && \frac{\d A}{\d p} &= -5 + \frac{32}{(8-p)^2} \\
&&&> 0 \text{ if } 0 \leq p \leq 4
\end{align*}
Since the area not visible is increasing as \(p\) increases, we would like \(p\) to be as large as possible, ie \(p = 4\).