In the construction of $\operatorname{Frac}(R)$, where $R$ is a domain, we define a partition on $R \times R^\times$ where $R^\times:= R \setminus \{0\}$. which in turn becomes a field containing $R$.
Taking $R:=\mathbb{Q}[x]$, can we tell that $\frac{x^2+1}{x-1} \in \mathbb{Q}(x)$? As $x-1$ is not the zero-polynomial it is a member of $\mathbb{Q}[x]^\times$, hence $\frac{x^2+1}{x-1}$ should be a member of $\mathbb{Q}(x)$. But this is undefined when 1 is plugged in $x$.
Where am I going wrong?
The simple answer is that elements of $\mathbb{Q}(x)$ are formal rational functions. strictly speaking, the values they take on at certain points are irrelevant to them. Their evaluation maps need not be defined for all elements in the underlying field. Another example is that $\frac{1}{x}$ which is the multiplicative inverse of $x$ is not defined as a function at $x=0$. That's fine because the way we are looking at it, $\frac{1}{x}$ is not actually a function, it's really just the formal inverse of $x$.
There is a similar intuition here to how $x^2+x+1\in\mathbb{F}_2[x]$ is not the same thing as $1\in\mathbb{F}_2[x]$ even though the evaluation maps are the same.
$x$ is just something that is transcendental over $\mathbb{Q}$ we think of the elements of $\mathbb{Q}(x)$ as being rational functions, but really we shouldn't be considering any of their properties as functions in the context of algebra. It's helpful to realise that $\mathbb{Q}(x)$ is isomorphic to $\mathbb{Q}(\pi)$