3. In the pyramid $P-ABCD$, the base $ABCD$ is a square with side length $a$, $PA \perp$ plane $ABCD$, $PA = a$, and $M, N$ are the midpoints of $PD, PB$ respectively. Then the cosine value of the angle formed by the skew lines $AM$ and $CN$ is $\qquad$
3. $\frac{\sqrt{3}}{6}$.

Solution 1: As shown in Figure 1, complete the quadrilateral pyramid into a cube $A B C D-P B^{\prime} C^{\prime} D^{\prime}$. Then $M$ and $N$ are the centers of their respective faces. Let the center of face $P B^{\prime} C^{\prime} D^{\prime}$ be $R$, the midpoint of $A B$ be $S$, and the midpoint of $C^{\prime} D^{\prime}$ be $T$. Then $N R / / S T / / A M$, and $\angle R N C$ is the angle we are looking for.
Notice that $S C=\sqrt{S B^{2}+B C^{2}}=\frac{\sqrt{5} a}{2}$,
$$
\begin{array}{l}
C N=\sqrt{S N^{2}+S C^{2}}=\frac{\sqrt{6} a}{2}, \\
N R=\frac{S T}{2}=\frac{\sqrt{2} a}{2} .
\end{array}
$$

Similarly, $C T=\frac{\sqrt{5} a}{2}, C R=\sqrt{C T^{2}+T R^{2}}=\frac{\sqrt{6} a}{2}$.
Therefore, $\cos \angle R N C=\frac{\frac{6}{4}+\frac{1}{2}-\frac{6}{4}}{2 \times \frac{\sqrt{6}}{2} \times \frac{\sqrt{2}}{2}}=\frac{\sqrt{3}}{6}$.
Solution 2: As shown in Figure 1, establish a spatial rectangular coordinate system, and set
$$
\begin{array}{l}
A(0,0,0), M\left(0, \frac{a}{2}, \frac{a}{2}\right), C(a, a, 0) \text {, } \\
N\left(\frac{a}{2}, 0, \frac{a}{2}\right) .
\end{array}
$$

Then $\overrightarrow{A M}=\left(0, \frac{a}{2}, \frac{a}{2}\right), \overrightarrow{C N}=\left(-\frac{a}{2},-a, \frac{a}{2}\right)$.
Thus, $\cos \langle\overrightarrow{A M}, \overrightarrow{C N}\rangle=\frac{\left|-\frac{a^{2}}{2}+\frac{a^{2}}{4}\right|}{\frac{\sqrt{2}}{2} a \cdot \frac{\sqrt{6}}{2} a}=\frac{\sqrt{3}}{6}$.