<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] Let $u$ be the maximum value of $f(x)$. Then:
$$\sqrt{4x-x^2} = u-x \Rightarrow 4x-x^2 = u^2 - 2ux + x^2$$
$$\Rightarrow 2x^2 - x(2u + 4) + u^2 = 0 \tag{*}$$
$$\Delta = 0 \Rightarrow (2u+4)^2-4(2)(u^2) = 0$$
$$\Rightarrow -4u^2+16u+16=0 \Rightarrow u^2 - 4u - 4 = 0$$
$$\Rightarrow u = 2 ± 2\sqrt{2}$$
hence the maximum value ($y$) is $2 + 2 \sqrt{2}$.
Since $\Delta = 0$, quadratic $(*)$ is a perfect square. Let this be $(ax-b)^2$: thus $b = 2 + 2 \sqrt{2}$ being the only constant term, and $a^2 = 2 \Rightarrow a = \sqrt{2}$ (concave up). Thus when $(ax-b)^2 = 0$, $\sqrt{2}x - (2 + 2\sqrt{2})=0 \Rightarrow x = \frac{\sqrt2 + 2 \sqrt{2}}{\sqrt{2}} = 2 + \sqrt{2}$.
</s>