[Tex/LaTex] How to place qed symbol at the end of an equation using eqnarray* enviroment

amsmathmath-modepositioningproof-package

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}


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$.