Continuity of the function $f(x,y)=\frac{\cos(x+y)+\cos(x-y) -2}{x^2 +y^2 }$
Find the natural domain of the function
$$f(x,y)=\frac{\cos(x+y)+\cos(x-y) -2}{x^2 +y^2 }$$
find the points where it's continuous and for each accumulation point of it's natural domain, determine whether or not the function can be expanded to a continuous one.
My attempt:
I think the natural domain is $\mathscr D_f=\Bbb R^2\setminus\{0,0\}$ and that the function is continuous at every $x\in\mathscr D_f$. The denominator is always positive.
I also think $f(x,y)$ does have a limit as $(x,y)\to (0,0)$.
I was looking at the Taylor expansion of cosine: $\cos x = 1 -\frac12x^2 +\frac{1}{24} x^4 + \cdots$ so $\begin{aligned}\cos(x+y)&=1-\frac12(x+y)^2+\frac1{24}(x+y)^4 + \cdots\\\cos(x-y)&=1-\frac12(x-y)^2+\frac1{24}(x-y)^4 + \cdots\end{aligned}$
The point is that $(x+y)^2 +(x-y)^2 =2x^2 +2y^2,$ so $\cos(x+y)+\cos(x-y)-2=-(x^2 +y^2) +\frac1{12} (x^4 +6x^2 y^2 +y^4 )+\cdots$
which shows that $\lim\limits_{(x,y)\to(0,0)} f(x,y) = -1$ so there is then a removable discontinuity at $(0,0)$ and therefore, we can extend $f(x,y)$ there.
Is this correct? If so, is there anything I could improve or any easier approach?
Thank you very much!
Corrrect. Another way: $\cos(x\pm y)=\cos x \cos y \mp \sin x \sin y$.
So $\cos(x+y)+\cos(x-y)=2\cos x \cos y.$