My solution: $x^2+y^2=1$ is the equation of a circle.
Let $x-y=k$. That becomes the equation of a line. Since $(x-y) \in S$, the point $(x,y)$ satisfies both the circle and the line equation. So we know that the graph of the circle and the line have at least $1$ intersection. Now here's the part I have a question about. I drew the graph of the circle and visualised the line equation (slope$=1$) and one can easily conclude that the maximum and minimum values of $k$ occur when the line is a tangent to the circle.
So after concluding this, rest is just calculation. ( The answer is $\sqrt2$, by the way).
My questions are:
- Can we prove that(without visualization) the maximum and minimum values of $k$ occur when the line is tangent to the circle?
2.Is there any other method to solve such a question?
You can do it as follows: since $x=\cos\theta$ and $y=\sin\theta$ for some $\theta\in[0,2\pi]$, then\begin{align}x-y&=\cos(\theta)-\sin(\theta)\\&=\sqrt2\left(\frac1{\sqrt2}\cos(\theta)-\frac1{\sqrt2}\sin(\theta)\right)\\&=\sqrt2\left(\cos\left(\frac\pi4\right)\cos(\theta)-\sin\left(\frac\pi4\right)\sin(\theta)\right)\\&=\sqrt2\cos\left(\frac\pi4+\theta\right)\end{align}and, since the maximum of $\cos$ is $1$, the maximum that you're after is $\sqrt2$.