Let $f(x,y) = \frac{1 - \cos(x+y) }{x^2+y^2}$ if $(x,y) \neq (0,0) $, with $f(0,0) = \frac {1}{2}$
Let $g(x,y) = \frac{1- \cos(x+y)}{(x+y)^2} $ if $ x +y \neq 0$ with $ g(x,y) = \frac{1}{2}$ if $x+y =0$
Which of the following statements are correct?
- $f$ is continuous at $(0,0)$
- $f$ is continuous everywhere except at $(0,0)$
- $g$ is continuous at $(0,0)$
- $g$ is continuous everywhere
I take $1 - \cos(x+y) = 2\sin^2(\frac{x+y}{2}) \le 2 \frac{ x^2 +y^2 }{4}$
Now $f (x,y) =\frac{ 2\sin^2(\frac{x+y}{2})}{x^2+y^2} \le \frac {2 \frac{ x^2 +y^2 }{4}}{x^2+y^2} \le \frac{1}{2}$
This makes option $1$ is correct.
I'm confused about the other options, and any hints or solution will be appreciated.
Using your substitutions, $$f(x,y) = \frac{2 \sin^2\left(\frac{x+y}{2}\right)}{x^2+y^2} $$ and thus, seeing that $\sin^2 \alpha \simeq \alpha^2$ as $\alpha \to 0$ in first-order approximation, we get $$\lim_{(x,y) \to (0,0)} \frac{2 \sin^2\left(\frac{x+y}{2}\right)}{x^2+y^2} = \lim_{(x,y)\to(0,0)} \frac 1 2 \frac{\left(x+y\right)^2}{x^2+y^2} = \lim_{(x,y)\to(0,0)} \left[\frac 1 2 + \frac{xy}{x^2 + y^2} \right]$$ and this limit does not exist. To see this, pull $1/2$ out of the limit and substitute $x = r\cos \theta$, $y = r \sin\theta$: then $x^2 + y^2 = r^2$ and $$= \frac 1 2 +\lim_{r \to 0} \frac{r^2 \cos\theta \sin\theta}{r^2} = \frac 1 2 +\cos\theta\sin\theta $$ and this value depends on $\theta$, i.e. on the angle that we are approaching the origin from. So option 1. is incorrect. Statement 2., instead, is correct: we've seen that this function cannot be continuous at the origin, but elsewhere it is a combination of continuous functions and thus must be continuous.
Instead, by seeing that $$g(x,y) = \frac{2 \sin^2\left(\frac{x+y}{2}\right)}{(x+y)^2},$$ we obtain, by the same arguments as before, $$\lim_{(x,y) \to (0,0)} \frac{2 \sin^2\left(\frac{x+y}{2}\right)}{(x + y)^2} = \lim_{(x,y)\to(0,0)} \frac 1 2 \frac{\left(x+y\right)^2}{(x+y)^2} = \frac 1 2$$ so even option 3. is correct.
The function $g$ is surely continuous wherever $x + y \neq 0$ by the same arguments as in the discussion of option 2. Now pick a point $(a,b)$ with $a+b =0$, that is, $b = -a$. This point lies on the line with slope $-1$ passing through the origin. Then $$\lim_{(x,y) \to (a,-a)} \frac{2 \sin^2\left(\frac{x+y}{2}\right)}{(x+y)^2} = \lim_{(x,y) \to (a,-a)}2 \frac{ \left(\frac{x+y}{2}\right)^2}{\left(x+y\right)^2} = \frac 1 2$$ and thus even statement 4. is correct. (Notice that this implies that statement 3. is correct, so it would have sufficed to show this.)