I was doing midterm review and I came across these formulas
$$\forall x \big( P(x) \to Q (x))$$
and
$$\forall x P (x) \to \forall x Q (x)$$
I wanted to know what the difference was in terms of $x$ for both of them. In the first one, if I choose $x = 5$, then it's $P(5) \to Q(5)$ but is it the same for the second one? If there are quantifiers on both, does that mean that $x$ can be a different value for both such as $P(5) \to Q(3)$?
In words, $\forall x\big(P(x)\to Q(x)\big)$ says that no matter what $x$ you take, if it has property $P$, then it also has property $Q$. Suppose that we’re talking strictly about integers, $P(x)$ means that $x$ is a multiple of $4$, and $Q(x)$ means that $x$ is even. Then $\forall x\big(P(x)\to Q(x)\big)$ is true: if some integer $x$ is a multiple of $4$, then $x$ is certainly even.
$\forall xP(x)\to\forall xQ(x)$, on the other hand, says that if every $x$ has property $P$, then every $x$ also has property $Q$.
These two statements are not equivalent. Suppose that the domain of discourse is the set of positive integers, $P(x)$ is the statement that $x$ is prime, and $Q(x)$ is the statement that $x$ is odd. The statement $$\forall x\big(P(x)\to Q(x)\big)$$ is false, because $2$ is prime (i.e., $P(2)$ is true), but $2$ is not odd (i.e., $Q(2)$ is false). In words, the statement says that every prime is odd, and $2$ is clearly a counterexample to that statement.
The statement $$\forall xP(x)\to\forall xQ(x)\;,$$ however, is true for the rather trivial reason that $\forall xP(x)$ is false: it’s certainly not true that all positive integers are prime! Thus, the implication is vacuously true.