# Find the maximum value of the $f(x) = \sqrt {8x - x^2} - \sqrt {14x - x^2 - 48}$.

The largest value of the function $f(x) = \sqrt {8x - x^2} - \sqrt {14x - x^2 - 48}$ is written in the format $"m \sqrt n"$. Find $m + n$.

My attempt:

A traditionalway would be to differentiate the function w.r.t. $x$ and equate it to $0$.

$$f'(x) = \frac {8 - 2x}{\sqrt {8x - x^2}} - \frac {14 - 2x}{\sqrt {14x - x^2 - 48}}$$

From here, I concluded that : $6 < x < 8$

Equation $f'(x)$ to $0$, I get $x = 6.4$. But that is not the answer. Answer is indeed $x = 6$ and thus $m+n = 5$. (m and n are integers)

My first doubt is $6$ gives $f'(x)$ as '$- \infty$', which is not a maxima or minima because we know that slope of any curve at maxima or minima is $0$ and thus $f'(x)$ should be $0$.

Second is that even if we suppose that $6$ is the answer, why was $6.4$ not taken as the answer.

• HINT: Use geometery – Dhanvi Sreenivasan Nov 15 '16 at 17:32
• @DhanviSreenivasan If you mean by plotting graphs... ya that can be a way... but what is wrong in my method???? I really want to know if my way is wrong or right. – Ishaan Nov 15 '16 at 17:35
• A differentiable function gets maximised on a closed interval when either $f'(x)=0$ or at the boundaries of the interval. in this case it is at the boundary. – Macavity Nov 15 '16 at 17:37

The domain of the function is $6\le x \le 8$. With derivative you obtain max and min in $(6,8)$ but then you must calculate the function on the boudaries. In this case $x=6,4$ is a local point where $f'(x)=0$ but it is not the max because $f(6)>f(6,4)$.

$f(6)=\sqrt 12 = 2\sqrt3$ and $2+3=5$.

The function in $x=6$ is defined but its slope is infinite (tangent line in $x=6$ is vertical and you can think the angular coefficient as infinite).

• So the solution of my first doubt, about f'(6) giving a $- \infty$ can be solved by @Macavity 's comment? How will we know if the curve is open at its boundaries? – Ishaan Nov 15 '16 at 17:45
• So we can say that the function is decreasing? – Ishaan Nov 15 '16 at 17:52
• Yes @Macavity 's comment it is right – MattG88 Nov 15 '16 at 17:53
• You should study the sign of the derivative to say if $f(x)$ is increasing or decreasing. In general the sign of the derivative evaluated on a point it doesn't say us if $f(x)$ is increasing or decreasing – MattG88 Nov 15 '16 at 17:58

Way better Solution

Let's consider the two circles $$(x-4)^2+y^2 = 16$$ $$(x-7)^2 + y^2 = 1$$

We need to find the maximum $y$ displacement possible for a given $x$ between these two, which would occur at $x = 6$ as obvious from drawing these circles

From the geometry, you can also deduce the range of x for which you will get a real output. As one can see, only for $6 \le x \le 8$ does the function actually return a value of $y$, as the smaller circle only extends that much

• This is the approach that jumped out at me when I saw the expression. +1 – Brian Tung Nov 15 '16 at 19:19