<s>[INST] Finding distance from Local maximum of $f(x)=x+\sqrt{4x-x^2}$ to bisector of first quadrant 
What is the distance of the local maximum of the function
$f(x)=x+\sqrt{4x-x^2}$ to bisector of first quadrant?
$1)1\qquad\qquad2)\sqrt2\qquad\qquad3)2\qquad\qquad3)2\sqrt2$

It is a question from timed exam so the fastest answers are the best.
My approach:
First I realized the function defined for $x\in[0,4]$. to find local maximum I put derivative equal to zero :
$$f'(x)=1+\frac{4-2x}{2\sqrt{4x-x^2}}=0$$
$$x-2=\sqrt{4x-x^2}$$
$$2x^2-8x+4=0\rightarrow x^2-4x+2=0\rightarrow x=2\pm\sqrt2$$
From here I noticed that the quadratic $-x^2+4x$ is symmetric along $x=2$ line so after plugging $x=2\pm\sqrt2$ in the $\sqrt{4x-x^2}$, hence $f(x)$ is maximum for the value $x=2+\sqrt2$ and $f(2+\sqrt2)=2+\sqrt2+\sqrt{2}=2+2\sqrt2$
Now we should find the distance from the point $(2+\sqrt2,2+2\sqrt2)$ from the line $y=x$. Now by recognizing that $(2+\sqrt2,2+\sqrt2)$ is a point on the line $y=x$, I guess the distance might be $1$ and because it is the least value in the choices then I conclude it is the answer.
Is it possible to solve this problem quickly with other approaches?
 [/INST] $x^2 - 4x + 4 = (x-2)^2$ is a perfect square, so rewrite $f(x)$ as $x + \sqrt{4 - (x-2)^2}$. We want to get $\sqrt{4 - 4 \cos^2 u} = 2 \sin u$ in the given domain, which leads to the parametrisation:
$$(x,y) = (2 + 2 \cos t, 2 + 2 \cos t + 2 \sin t).$$
Now $2 + 2 \cos t + 2 \sin t = 2(1 + \sqrt{2} \cos(t - \pi/4))$, which attains a maximum at $t = \frac{\pi}{4}$, thus:
$$x = 2 + 2 \cos \pi/4 = 2 + \sqrt{2}, y = 2(1 + \sqrt{2}).$$
</s>