`a=1+\sqrt{-x^2+2x+1}`
`a=1+\sqrt{-x^2+2x-1+1+1}`
`a=1+\sqrt{-(x^2-2x+1)+2}`
`a=1+\sqrt{-(x-1)^2+2}`
Ta thấy: `(x-1)^2≥0∀x`
⇒`-(x-1)^2≤0∀x`
⇒`-(x-1)^2≤2`
⇒`\sqrt{-(x-1)^2+2}≤\sqrt{2}`
Dấu `=` xảy ra ⇔`-x+1=0`
⇔`-x=-1`
⇔`x=1`
Vậy `Max_{a}=1+\sqrt{2}`⇔`x=1`