How to place qed symbol at the end of an equation using eqnarray* enviroment

I am having trouble getting the qed symbol at the end of my equation, the symbol ends up on the next line. I have tried using the \qedhere command, but that doesn't work in the eqnarray* environment. How do I get around that issue?

\begin{proof}
The DM's expected payoff with threshold $t$ and discount factor $\delta$ is%

\begin{eqnarray*}
&&\sum_{i=0}^{\infty }\left( \delta F\left( t\right) ^{n}\right) ^{i}\left(
1-F\left( t\right) ^{n}\right) E\left[ \theta |\theta >t\right] \\
&=&\frac{1-F\left( t\right) ^{n}}{1-\delta F\left( t\right) ^{n}}E\left[
\theta |\theta >t\right]
\end{eqnarray*}%
while each expert's expected payoff is%
\begin{eqnarray*}
&&\sum_{i=0}^{\infty }\left( \delta F\left( t\right) ^{n}\right) ^{i}\left(
1-F\left( t\right) \right) A\left( t\right) E\left[ \theta |\theta >t\right]
\\
&=&\frac{\left( 1-F\left( t\right) \right) A\left( t\right) E\left[ \theta
|\theta >t\right] }{1-\delta F\left( t\right) ^{n}}\text{.}
\end{eqnarray*}%
Eliminating common terms the result then follows since%
\begin{eqnarray*}
\frac{1-F\left( t\right) ^{n}}{1-F\left( t\right) }=\sum_{i=0}^{n-1}F\left(
t\right) ^{i}=n\text{ }A\left( t\right)\text{.}
\end{eqnarray*}
\end{proof}

• (1) welcome, (2) do yourself a favour: forget you ever heard of eqnarray, it is filled with bad decisions. Use the amsmath envs. (3) Next time please post a fully compilable example where those trying to help does not have to add stuff in order to test your code. – daleif May 24 '16 at 14:57
• Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – user36296 Oct 14 '16 at 8:31

First and most important: never use eqnarray for any reason whatsoever.

Second: never leave a blank line before a display.

Third: LaTeX doesn't force anybody to use \left and \right in front of each parenthesis or bracket; if your editor does it automatically, disable the feature.

Fourth: from the chosen breaks, I guess you're writing in a two column format; for this case, multline is the environment to choose.

Fifth: amsthm provides \qedhere just for this case. It works in every amsmath alignment and in equation, but not with eqnarray. Since you're not going to use eqnarray any more…

\documentclass[twocolumn]{article}

\usepackage{amsmath,amsthm}

\begin{document}

\begin{proof}
The DM's expected payoff with threshold $t$ and discount factor $\delta$ is
\begin{multline*}
\sum_{i=0}^{\infty} (\delta F(t)^{n})^{i}(1-F(t)^{n}) E[\theta \mid \theta>t]
\\
=\frac{1-F(t)^{n}}{1-\delta F(t)^{n}}E[\theta \mid \theta>t]
\end{multline*}
while each expert's expected payoff is
\begin{multline*}
\sum_{i=0}^{\infty}(\delta F(t)^{n})^{i}(1-F(t))A(t)E[\theta \mid \theta>t]
\\
=\frac{(1-F(t))A(t)E[\theta\mid\theta>t]}{1-\delta F(t)^{n}}.
\end{multline*}
Eliminating common terms the result then follows since
\begin{equation*}
\frac{1-F(t)^{n}}{1-F(t)}=
\sum_{i=0}^{n-1}F(t)^{i}=nA(t).
\qedhere
\end{equation*}
\end{proof}

\end{document}


Note also \mid instead of | for getting the proper spacing.

An alternative to multiline is align, but I would prefer the above solution.

\documentclass[twocolumn]{article}

\usepackage{amsmath,amsthm}

\begin{document}

\begin{proof}
The DM's expected payoff with threshold $t$ and discount factor $\delta$ is
\begin{align*}
&\sum_{i=0}^{\infty} (\delta F(t)^{n})^{i}(1-F(t)^{n}) E[\theta \mid \theta>t]
\\
\end{align*}
while each expert's expected payoff is
\begin{align*}
&\sum_{i=0}^{\infty}(\delta F(t)^{n})^{i}(1-F(t))A(t)E[\theta \mid \theta>t]
\\
\end{align*}
Eliminating common terms the result then follows since
\begin{equation*}
\frac{1-F(t)^{n}}{1-F(t)}=
\sum_{i=0}^{n-1}F(t)^{i}=nA(t).
\qedhere
\end{equation*}
\end{proof}

\end{document}


Here are a couple of suggestions about how to modify the appearance.

\documentclass[twocolumn]{article}

\usepackage{amsmath,amsthm}
\usepackage{xpatch}
\xpatchcmd\proof{\itshape}{\bfseries}{}{}

\renewcommand{\qedsymbol}{$\clubsuit$}

\begin{document}

\begin{proof}
The DM's expected payoff with threshold $t$ and discount factor $\delta$ is
\begin{align*}
&\sum_{i=0}^{\infty} (\delta F(t)^{n})^{i}(1-F(t)^{n}) E[\theta \mid \theta>t]
\\
\end{align*}
while each expert's expected payoff is
\begin{align*}
&\sum_{i=0}^{\infty}(\delta F(t)^{n})^{i}(1-F(t))A(t)E[\theta \mid \theta>t]
\\
\end{align*}
Eliminating common terms the result then follows since%
\begin{equation*}
\frac{1-F(t)^{n}}{1-F(t)}=
\sum_{i=0}^{n-1}F(t)^{i}=nA(t).
\qedhere
\end{equation*}
\end{proof}

\end{document}


Use whatever you like instead of $\clubsuit$.

• I appreciate the help, how can I center my equations though? When I run it, the first line of the equation is flushleft and the second is flushright. – Josh Eubanks May 24 '16 at 16:25
• @JoshEubanks That's how multline is supposed to do and it's very common practice for this type of split equations. I added an alternative. – egreg May 24 '16 at 16:31
• you failed to explicitly mention "never leave a blank line between text and a following display". – barbara beeton May 24 '16 at 16:37
• @barbarabeeton Now it's mentioned. ;-) – egreg May 24 '16 at 16:44
• +1. Nice touch to replace all instances of | with \mid. A further possible improvement: provide \DeclareMathOperator{\E}{E} in the preamble and replace the four instances of math-mode E with \E -- better to write the "expectation operator" letter in the upright font shape to have TeX insert a thinspace ahead of each \E. – Mico May 24 '16 at 17:02