# The Perfect View

I don’t remember where I got this question from (probably a textbook somewhere) but I remember it specifically for the different kind of way I went about solving it. Most people like to make a single variable the subject before differentiating, and this is usually the only way they know – if we understand the chain rule or implicit differentiation (which comes from the chain rule), sometimes this can be avoided and hence we can also avoid long slogs of Algebra.

Here it is:

# Question

A painting 3 metres high is placed on a wall with its lower edge 1 metre above the eye level of an observer. Find how far from the wall the observer should stand in order to get the best view of the painting (i.e. so that the angle subtended at his/her eye by the painting is a maximum).

# Solution

We can represent the question with the following diagram:

\(\theta\) is the angle subtended by the the painting and the eye, \(\alpha\) is the angle subtended by the horizontal to the eye and the bottom of the painting.

Using right angled trigonometry,

\[\tan(\theta + \alpha) =\frac{4}{x}\]

Expanding the left using the appropriate trigonometric identity:

\[\frac{\tan \theta + \tan \alpha}{1-\tan \theta \tan \alpha}=\frac{4}{x}\]

We can replace \(\tan\alpha\) with \(\frac{1}{x}\) using right angled trigonometry:

\[\frac{\tan\theta + \frac{1}{x}}{1-\tan\theta\cdot\frac{1}{x}}=\frac{4}{x}\]

Multiply the denominators across to the numerators of the other sides:

\[x\left(\tan\theta + \frac{1}{x}\right)=4\left(1-\tan\theta\cdot\frac{1}{x}\right)\]

\[x\tan\theta + 1=4-\frac{4\tan\theta}{x}\]

\[x\tan\theta + \frac{4\tan\theta}{x}=3\]

\[\left(x+\frac{4}{x}\right)\tan\theta=3\]

\[\left(\frac{x^2+4}{x}\right)\tan\theta = 3\]

\[\tan\theta = \frac{3x}{x^2+4}\]

At this stage, most people would make \(\theta\) the subject and then differentiate with respect of \(x\). This is fine, but it will lead to using a lot of chain rule.

If we just differentiate both sides with respect to \(\theta\) anyway:

\[\begin{align*}\frac{d}{d\theta}\left(\tan\theta\right) &= \frac{d}{d\theta}\left(\frac{3x}{x^2+4}\right)\\&=\frac{d}{dx}\left(\frac{3x}{x^2+4}\right)\cdot\frac{dx}{d\theta}\end{align*}\]

The second line works due to the chain rule. This is not a usual way of differentiating but it saves me a lot of work trying to differentiate \(\tan^{-1}\). Hence:

\[\begin{align*}\sec^2\theta&=\frac{3(x^2+4)-2x(3x)}{(x^2+4)^2}\cdot \frac{dx}{d\theta}\\1&=\frac{-3x^2+12}{(x^2+4)^2}\cos^2\theta\cdot\frac{dx}{d\theta}\\\frac{d\theta}{dx}&=\frac{-3x^2+12}{(x^2+4)^2}\cos^2\theta\end{align*}\]

For stationary points, \(\frac{d\theta}{dx}=0\), i.e.

\[\begin{align*}\frac{-3x^2+12}{(x^2+4)^2}&=0\mbox{ or }\cos^2\theta=0\\x&=2\mbox{ or } \theta=\frac{\pi}{2}\end{align*}\]

However, \(\theta = \frac{\pi}{2}\) is not a physically possible solution (looking up to the sky).

Hence, \(x=2\). Testing this solution to confirm that it is a maximum:

Notice that the denominator and \(\cos^2\theta\) are positive in \(\frac{d\theta}{dx}\). Hence, we only need to test if \(x=2\) is a maximum in the numerator expression:

\[-3x^2+12\]

Since the graph of this is a concave down parabola, \(x=2\) must be a maximum.

Hence, the observer should stand 2 metres away from the painting to maximise his viewing pleasure.