2. Let $a>0$, if the solution set of the inequality $\sqrt{x+a}+\sqrt{x-a} \leqslant \sqrt{2(x+1)}$ corresponds to an interval length of $\frac{1}{2}$ on the number line, then the value of $a$ that satisfies the condition is . $\qquad$
2. $\frac{3}{4}$.

Obviously, $x \geqslant a>0$. From the original inequality, we get
$$
(\sqrt{x+a}+\sqrt{x-a})^{2} \leqslant 2(x+1) \Leftrightarrow 2 x+2 \sqrt{x^{2}-a^{2}} \leqslant 2(x+1) \Leftrightarrow \sqrt{x^{2}-a^{2}} \leqslant 1 .
$$

Solving this, we get
$$
0 \leqslant x^{2}-a^{2} \leqslant 1 \Rightarrow a \leqslant x \leqslant \sqrt{a^{2}+1} .
$$

Upon verification, this interval satisfies the original inequality.
From the condition, we know
$$
\sqrt{a^{2}+1}-a=\frac{1}{2} \Rightarrow a^{2}+1=a^{2}+a+\frac{1}{4} \Rightarrow a=\frac{3}{4} \text {. }
$$

Upon verification, the value of $a$ that satisfies the condition is $\frac{3}{4}$.