A closed formula expresses a proposition (which is a truth-apt concept, so a concept that is either be "true" or "false"). A closed formula is a Boolean-valued formula with no free variables.
A free variable is a variable that "specifies places in an expression where substitution may take place and is not a parameter of this or any container expression", it has not been bound by a variable-binding operator like
$$ \sum _{x\in S}\quad \quad \prod _{x\in S}\quad \quad \int _{0}^{\infty }\cdots \,dx\quad \quad \lim _{x\to 0}\quad \quad \forall x\quad \quad \exists x $$
So for example (in the following all numbers, variables, and function values are real numbers)
\begin{align} f(x) = 5, f(x) = 2*x \qquad\qquad\qquad\qquad\qquad (1) \end{align}
is not true or false, as long as we don't know what $x$ is. But if we say,
$$ \text{if } x = 2, f(x) = 2*x \text{, then } f(x) = 5 \qquad\;\;\qquad (2) $$
this becomes truth-apt (in this case this is false). So, I would think that "if" is a variable-binding operator. Is this correct?
Another way of writing "if" is by using $\Rightarrow$, e.g.,
$$ x = 2, f(x) = 2*x \Rightarrow f(x) = 5 \qquad\qquad\qquad (3) $$
which I would think is a closed formula which is false.
Has $f$ been pre-defined such that $f(x)=2x\,?$ If so, then the open formula $(2)$ is actually true for all values of $x$ except $2.5.$ What is false though is the closed formula $$\text{for each $x,\Big($if } x = 2\text{ and } f(x) = 2x \text{, then } f(x) = 5\Big)\tag{2a}.$$ Informally, open conditional formulae like $(2)$ are typically treated as closed formulae like $(2a);$ it is this implicit universal quantification—not the conditional operator per se—that binds the free variable $x.$
On the other hand, if $f(x)$ actually equals, say, $-\dfrac1x,$ then both formulae $(2)$ and $(2a)$ are definitely true in the standard interpretation.