14 Given the function $f(x)=2\left(\sin ^{4} x+\cos ^{4} x\right)+m(\sin x+\cos x)^{4}$ has a maximum value of 5 for $x \in\left[0, \frac{\pi}{2}\right]$, find the value of the real number $m$.

 untranslated text remains the same as the source text, including line breaks and formatting.
14
$$
\begin{aligned}
f(x) & =2\left(\sin ^{2} x+\cos ^{2} x\right)^{2}-4 \sin ^{2} x \cos ^{2} x+m(\sin x+\cos x)^{4} \\
& =2-(2 \sin x \cos x)^{2}+m(\sin x+\cos x)^{4}
\end{aligned}
$$

Let $t=\sin x+\cos x=\sqrt{2} \sin \left(x+\frac{\pi}{4}\right) \in[1, \sqrt{2}]$, then $2 \sin x \cos x=$ $t^{2}-1$, thus
$$
f(x)=2-\left(t^{2}-1\right)^{2}+m t^{4}=(m-1) t^{4}+2 t^{2}+1 .
$$

Let $u=t^{2} \in[1,2]$, by the problem, $g(u)=(m-1) u^{2}+2 u+1$ has a maximum value of 5 when $u \in[1,2]$.

When $m-1=0$, $g(u)=2 u+1$ has a maximum value of 5 when $u=2$, so $m=1$ meets the condition;
When $m-1>0$, $g(u)_{\text {max }} \geqslant g(2)>2 \times 2+1=5$, contradiction! When $m-1<0$, $g(u)<2 u+1 \leqslant 5$, contradiction!
In summary, the real number $m=1$.
