Example of a quadratic form that represents zero in every $\mathbb{Q}_p$ but not in $\mathbb{R}$? I'm looking for a quadratic form over $\mathbb{Q}$ that represents zero in every $\mathbb{Q}_p$ but not in $\mathbb{R}$.
 A: I submit $Q(X)=\sum_{i=1}^8 X_i^2$, a quadratic form in $8$ variables.
Over $\mathbb{R}$, the only solution of $Q(X)=0$ is $X_1=X_2=\ldots=X_8=0$, thanks to the positivity of sums of squares.
Over $\mathbb{Z}/p\mathbb{Z}$, there's a non-trivial solution arising from a representation of $p$ as a sum of four squares. Every natural number is representable as a sum of four squares, so the form represents $0$ by solving $p=X_1^2+X_2^2+X_3^2+X_4^2$ and setting the other $X_i$'s to $0$.
Using Hensel's Lemma, and when $p$ is odd, you can lift this representation of $0$ in $\mathbb{Z}/p\mathbb{Z}$ to a representation in $\mathbb{Q}_p$. So $Q(X)=0$ has (non-trivial) solutions in $\mathbb{Q}_p$ for every odd $p$.
A separate check should be applied when $p=2$, since here Hensel's lemma fails and indeed, the simpler form $X_1^2+X_2^2+X_3^2+X_4^2=0$ actually fails to represent $0$ in $\mathbb{Q}_2$, despite the fact that it does so in $\mathbb{Z}/2\mathbb{Z}$. This is the reason I had to go up to eight variables in the form.
In $\mathbb{Q}_2$, the integer $-7$ has a square root (as does every integer congruent to $1$ mod $8$). In other words, there's a $2$-adic integer $v$ with $7+v^2=0$, so we can choose $X_1=X_2=\ldots=X_7=1$ and $X_8=v$.
