After defining new math versions with \DeclareMathVersion, you can use \DeclareMathAlphabet, \SetMathAlphabet, \DeclareSymbolFont and \SetSymbolFont to set all math families manually. You must rename the math family names. You must be sure there are no more than 16 math alphabet families (but symbol familis can be more). And there may be encoding problems.
Anyway, although it's quite complex, it is posible:

\documentclass{article}
%%% text fonts
\renewcommand\rmdefault{txr}
\newcommand\gmfamily{\fontfamily{mdugm}\selectfont}
%%% New math versions
\DeclareMathVersion{varnormal}
\DeclareMathVersion{varbold}
\newcommand\txmath{\mathversion{normal}}
\newcommand\txboldmath{\mathversion{bold}}
\newcommand\mdmath{\mathversion{varnormal}}
\newcommand\mdboldmath{\mathversion{varbold}}
%%% Math symbol fonts
%%% some examples only
% Math letters from txfonts and mdugm
\SetSymbolFont{letters}{normal}{OML}{txmi}{m}{it}
\SetSymbolFont{letters}{bold}{OML}{txmi}{bx}{it}
\SetSymbolFont{letters}{varnormal}{OML}{mdugm}{m}{it}
\SetSymbolFont{letters}{varbold}{OML}{mdugm}{b}{it}
% Math operators
\SetSymbolFont{operators}{normal}{OT1}{txr}{m}{n}
\SetSymbolFont{operators}{bold}{OT1}{txr}{bx}{n}
\SetSymbolFont{operators}{varnormal}{OT1}{mdugm}{m}{n}
\SetSymbolFont{operators}{varbold}{OT1}{mdugm}{b}{n}
% Math symbols
\SetSymbolFont{symbols}{normal}{OMS}{txsy}{m}{n}
\SetSymbolFont{symbols}{bold}{OMS}{txsy}{bx}{n}
\SetSymbolFont{symbols}{varnormal}{OMS}{mdugm}{m}{n}
\SetSymbolFont{symbols}{varbold}{OMS}{mdugm}{b}{n}
% Large symbols
\SetSymbolFont{largesymbols}{normal}{OMX}{txex}{m}{n}
\SetSymbolFont{largesymbols}{bold}{OMX}{txex}{bx}{n}
\SetSymbolFont{largesymbols}{varnormal}{OMX}{mdugm}{m}{n}
\SetSymbolFont{largesymbols}{varbold}{OMX}{mdugm}{b}{n}
%%% Math alphabets, at most 16 families
%%% some examples only
\SetMathAlphabet{\mathrm}{normal}{OT1}{txr}{m}{n}
\SetMathAlphabet{\mathrm}{bold}{OT1}{txr}{bx}{n}
\SetMathAlphabet{\mathrm}{varnormal}{OT1}{mdugm}{m}{n}
\SetMathAlphabet{\mathrm}{varbold}{OT1}{mdugm}{b}{n}
\SetMathAlphabet{\mathit}{normal}{OT1}{txr}{m}{it}
\SetMathAlphabet{\mathit}{bold}{OT1}{txr}{bx}{it}
\SetMathAlphabet{\mathit}{varnormal}{OT1}{mdugm}{m}{it}
\SetMathAlphabet{\mathit}{varbold}{OT1}{mdugm}{b}{it}
\begin{document}
This is Times font. $a^2 + b^2 = c^2$. Math font
\[
\sum_i \int_a^b \left( \frac1{K+1} \oplus\alpha_i \right) \,\mathrm{d}x = 0
\]
and bold math font
{\txboldmath\[
\sum_i \int_a^b \left( \frac1{K+1} \oplus\alpha_i \right) \,\mathrm{d}x = 0
\]}
\gmfamily\mdmath
This is Garamond font. $a^2 + b^2 = c^2$. Math font
\[
\sum_i \int_a^b \left( \frac1{K+1} \oplus\alpha_i \right) \,\mathrm{d}x = 0
\]
and bold math font
{\mdboldmath\[
\sum_i \int_a^b \left( \frac1{K+1} \oplus\alpha_i \right) \,\mathrm{d}x = 0
\]}
\end{document}
\fam) in one document. This restriction is not easy to raise. If you use\DeclareMathVersionto switch math fonts, you may meet the problem. – Leo Liu May 28 '11 at 01:32