You can insert the display equation in text mode with a forced \displaystyle
:
\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\newcommand{\qed}{\hfill\rule{1ex}{1ex}}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
\lipsum*[1] \qed
\end{theorem}
\begin{theorem}
\lipsum*[1]
\[
f(x)=ax^2+bx+c \qed
\]
\end{theorem}
\begin{theorem}
\lipsum*[1]\par
\vspace{\abovedisplayshortskip}
\hfill $\displaystyle f(x)=ax^2+bx+c$ \qed
\end{theorem}
\end{document}
Since the last line of the preceding paragraph and "short", I've inserted a skip of \abovedisplayshortskip
. A "long" paragraph ending should use \abovedisplayskip
.