3. Let the function be
$$
f(x)=\sqrt{2 x^{2}+2 x+41}-\sqrt{2 x^{2}+4 x+4}(x \in \mathbf{R}) \text {. }
$$

Then the maximum value of $f(x)$ is $\qquad$
3. 5 .

Notice,
$$
\begin{array}{l}
f(x)=\sqrt{2 x^{2}+2 x+41}-\sqrt{2 x^{2}+4 x+4} \\
=\sqrt{(x+5)^{2}+(x-4)^{2}}-\sqrt{x^{2}+(x+2)^{2}} .
\end{array}
$$

Let point $A(-5,6), O(0,0), P(x, x+2)$. Then point $P$ lies on the line $y=x+2$.

It is easy to know that the symmetric point of $O$ with respect to the line $y=x+2$ is $O^{\prime}(-2,2)$.
Thus, $f(x)=|P A|-|P O|=|P A|-\left|P O^{\prime}\right|$
$\leqslant\left|A O^{\prime}\right|=5$.
When $A, O^{\prime}, P$ are collinear, and point $P$ is on the same side of $A, O^{\prime}$, the equality holds.
Therefore, the maximum value of $f(x)$ is 5.