Limit of a function $f(x,y)$ within $\mathbb{R}^{2}$ that has a different defintion when $x$ and $y$ are both rational I have come to a problem in a multivariable calculus text book that I'm having trouble solving.
The problem goes :
"Let $f : \mathbb{R}^{2} \rightarrow \mathbb{R}$ be defined by $f(x,y) := x^{2} + y^{2}$ if
both $x$ and $y$ are rational, and $f(x,y) := 0$ otherwise. Determine the points of
$\mathbb{R}^{2}$ at which (i.) $f_{x}$ exists, (ii.) $f_{y}$ exists."
Here $f_{x}$ is the partial derivative with respect to $x$ and $f_{y}$ is the partial
derivative with respect to $y$. I know $f_{x}$ is given by the following limit :
\begin{equation}
f_{x}(x,y) = \lim_{h \rightarrow 0} \frac{ f(x+h,y) - f(x,y) }{h} 
\end{equation}
Now let the irrational numbers be denoted $\mathbb{F} = \mathbb{R} \setminus \mathbb{Q}$.
I know from the internet :
\begin{align}
a,b \in \mathbb{Q} & \Rightarrow a + b \in \mathbb{Q}\\
a \in \mathbb{Q} \text{ and } b \in \mathbb{F} & \Rightarrow a + b \in \mathbb{F} \\
a,b \in \mathbb{F} & \Rightarrow a + b \in \mathbb{F}
\end{align}
Now let's assume for example $(x_{r},y_{r}) \in \mathbb{Q}^{2} \subset \mathbb{R}^{2}$.
So we have :
\begin{align} 
f_{x}(x_{r},y_{r}) 
  & = \lim_{h \rightarrow 0} \frac{f(x_{r}+h,y_{r}) - f(x_{r},y_{r})}{h}\\
  & = \lim_{h \rightarrow 0} \frac{f(x_{r}+h,y_{r}) - (x_{r}^{2} + y_{r}^{2})}{h} 
\tag{1}
\end{align}
We know
\begin{align}
h \in \mathbb{Q} & \Rightarrow f(x_{r}+h,y_{r}) = (x_{r}+h)^{2} + y_{r}^{2} \\
h \not \in \mathbb{Q} & \Rightarrow f(x_{r}+h,y_{r}) = 0
\end{align}
This is where I am stuck. I am not sure how to evaluate the limit in equation (1) to
determine if it exists.
(and can someone show me how to properly use the tag and ref commands so that I can tag
equation (1) and reference it correctly).
 A: After arriving at
$$\begin{align} 
f_{x}(x_{r},y_{r}) 
  & = \lim_{h \rightarrow 0} \frac{f(x_{r}+h,y_{r}) - f(x_{r},y_{r})}{h}\\
  & = \lim_{h \rightarrow 0} \frac{f(x_{r}+h,y_{r}) - (x_{r}^{2} + y_{r}^{2})}{h} 
\end{align}$$
note that if this limit exists, then it exists for all $\{h_n\}$ such that $h_n \to 0$ and converges to the same value.
First, let $h_n \in \mathbb Q$. Then,
$$\begin{align}
\lim_{n \rightarrow \infty} \frac{f(x_{r}+h_n,y_{r}) - f(x_{r},y_{r})}{h_n} 
&= \lim_{n\to\infty} \frac{(x_r+h_n)^2 + y_r^2 - x_r^2-y_r^2}{h_n} \\
&= \lim_{n\to\infty}\frac{h_n(2x_r+h_n)}{h_n} \\
&= 2x_r
\end{align}$$
Now, let $h_n \in \mathbb R \setminus \mathbb Q$. Then, $x_r + h_n \in \mathbb R \setminus \mathbb Q$ and therefore
$$\lim_{n \rightarrow \infty} \frac{f(x_{r}+h_n,y_{r}) - f(x_{r},y_{r})}{h_n} = \lim_{n\to\infty} \frac{ - x_r^2-y_r^2}{h_n} = \infty$$
Hence, the limit does not exist at $(x_r, y_r) \in \mathbb Q^2$.

Otherwise, i.e. if $(x,y) \notin \mathbb Q^2$, the limit exists because
$$\lim_{h\to0}\frac{f(x+h, y) - f(x,y)}{h} = \lim_{h\to 0}\frac{0}{h} = 0$$
