<s>[INST] Epsilon delta prove for continuïty$ (1-\cos(|xy|))/y^2$ Let a function, $\mathbb{R}^2\to\mathbb{R}:
\begin{Bmatrix}
\frac{1-\cos(|xy|)}{y^2}&y\neq0\\
\frac{x^2}{2}&y=0
\end{Bmatrix}
$
I have to prove this is continious. For y$\neq 0$, this is trivial, but for $y=0$ I use $\epsilon -\delta$ to prove its continious on all points $(x_0,0)$:
$$\begin{align}\left|\frac{1-\cos(|xy|)}{y^2}-\frac{x_0^2}{2}\right|<\epsilon&\iff\left|\frac{2\sin^2(|xy|/2)}{y^2}-\frac{x_0^2}{2}\right|<\epsilon\\
&\Leftarrow \left|\frac{|xy|^2}{2y^2}-\frac{x_0^2}{2}\right|<\epsilon\\&\iff\left|\frac{x^2}{2}-\frac{x_0^2}{2}\right|<\epsilon\end{align}$$
And now I'm stuck. I need to get $(x-x_0)^2+y^2<\delta_\epsilon$ which seems impossible. What did I do wrong? When I made it bigger (changing the sine with it's argument), was it a bad move? I'm getting desparate.
 [/INST] This statement is confusing:
$$\begin{align}\left|\frac{1-\cos(|xy|)}{y^2}-\frac{x_0^2}{2}\right|<\epsilon&\iff\left|\frac{2\sin^2(|xy|/2)}{y^2}-\frac{x_0^2}{2}\right|<\epsilon\\&\Leftarrow \left|\frac{|xy|^2}{2y^2}-\frac{x_0^2}{2}\right|<\epsilon\\&\iff\left|\frac{x^2}{2}-\frac{x_0^2}{2}\right|<\epsilon\end{align}$$
How does:
$$\left|\frac{|xy|^2}{2y^2}-\frac{x_0^2}{2}\right|<\epsilon$$
imply:
$$\left|\frac{2\sin^2(|xy|/2)}{y^2}-\frac{x_0^2}{2}\right|<\epsilon?$$
Answer: It doesn't.  It is a correct idea, but the actual statements in that line is dead wrong.

The better thing is to start over and use that for small enough $w$ you have:
$$\cos w = 1-\frac{1}{2}w^2 + O(\left|w\right|^4)$$
In particular, there is a $C>0$ and a $w_0>0$ so that if $|w|<w_0$ then $$\left|1-\cos w  -\frac{1}{2}w^2\right|<C\left|w\right|^4$$
Now let $w=xy$ and divide by $\left|y\right|^2$ and you get:
$$\left|\frac{1-\cos (xy)}{y^2} -\frac{1}{2}x^2\right|<C\left|x^2y\right|^2$$
It's still going to take some more steps after that.
In particular, you are going to need:
$$\left|\frac{1-\cos (xy)}{y^2} -\frac{1}{2}x_0^2\right|\leq \left|\frac{1-\cos (xy)}{y^2} -\frac{1}{2}x^2\right|+\left|\frac{1}{2}x^2-\frac{1}{2}x_0^2\right|$$
So you need $|x^2y|<\sqrt{\frac{\epsilon}{2C}}$ and $|x^2-x_0^2|<\epsilon$.
To find a $\delta$, you will have to deal with the cases $x_0=0$ and $x_0\neq 0$ slightly differently.
If $x_0=0$ you first need $\delta<\sqrt{\epsilon}$. You also need $|x^2y|<\sqrt{\frac{\epsilon}{2C}}$. Letting $$\delta=\min\left\{1,\epsilon,\sqrt[4]{\frac{\epsilon}{2C}}\right\}$$ gives you the condition you need. If $x^2+y^2<\delta^2$ then $|x|<\delta$ and $|y|<\delta$. Therefore $|x|<\min\{1,\epsilon\}$ so $|x^2-x_0^2|=|x^2|=|x|\cdot |x|<1\cdot \epsilon=\epsilon$, and $|x^2y|<\sqrt{\frac{\epsilon}{2C}}\cdot 1$, so $C|x^2y|<\frac{\epsilon}2$.
This next step needs some fixing.
If $x_0\neq 0$, then we first start with the condition that $|x-x_0|<\frac{|x_0|}{2}$. This means that $$\left|x+x_0\right|<2\left|x_0\right|$$ and $$|x|<2|x_0|$$. Then you need $$|y|<\frac{1}{4\left|x_0\right|^2}\sqrt{\frac{\epsilon}{2C}}$$
Now $$\left|x^2-x_0^2\right| = \left|(x-x_0)(x+x_0)\right| <2 \left|x-x_0\right| \left|x_0\right|$$
So we choose $$\delta=\min\left\{\frac{1}{4\left|x_0\right|^2}\sqrt{\frac{\epsilon}{2C}}\,,\,\frac{\epsilon}{2\left|x_0\right|}\right\}$$
</s>