3. If the real number $a$ satisfies $a^{3}+a^{2}-3 a+2=\frac{3}{a}-$ $\frac{1}{a^{2}}-\frac{1}{a^{3}}$, then $a+\frac{1}{a}=$ $\qquad$
3.2 or -3.

Given the equation can be transformed into
$$
a^{3}+\frac{1}{a^{3}}+a^{2}+\frac{1}{a^{2}}+2-3\left(a+\frac{1}{a}\right)=0 \text {. }
$$

Let $a+\frac{1}{a}=x$, then $x^{2}=a^{2}+\frac{1}{a^{2}}+2$,
$$
x^{3}=a^{3}+3 a+\frac{3}{a}+\frac{1}{a^{3}}=a^{3}+\frac{1}{a^{3}}+3 x \text {. }
$$

Therefore, equation (1) simplifies and rearranges to
$$
x(x-2)(x+3)=0 \text {. }
$$

Thus, $x_{1}=0, x_{2}=2, x_{3}=-3$.
Since $x=a+\frac{1}{a}=\frac{a^{2}+1}{a} \neq 0$, we know that $x_{1}=0$ is not a valid solution.
For $x_{2}=2, x_{3}=-3$, there exist corresponding real numbers $a$.
Therefore, the value of $a+\frac{1}{a}$ is 2 or -3.