10. $f(x)$ is a function defined on $\mathbf{R}$ that is even, $f(x+1)=f(x-1), 1 \leqslant x \leqslant 2$ when, $f(x)=\log _{a} x$ $(a>0, a \neq 1)$, then when $-1 \leqslant x \leqslant 1$ the analytical expression of $f(x)$ is $\qquad$ .
10. From $f(x+1)=f(x-1)$, we get $f(x+2)=f(x)$. Thus, 2 is a period of $f(x)$. Also, $f(-x)=f(x)$, so $f(x+2)=f(-x)$. This means the axis of symmetry of $f(x)$ is $x=1$.
When $1 \leqslant x \leqslant 2$, $f(x)=\log _{4} x$. Therefore, when $-1 \leqslant x \leqslant 0$, we have $1 \leqslant x+2 \leqslant 2$.
Thus, $f(x+2)=\log _{a}(x+2)$.
Since $f(x+2)=f(x)$,
we have $f(x)=\log _{a}(x+2)(-1 \leqslant x \leqslant 0)$.
When $0<x \leqslant 1$, $1 \leqslant 2-x<2$, so $f(2-x)=\log _{a}(2-x)$.
By the symmetry of $f(x)$, we know $f(2-x)=f(x)$. Hence, $f(x)=\log _{0}(2-x)(0<x \leqslant 1)$.
In summary,
$$
f(x)=\left\{\begin{array}{l}
\log _{2}(x+2)(-1 \leqslant x \leqslant 0), \\
\log _{2}(-x+2)(0<x \leqslant 1) .
\end{array}\right.
$$

Consider if $x \in \mathbf{R}$, what is the analytical expression of $f(x)$ in this problem? (Hint: Using the fact that one period is 2, we get
$$
f(x)=\left\{\begin{array}{l}
\log _{a}[2+(x+2 k)], x \in(2 k-1,2 k], \\
\log _{a}[2-(x-2 k)], x \in(2 k, 2 k+1],
\end{array} k \in \mathbf{Z}\right)
$$