5. In the spatial quadrilateral $ABCD$, $\overrightarrow{AC}=a, \overrightarrow{BD}=$ $b, E, F$ are points on $AB, CD$ respectively, such that $\frac{AE}{EB}=\frac{CF}{FD}$ $=2012$. Then $\overrightarrow{EF}=$ $\qquad$ (express in terms of $\boldsymbol{a}, \boldsymbol{b}$).
5. $\frac{a+2012 b}{2013}$.

As shown in Figure 4, $\overrightarrow{E F}=\overrightarrow{E B}+\overrightarrow{B C}+\overrightarrow{C F}$.
Let $\lambda=2012$. Then
$\frac{A E}{E B}=\lambda \Rightarrow \frac{E B}{A B}=\frac{1}{\lambda+1} \Rightarrow \overrightarrow{E B}=\frac{1}{\lambda+1} \overrightarrow{A B}$,
$\frac{C F}{F D}=\lambda \Rightarrow \frac{C F}{C D}=\frac{\lambda}{\lambda+1} \Rightarrow \overrightarrow{C F}=\frac{\lambda}{\lambda+1} \overrightarrow{C D}$.
Therefore, $\overrightarrow{E F}=\overrightarrow{E B}+\overrightarrow{B C}+\overrightarrow{C F}$
$=\frac{1}{\lambda+1} \overrightarrow{A B}+\frac{1}{\lambda+1} \overrightarrow{B C}+\frac{\lambda}{\lambda+1} \overrightarrow{B C}+\frac{\lambda}{\lambda+1} \overrightarrow{C D}$
$=\frac{1}{\lambda+1}(\overrightarrow{A B}+\overrightarrow{B C})+\frac{\lambda}{\lambda+1}(\overrightarrow{B C}+\overrightarrow{C D})$
$=\frac{1}{\lambda+1} \overrightarrow{A C}+\frac{\lambda}{\lambda+1} \overrightarrow{B D}=\frac{\overrightarrow{A C}+\lambda \overrightarrow{B D}}{\lambda+1}$.
Substituting $\lambda=2012, \overrightarrow{A C}=a, \overrightarrow{B D}=b$ into the equation, we get
$$
\overrightarrow{E F}=\frac{a+2012 b}{2013}
$$