3. Satisfy $\sin (x+\sin x)=\cos (x-\cos x)$ then $x=$ $\qquad$

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
3. $x=\frac{\pi}{4}$.

The original equation is equivalent to
$$
\cos \left(\frac{\pi}{2}-x-\sin x\right)=\cos (x-\cos x).
$$

Then $x-\cos x=2 k \pi+\left(\frac{\pi}{2}-x-\sin x\right)(k \in \mathbb{Z})$ or $x-\cos x=2 k \pi-\left(\frac{\pi}{2}-x-\sin x\right)(k \in \mathbb{Z})$.
From (1) we get $2 x+\sin x-\cos x=2 k \pi+\frac{\pi}{2}$.
Since $f(x)=2 x+\sin x-\cos x$ is an increasing function on $\left(0, \frac{\pi}{2}\right)$,
$$
\therefore-1=f(0)<2 k \pi+\frac{\pi}{2}<f\left(\frac{\pi}{2}\right)=\pi+1 .
$$

This inequality has a unique integer solution $k=0$.
$\therefore 2 x+\sin x-\cos x=\frac{\pi}{2}$. Solving for $x$ gives $x=\frac{\pi}{4}$.
From (2) we get $\sin x+\cos x=\frac{\pi}{2}-2 k \pi$.
Since $1<\sin x+\cos x \leqslant \sqrt{2}$,
$\therefore 1<\frac{\pi}{2}-2 k \pi \leqslant \sqrt{2}$. This inequality has no integer solution.
In summary, the solution to the original equation is $x=\frac{\pi}{4}$.