[Tex/LaTex] Position the limits of Sum

math-modemath-operatorsmathtools

I want the limits of the sum sign to be placed where I placed the red lines in the photo. This is the line of script I used:

$Result = p + \sum_{i=0}^{n} f(x)$ 

This is what I get and the red lines is what I want.
enter image description here

Best Answer

The problem is that you're trying to use displaystyle limits in text mode. Which is not that good, as I explain below.

I don't know if it's typographically correct but the code is

 $\sum\limits_{i=0}^n f(x)$

The \limits command allows the limits to be positioned above and below the symbol.

The fact that inline math has "text style" limits is just that inline formulas typeset like display style are usually ugly, disrupt the natural flow of the document (the limits usually create a line whose height and depth is bigger than the other ones), and they are not usually as readable as when they are placed in display.

Please be cautious when considering what using "displaystyle limits" in text mode.