Is an undefined equality vacuously true? To quote Wikipedia,

[..] equation is an equality containing one or more variables. Solving the equation consists of determining which values of the variables make the equality true.

Consider a univariate equation $f(x) = 0$ with $f:D \rightarrow \mathbb{R}$ and say we want to solve the equation over $x \in A$. As I understand it, for every $x \in A$ we have a condition $f(x) = 0$ and we have to verify whether it is true. But if $\exists x \in A: x \not\in D $, then there is no condition! Does that mean that the equality is vacuously true? I can't see why not.
But in school, if we solve something like $\frac{1}{x} = 0$, the answer is there is no solution, and, specifically, $x = 0$ is not a solution. This contradicts the above reasoning.
 A: Regarding equations, we have to separate identities, like : $(x^2-1)=(x-1)(x+1)$ from equations like : $x^2+1=0$.
In the first case, we are stating :

$\forall x \ [(x^2-1)=(x-1)(x+1)]$,

i.e. we are saying that in e.g. the domain $\mathbb N$ of natural numbers, the formula is true.
This is not so for $x^2+1=0$; the formula $\forall x \ (x^2-2=0)$ is obviously false in $\mathbb N$.
What we are "searching for" when we ask to solve the above equation is the truth-value of the formula :

$\exists x \ (x^2-2=0)$.

This formula is false in $\mathbb N$, while it is true in $\mathbb R$.
Thus, we can consider : $\exists x \in \mathbb N \ (x^2-2=0)$.
But this is not a case of vacuously true statement :

A statement is "vacuously true" if it resembles the statement $P \to Q$, where $P$ is known to be false.
Statements that can be reduced to this basic form include the following universally quantified statements:

$\forall x \in A:Q(x)$, where the set $A$ is empty.


The equation we are considering : $\exists x \in \mathbb R \ (x^2-2=0)$ has not the said form, because it is not universally quantified.
A: When $x\not\in D$ the formula $(\forall x)[x\in D \Rightarrow f(x)=0]$ is vacuously true.
