Not sure if LaTeX counts as programming, or if my question even makes sense, but I have this LaTeX expression (or what you call it):
\sum_{k=1}^n k^2 = 1+4+9+\ldots +n^2 = \frac{1}{3}n^3 + \frac{1}{2}n^2 + \frac{1}{6}n
The problem is that the k=1 and n comes next to, i.e. after, the sum symbol, instead of above and below it. Is there a way I can change this? I have tried to show visually what I mean below. The sum symbol represented as Xs :
n XXX XXX n XXX vs XXX XXX XXX k=1 k=1
I want the first kind, but am getting the second.
Sums and products Like integral, sum expression can be added using the \sum_{lower}^{upper} command. In similar way you can obtain expression with product of a sequence of factors using the \prod_{lower}^{upper} command.
If you're willing to use the Mathtime Professional II font package, you could use its \xl\sum , \XL\sum , \XXL\sum etc commands to get larger summation symbols.
Use as \bm{\Sigma} .
Try
\sum\limits_{k=1}^n k^2
if you want the sum limits to appear above and below the sum sign in an inline equation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With