# QED - as three letters - to the right of a display equation

What is the best way for me to get "QED"--as the three letters, not the square generated by \qed--flush with the right side of a page on the same line as a display equation?

Note - I am intentionally not using the proof environment.

-
\text{QED} after the equation should work. To do it often, try \renewcommand{\qed}{\text{QED}}, then use \qed. –  Ethan Bolker Apr 21 '14 at 0:53
@EthanBolker Doesn't that produce the text immediately to the right of the equation, as opposed to flush right (see my edit to the question)? –  user1577636 Apr 21 '14 at 1:06
does \tag{QED} work as you would like? –  cmhughes Apr 21 '14 at 1:26
Is this for an displayed expression produced by equation* or for other environments as well? –  Gonzalo Medina Apr 21 '14 at 1:28
@cmhughes No, I do not want the parentheses around the "QED" –  user1577636 Apr 21 '14 at 1:30

Since this is only for the equation* environment, one can use \displaymath@qed (defined by amsthm); in the following example I \let the command \QED to be \displaymath@qed and used the etoolbox package to redefine \qedsymbol inside equation* to produce the text "Q.E.D." in small caps and using \footnotesize:

\documentclass{article}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{etoolbox}

\makeatletter
\let\QED\displaymath@qed
\makeatother
\AtBeginEnvironment{equation*}{\renewcommand\qedsymbol{{\footnotesize\textsc{q.\,e.\,d.}}}}

\begin{document}

some test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here  test text goes here
\begin{equation*}
a=b + c.\QED
\end{equation*}
some test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here test text goes here  test text goes here

\end{document}


-

A very simple solution, using the \tag* command from the mathtools package. It also works for groups of equations:

    \documentclass[12pt,a4paper,bothsides]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{mathtools}

\newcommand*\QED{\tag*{\scshape q.\:e.\:d.}}

\begin{document}

$a² = b² + c² \QED$%

\begin{align}
a²  & = b²  + c² \\
a³    & \neq b³  + c³ \QED
\end{align}

\end{document}


-


-
Did you try your proposed solution? In its present form, i.e., just using \qed` with no extra work, the symbol won't be flushed to the right. –  Gonzalo Medina Apr 21 '14 at 1:58