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.