12. (2004 High School Competition - Liaoning Preliminary) The sum of the maximum and minimum values of the function $f(x)=\frac{\sqrt{2} \sin \left(x+\frac{\pi}{4}\right)+2 x^{2}+x}{2 x^{2}+\cos x}$ is . $\qquad$
12. $2 f(x)=\frac{\sqrt{2} \sin \left(x+\frac{\pi}{4}\right)+2 x^{2}+x}{2 x^{2}+\cos x}=\frac{2 x^{2}+\cos x+\sin x+x}{2 x^{2}+\cos x}=1+\frac{\sin x+x}{2 x^{2}+\cos x}$, and $g(x)=$ $\frac{\sin x+x}{2 x^{2}+\cos x}$ is an odd function, so, the sum of the maximum and minimum values is 2.