I - First doubt : free variables on open formulas .
I'm having a hard time discovering what different kinds of variables in an open formula of fol are refering to., For example, lets take some open formulas :
1: $"x+2=5"$
2: $"x=x"$
3: $"x+y = y+x"$
4: $"x+2 = 5 -> x=3 "$ .
So let's suppose we have a domain D of a structure which is interpreting that fol language. Even tho all those formulas are open formulas variables occuring free, i think the variables refer to different kind of sets ( obviously all sets with the same type of objects, be it numbers, or whatever ) depending on the kind of formula... to what exactly, in each case ?
The formula 1 would be refering to a fixed element on the domain (whatever kind of elements it has ) ? Would that be it ? Or would it be an arbitrary one ?
Should we always use the word "refering to" in open formula, instead of "ranging through" ?
The free variable on the formula 2 would be refering to a bunch of elements of the domain ? Or would it be ranging through a bunch of elements of the domain ? How does the truth-set ( set of individuals that satisfy the open sentence " of each formula enter in picture ?
II - Second doubt : When to close a formula, and what does it provide us ?
The second point i'm having a hard time with is how to differentiate, and how to know the difference between the uses and the reasons of choosing to use either the formula
$"x+2 =5 -> x = 3 "$ or $\forall x (x+2 = 5 -> x = 3 )$ .
And also between the difference of using ( and choosing to use ) the open formula $"x+y = y+x"$ or the closed formula $"\forall x \forall y ( x + y = y + x ) "$.
Same thing about $"x = x$ and $"\forall x (x = x) "$.
Question n°1 :
The answer is : NO.
If you are working in FOL, the domain $D$ contains only one "sort" of thing; if you "apply" (as in the example) first-order language to "speak of" numbers, the domain will be, for example, $\mathbb N$, the set of natural numbers and all individual variables will "get value" from the domain $\mathbb N$.
Question n°2 :
One way (there are more than one, all producing the same result) is by considering an object $a \in D$ (an object in the domain) and enlarging the language with a "name" for it : call it $\overline a$.
If $\mathcal A(x)$ is a formula with only one free var $x$, we consider an instance of it : $\mathcal A(x/\overline a)$, i.e.the formula (without free vars) obtained from $\mathcal A(x)$ by substitution of all occurrences of $x$ with $\overline a$.
Now the formula $\mathcal A(x/\overline a)$ is closed (i.e. without free vars), and we call it a sentence, and we are able to evaluate its truth-value.
Consider the formula of your example (I omit the overline for simplicity) :
if we substitute to $x$ the (name for the) number $3$, we obtain a true sentence (i.e. $3+2=5$).
If instead we substitute to $x$ the (name for the) number $4$, we obtain a false sentence (i.e. $4+2=5$).
A formula with free var is called open because it has no (fixed) meaning : it is "open to" different interpretations; in order to give it meaning, you have to transform it into a sentence (i.e. a closed formula).
We have two ways to do this :
either use quantifiers; thus, from $x+2=5$, we can obtain $\forall x(x+2=5)$, which is plainly false;
or instantiate it (as above); of course, for different instances of the same formula, we will obtain different sentences with different truth-values.
Question n°3 :
In the case of $x = x$, the two ways above will give as results :
$\forall x (x = x)$, wich is clearly true (and more: it is valid, i.e.true in every domain)
in the domain $\mathbb N$, we can instantiate it as, e.g. $1=1$, $2=2$, and so on; all will be true instances. Of course the $x$ must be instantiated to the same objects in both occurrences of it into $x=x$.
Question n°4 :
It depends...
Consider : $x+2=5 \rightarrow x=3$
What happens with $3$ in place of $x$ ?
We get : $3+2=5$, which is true, and $3=3$, also true; thus, by truth-table for $\rightarrow$ :
And with $4$ in place of $x$ ? We can easily check that we will have False $\rightarrow$ False, which is again True.
Thus, we have showed that $∀x(x+2=5 \rightarrow x=3)$ is true in $\mathbb N$.
But this is not always so : $\forall x (2 \times x = 4)$ is not true in $\mathbb N$.