Prove that if $f$ is a non-constant real-valued function such that for all real $x$, $f(x+1) + f(x-1) = \sqrt{3} f(x)$, then $f$ is periodic. What is the smallest $p$, $p > 0$ such that $f(x+p) = f(x)$ for all $x$?
1. We start with the given functional equation:
   \[
   f(x+1) + f(x-1) = \sqrt{3} f(x)
   \]
   We need to prove that \( f \) is periodic and find the smallest period \( p \) such that \( f(x+p) = f(x) \) for all \( x \).

2. Consider the function \( f(x) = \cos\left(\frac{\pi x}{6}\right) \). We will verify if this function satisfies the given functional equation:
   \[
   f(x+1) = \cos\left(\frac{\pi (x+1)}{6}\right) = \cos\left(\frac{\pi x}{6} + \frac{\pi}{6}\right)
   \]
   \[
   f(x-1) = \cos\left(\frac{\pi (x-1)}{6}\right) = \cos\left(\frac{\pi x}{6} - \frac{\pi}{6}\right)
   \]

3. Using the sum-to-product identities for cosine, we have:
   \[
   \cos(A + B) + \cos(A - B) = 2 \cos(A) \cos(B)
   \]
   Let \( A = \frac{\pi x}{6} \) and \( B = \frac{\pi}{6} \). Then:
   \[
   f(x+1) + f(x-1) = \cos\left(\frac{\pi x}{6} + \frac{\pi}{6}\right) + \cos\left(\frac{\pi x}{6} - \frac{\pi}{6}\right)
   \]
   \[
   = 2 \cos\left(\frac{\pi x}{6}\right) \cos\left(\frac{\pi}{6}\right)
   \]

4. Since \( \cos\left(\frac{\pi}{6}\right) = \frac{\sqrt{3}}{2} \), we get:
   \[
   f(x+1) + f(x-1) = 2 \cos\left(\frac{\pi x}{6}\right) \cdot \frac{\sqrt{3}}{2} = \sqrt{3} \cos\left(\frac{\pi x}{6}\right) = \sqrt{3} f(x)
   \]
   Thus, \( f(x) = \cos\left(\frac{\pi x}{6}\right) \) satisfies the given functional equation.

5. The period of \( \cos\left(\frac{\pi x}{6}\right) \) is \( \frac{2\pi}{\frac{\pi}{6}} = 12 \). Therefore, \( f(x+12) = f(x) \) for all \( x \).

6. To check if there is a smaller period, consider another function \( f(x) = \cos\left(\frac{11\pi x}{6}\right) \). This function also satisfies the given functional equation:
   \[
   f(x+1) + f(x-1) = \cos\left(\frac{11\pi (x+1)}{6}\right) + \cos\left(\frac{11\pi (x-1)}{6}\right)
   \]
   \[
   = 2 \cos\left(\frac{11\pi x}{6}\right) \cos\left(\frac{11\pi}{6}\right)
   \]
   Since \( \cos\left(\frac{11\pi}{6}\right) = \frac{\sqrt{3}}{2} \), we get:
   \[
   f(x+1) + f(x-1) = \sqrt{3} f(x)
   \]
   The period of \( \cos\left(\frac{11\pi x}{6}\right) \) is \( \frac{2\pi}{\frac{11\pi}{6}} = \frac{12}{11} \), which is not an integer.

7. Therefore, the smallest period that works for every function that satisfies the equation is 12.

The final answer is \( \boxed{12} \).