[Tex/LaTex] Using \displaystyle in Equation environment


I have an equation in eqnarray environment. The equation has a sum notation with subscript and superscript. The problem is that the subscript and superscript appear on sideways of the sum notation which looks pretty ugly. I came to know about \displaystyle but it can be used only with inline equation.

How can I use such a command with the equation or eqnarray environment.

Best Answer

It may just be that you're using the environment incorrectly. This might be what you're after:

enter image description here

\usepackage{amsmath}% http://ctan.org/pkg/amsmath
  r    &= \sum_{i=k}^n\binom{n}{i}\binom{m-n}{n-i} \\
  f(x) &= \frac{\sum_{i=k}^n\binom{n}{i}\binom{m-n}{n-i}}{\binom{m}{n}} \\
  g(x) &= \frac{\displaystyle\sum_{i=k}^n\binom{n}{i}\binom{m-n}{n-i}}{\binom{m}{n}}

amsmath provides the align (numbered) environment, as well as \binom. Numerator and denominator of fractions in display math mode are normally converted to \textstyle. Therefore, it requires a verbatim switch to \displaystyle if needed.