What is exactly the difference between $\forall x \neg P(x)$ and $\neg \forall xP(x)$? Could you explain what is the difference  between $\forall x \neg P(x)$ and $\neg \forall xP(x)$  or $\exists x\neg P(x)$ and $\neg \exists x P(x)$ ?
 A: $\neg(\forall x \, P(x))$: "it is not true that $P(x)$ holds for all $x$.
This means that there may be some $x$ for which $P(x)$ is true, but there must be at least one for which $P(x)$ is false.
On the other hand $\forall x\, \neg P(x)$ says that for all $x$, $P(x)$ must be false. There is no $x$ for which it is true.
A similar thing holds for the existential statement, since in fact $\neg(\forall x \, P(x))$ is logically equivalent to $\exists x\, \neg P(x)$ and $\forall x\, \neg P(x)$ is equivalent to $\neg(\exists x\,P(x))$.
This should be apparent once you think about it.
A: $\neg \forall x \,P(x)$ is equivalent to $\exists x\,\neg P(x)$ (not everything is blue is equivalent to something is not blue), and $\neg \exists x \,P(x)$ is equivalent to $\forall x\, \neg P(x)$ (nothing is unequal to itself means the same thing as everything is equal to itself).
Each of the two equivalences implies the other.
Here's another way to look at it — each quantifier can be defined in terms of the other: $\exists\equiv\neg\forall\neg$, $\forall\equiv\neg\exists\neg$. (For example, $\exists x\, P(x)\equiv\neg\forall\neg\, P(x)$.)
From any of these four equivalences, the rest follow (because double negation "cancels out" in classical logic).
A: While this may seem to be a trivial hint, I've repeatedly found it helpful when getting used to a new syntax to see how it's defined formally and which parts are then left out because they are thought to be obvious.
Let's now add all possible parentheses, let $P(x)$ be "$x$ is prime" for example.


*

*$\forall x\neg P(x)$ is in fact $\forall x(\neg (P(x)))$. Think of it as "for every $x$ it holds that (it is not true that ($x$ is a prime))".

*$\neg \forall x P(x)$ becomes $\neg (\forall x (P(x)))$. This says "it is not true that (for every $x$ it holds that ($x$ is a prime))".
