3. Given the recurrence relation $a_{n+1}=\left(\frac{a_{n}+2-\sqrt{2-a_{n}^{2}}}{2}\right)^{\frac{1}{2}}$ $(n \in \mathbf{N}), a_{0}=\frac{\sqrt{2}}{2}$. Then the general term formula $a_{n}=$ $\qquad$
3. $\sqrt{2} \cos \left(\frac{\pi}{4}+\frac{\pi}{12 \times 2^{n}}\right)$.

Let $a_{n}=\sqrt{2} \cos \theta_{n}\left(\theta_{n} \in\left(0, \frac{\pi}{2}\right)\right)$. Then $\theta_{0}=\frac{\pi}{3}$.

Substituting into the recursive formula, we get
$$
\begin{array}{l}
\cos \theta_{n+1}=\cos \left(\frac{\theta_{n}}{2}+\frac{\pi}{8}\right) \\
\Rightarrow \theta_{n+1}=\frac{\theta_{n}}{2}+\frac{\pi}{8} \Rightarrow \theta_{n}=\frac{\pi}{4}+\frac{\pi}{12 \times 2^{n}} \\
\Rightarrow a_{n}=\sqrt{2} \cos \left(\frac{\pi}{4}+\frac{\pi}{12 \times 2^{n}}\right) .
\end{array}
$$