Finding maximum value for a function I was working on this question to find the following function's maximum value.Let $$y=f(x)={{(\sqrt{-3+4x-x^2}+4)}}^2 + (x-5)^2$$ where $$1 \le x \le 3$$.I have to find it's maximum value.
I tried by simple method of taking $$\frac{dy}{dx}=0$$ and got the answer.But this path was pretty lenghty and tiresome.Is there any short method possible for this?
 A: You have simply$$y=(\sqrt{-3+4x-x^2}+4)^2 + (x-5)^2 \\
y=(\sqrt{1-(x-2)^2}+4)^2 + (x-5)^2 \\
y'=2(\sqrt{1-(x-2)^2}+4).\frac{-2(x-2)}{2\sqrt{1-(x-2)^2}} + 2(x-5)\\
y'=(\sqrt{1-(x-2)^2}+4).\frac{-2(x-2)}{\sqrt{1-(x-2)^2}} + 2(x-5)\\
y'=\frac{-2(x-2)\sqrt{1-(x-2)^2}-8x+16+2(x-5)\sqrt{1-(x-2)^2}}{\sqrt{1-(x-2)^2}}\\
y'=\frac{\sqrt{1-(x-2)^2}-8(x-2)}{\sqrt{1-(x-2)^2}}\\$$
$y'=0 \to \sqrt{1-(x-2)^2}-8(x-2)=0$ then
$$1-(x-2)^2=64(x-2)^2\\
(x-2)^2=\frac{1}{65}\\
x=2+\frac{1}{\sqrt{65}}\\
x=2-\frac{1}{\sqrt{65}}$$
You have to compare the values of $f$ at these two values and at $x=1$ and at $x=3$. I hope it helps you.
A: You can substitute $x=2+\sin \theta$ with domain $\theta \in [-\frac{\pi}2, \frac{\pi}2]$ and simplify to get $f = 26-8\sin \theta -6 \cos \theta$. 
Now use addition formula or the fact that $a\sin \theta+b\cos \theta$ has a minimum of $-\sqrt{a^2+b^2}$ to get the maximum as $36$. 
A: Since any method you use will end with you having solved the task, do not expect any easier way. After all, in the maximum value (if it is not achieved on the edges), the derivative IS zero, so whatever method you use, it will result in the value of $x$ where the derivative is zero.
Also, the method isn't that long, is it? Derive the function (takes less then a minute for this example), then solve $f'(x)=0$ for $x$. Compare the values of $f(x)$ for all $x$ where $f(x)=0$ and $x=1,3$ and you are done.
