# LaTex Error Help- Math Related

I'm trying to make an equation array

\begin{eqnarray*}
f^{(a)} (0) &=& \frac{a!}{2 \pi i} \oint_{ |z| = \frac{\varepsilon}{r}} \frac{f(z)}{(z)^{a+1}} dz &=&
&=& \frac{a!}{2 \pi i} \oint_{ |z| = \frac{\varepsilon}{r}} \frac{z-z^{2}-z^{3}-\dots -z^{n-1}}{(z^{a+1})(1-z-z^{2}-z^{3}-%
\dots -z^{n})} dz
\end{eqnarray*}%


Everything appears to be fine except there's an extra = sign to the far right and I can't seem to find any way to get rid of it. Any help would be very appreciated!

Addendum: I'm having trouble formatting this

\begin{align*}
$$f_a = Res (F(z))_{z=0} &= \Big(Res(F(z)_{z=0} +\sum_{\beta} \text{Res}(F(z)),z=\beta)\Big) - \Big(\sum_{\beta} \text{Res}(F(z)),z=\beta)) &= {2\pi i}\oint F(z)dz - \Big(\sum_{\beta} \text{Res}(F(z)),z=\beta)\Big) &= - \Big(\sum_{\beta} \text{Res}(F(z)),z=\rho)\beta)$$
\end{align}%


The whole thing is simply staying in one line instead of breaking up into the proper formatting.

-
Welcome to TeX.SE! –  cmhughes Jan 27 '13 at 1:30
@Mico I figured out that portion, but I'm having another alignment issue. –  Anthony Peter Jan 27 '13 at 3:36
@AnthonyPeter Now that you have posted a follow-up question, maybe you can take out the new formatting issue part from your question. :-) –  hpesoj626 Jan 27 '13 at 5:00
Remove $$...$$ from within your align* and you also need a line-break \ at the end of every equation. –  Werner Jan 27 '13 at 6:56

You are missing \\ to finish your first line.

I would recommend using align from the amsmath package instead of eqnarray which is considered obsolete as detailed in \eqnarray vs \align The align environment gives much better spacing.

A complete MWE follows, including the implementation of align

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\subsection*{original using eqnarray}
\begin{eqnarray*}
f^{(a)} (0) &=& \frac{a!}{2 \pi i} \oint_{ |z| = \frac{\varepsilon}{r}} \frac{f(z)}{(z)^{a+1}} dz \\
&=& \frac{a!}{2 \pi i} \oint_{ |z| = \frac{\varepsilon}{r}} \frac{z-z^{2}-z^{3}-\dots -z^{n-1}}{(z^{a+1})(1-z-z^{2}-z^{3}- \dots -z^{n})} dz
\end{eqnarray*}%

\subsection*{new-- recommended using align}
\begin{align*}
f^{(a)} (0) & = \frac{a!}{2 \pi i} \oint_{ |z| = \frac{\varepsilon}{r}} \frac{f(z)}{(z)^{a+1}} dz                                                        \\
& = \frac{a!}{2 \pi i} \oint_{ |z| = \frac{\varepsilon}{r}} \frac{z-z^{2}-z^{3}-\dots -z^{n-1}}{(z^{a+1})(1-z-z^{2}-z^{3}- \dots -z^{n})} dz
\end{align*}%

\end{document}


Here's a possible solution for your follow-up question- note that I have used \DeclareMathOperator as described by @Mico

\DeclareMathOperator{\res}{Res}


and then you can use \res as follows:

\subsection*{Follow-up question}
\begin{align*}
f_a & = \res{(F(z))}_{z=0}                                                                                           \\
& = \Big(\res{(F(z)}_{z=0} +\sum_{\beta} \res{(F(z))},z=\beta)\Big) - \Big(\sum_{\beta}   \res{(F(z))},z=\beta)) \\
& = {2\pi i}\oint F(z)dz -  \Big(\sum_{\beta} \res{(F(z))},z=\beta)\Big)                                         \\
& = - \Big(\sum_{\beta} \res{(F(z))},z=\rho)\beta)                                                               \\
\end{align*}%


Note that the issue with your code in this case was, as before, the lack of \\ to illustrate a new line.

-
Could you help me with my updated question? –  Anthony Peter Jan 27 '13 at 2:51
@AnthonyPeter please see Mico's comment :) –  cmhughes Jan 27 '13 at 3:11
I have figured out what the problem was. Now I'm having another alignment issue. –  Anthony Peter Jan 27 '13 at 3:24
@AnthonyPeter I have updated my answer :) –  cmhughes Jan 28 '13 at 2:43

There are several problems with your code; the first two items in the following list have already been pointed out by @Werner.

• One must terminate each line of intended output with a \\ (double backslash);
• the align and align* environments already put TeX into displaymath mode -- don't provide  directives as well;
• be sure to type \end{align*} rather than \end{align} -- the two environments are not the same;
• when you have \Big( directives, take care to type \Big) rather than just ) to end the parenthetical expression. Better yet, use \Bigl( and \Bigr);
• you use \text{Res} in some cases but just Res in others, leading to inconsistent typeset appearance of the string. Since "Res" is an operator name (as are "sin" and "log", say), you could define a macro \Res to typeset "Res" in upright letters consistently. I suggest you include the instruction

\DeclareMathOperator{\Res}{Res}


in the preamble -- after loading the amsmath package, which provides the \DeclareMathOperator command -- and then use \Res throughout the math expressions of your document.

-
\Bigl( and \Bigr) is preferable to keep the opening and closing atom nature of the parentheses. And \textrm is redundant with \DeclareMathOperator –  egreg Jan 27 '13 at 13:47
@egreg -- thanks! I'll change my write-up. –  Mico Jan 27 '13 at 14:13
I have deleted my answer in the dupe and upvoted this. This answer is more complete than my deleted answer. :-) –  hpesoj626 Jan 28 '13 at 4:35