Continuity of multivariable piecewise function (cos, sin)

Continuity of multivariable piecewise function (sin, cos)

Let $$f(x,y) = \begin{cases} \dfrac{\cos(x)xy⁴ + a\sin(x⁴)}{(x^2 + y^2)}\quad& \text{if}\quad (x,y)\neq(0,0)\\ 0\quad& \text{if} \quad (x,y)=(0,0). \end{cases}$$

I should analyze continuity of $f$ in $(0,0)$ for $a = 0$ and $a = 1$. Exercise says that I must justify my answer.

First step) For $a = 0$,

$$f(x,y) = \begin{cases} \dfrac{\cos(x)xy⁴}{(x^2 + y^2)}\quad& \text{if}\quad (x,y)\neq(0,0)\\ 0\quad& \text{if} \quad (x,y)=(0,0). \end{cases}$$

Step 2: For $a = 1$ $$f(x,y) = \begin{cases} \dfrac{\cos(x)xy⁴ + a\sin(x⁴)}{(x^2 + y^2)}\quad& \text{if}\quad (x,y)\neq(0,0)\\ 0\quad& \text{if} \quad (x,y)=(0,0). \end{cases}$$

Step 3: I try to solve for $a = 0$. $f(x,y)$ is continuous at $(0,0)$ $\iff$ $\lim_{x,y \rightarrow 0,0} f(x)= f(0,0)$ In this case, $f(0,0) = 0$.

Step 4 (for $a = 0$):

$\lim_{x,y \rightarrow 0,0} f(x)= \lim_{x,y \rightarrow 0,0} \dfrac{cos(x)xy⁴}{(x^2 + y^2)}\quad$

Limit definition from Wikipedia says

for every ε > 0 there exists a δ > 0 such that for all (x,y) with 0 < ||(x,y) − (p,q)|| < δ, then |f(x,y) − L| < ε

In this case, $L = 0$, and $p=0=q$.

The problem is that I do not know how to go on. cos(x) makes me confused. What should I do? I really think we should need something like this but for two variables. Thanks in advance.

No need to go back to the definition of limits, use some of the properties instead. If $f(x,y)$ is continuous at $(0,0)$, consider $p(x) = (x, 0)$; $p$ is continuous everywhere (perhaps you need to prove that, but that's easy). So: if $f$ is continuous at $(0,0)$, then $g(x) = f \circ p (x)$ is continuous at $0$. Compute $f \circ p$ and show it is not continuous at $0$ for either $a=0$ or $a=1$, again, this is much easier than the original problem. So the conclusion is that the original $f$ is not continuous at $(0,0)$ for either value of $a$.
I gave the argument in relatively formal terms; but what I am doing is this: If $f$ is continuous as a function of two variables, it should in particular be continuous when I fix $y=0$ - and it just isn't.