LaTeX has a concept of math versions, see fntguide.pdf.
Normally the only two math versions provided are normal and bold. However you can set up a new one with \DeclareMathVersion. One then introduces new symbol fonts with \DeclareSymbolFont and sets them for use via \SetSymbolFont whose second argument specifies the math version. Similar commands do the same for math alphabets. You then have the command \mathversion available to switch to the new version.
Note that initially it inherits the current default fonts, so you can just specify those that need to be changed.
The example below borrows some code from mathpazo.sty to change a couple of fonts in \mathversion{mymath}, and then sets up an example environment which contains the math version switch.

\documentclass{article}
\DeclareMathVersion{mymath}
\DeclareSymbolFont{myletters}{OML}{zplm}{m}{it}
\SetSymbolFont{letters}{mymath}{OML}{zplm}{m}{it}
\DeclareSymbolFont{myoperators}{OT1}{pplx}{m}{n}
\SetSymbolFont{operators}{mymath}{OT1}{pplx}{m}{n}
\newenvironment{Exx}{\mathversion{mymath}\bigbreak\noindent\textbf{Example}\par}{\par\noindent\textit{End Example}\par\bigbreak}
\begin{document}
Test \( x + y = \int_0^3 f(t)\,dt \).
\begin{Exx}
Test \( x + y = \int_0^3 f(t)\,dt \).
\end{Exx}
Test \( x + y = \int_0^3 f(t)\,dt \).
\end{document}
Similarly a version with sans serif fonts can be provided with:

\documentclass{article}
\DeclareMathVersion{sfmath}
\DeclareSymbolFont{sfletters}{OT1}{cmss}{m}{sl}
\SetSymbolFont{letters}{sfmath}{OT1}{cmss}{m}{sl}
\DeclareSymbolFont{sfoperators}{OT1}{cmss}{m}{n}
\SetSymbolFont{operators}{sfmath}{OT1}{cmss}{m}{n}
\SetMathAlphabet\mathit{sfmath}{OT1}{cmss}{m}{sl}
\SetMathAlphabet\mathrm{sfmath}{OT1}{cmss}{m}{n}
\newenvironment{Exx}{\sffamily\mathversion{sfmath}\bigbreak\noindent\textbf{Example}\par}{\par\noindent\textsl{End Example}\par\bigbreak}
\begin{document}
Test \( x + y = \int_0^3 f(t)\,dt \) and \( \tan t = \frac{\sin
t}{\cos t} \).
\begin{Exx}
Test \( x + y = \int_0^3 f(t)\,dt \) and \( \tan t = \frac{\sin
t}{\cos t} \).
\end{Exx}
Test \( x + y = \int_0^3 f(t)\,dt \) and \( \tan t = \frac{\sin
t}{\cos t} \).
\end{document}
Note however that there will be problems with greek symbols as these are not in the required positions in cmss.
unicode-mathand the concept of Math Versions. – Andrew Swann Mar 04 '13 at 13:42