Consider the identity $$ \forall x \left(\cos^2x+\sin^2x=1\right) \, . $$ Instructors will often illustrate such identities by giving examples. It is common to hear a statement such as
Let $x=\pi/3$. Then the identity states that $\cos^2(\pi/3)+\sin^2(\pi/3)=1$.
However, does it really make sense to say 'let $x=\pi/3$' if $x$ is a bound variable? After all, it wouldn't make sense to write $$ \arcsin(x)=\int_{0}^{x}\frac{1}{\sqrt{1-t^2}} \, dt $$ and then say 'let $t=1/2$', since the integral operator binds the variable $t$.
Moreover, it is clear that this identity also implies that $$ \forall (2x) \left(\cos^2(2x)+\sin^2(2x)=1\right) \, . $$ However, here it wouldn't make sense to 'let $x=2x$' and then proceed. How would such issues would be addressed in mathematical logic? In particular, is the idea of substituting a particular number in for a bound variable well-founded? And if not, how does one justify that the identity $$ \forall x \left(\cos^2x+\sin^2x=1\right) $$ implies both $$ \cos^2(\pi/3)+\sin^2(\pi/3)=1 $$ and $$ \forall (2x) \left(\cos^2(2x)+\sin^2(2x)=1\right) \, ? $$