For short math you can use the following. It might not give you good results for longer equations.
\documentclass{article}
\let\mopen\[
\let\mclose\]
\def\[#1\]{%
\par\noindent
\framebox[\linewidth]{\texttt{\detokenize{#1}}}%
\mopen #1 \mclose
}
\begin{document}
\[a = b^C_D \]
\[A = \varphi\]
\end{document}

For left aligned output you could use:
\documentclass{article}
\def\[#1\]{%
\par\medskip\par\noindent
\framebox[\linewidth][l]{\texttt{\detokenize{#1}}}%
\par\smallskip
\(\displaystyle #1 \)
}
\begin{document}
\[a = b^C_D \]
\[A = \varphi\]
\end{document}

Update:
Here a real verbatim implementation which doesn't add spaces after macros. It goes the other way around. Instead of reading the code normally and then turning it into verbatim, it reads it verbatim and then turns it back to code when required.
I also added line breaking support.
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\def\[{%
\begingroup
\let\do\@makeother
\dospecials
\obeyspaces
\readmath
}
\long\expandafter\def\expandafter\readmath\expandafter#\expandafter1\string\]{%
\endgroup
\par\medskip\par\noindent
\fbox{\minipage{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}\raggedright\verbatim@font #1\endminipage}%
\par\smallskip
\(\displaystyle \scantokens{#1} \)%
\par
}
\makeatother
\begin{document}
\[a = b^C_D \]
\[A = \varphi\]
\[a = b^C_\text{i} \]
\[ a =
\alpha_1 + \beta_1 + \gamma_1 +
\alpha_2 + \beta_2 + \gamma_2 +
\alpha_3 + \beta_3 + \gamma_3 +
\alpha_4 + \beta_4 + \gamma_4
\]
\end{document}

This all requires e-TeX, which is part of any modern LaTeX compiler. I could code an alternative if wanted.
\[
and\]
to do this, but it isn't trivial. – Martin Scharrer♦ Nov 14 '11 at 8:45