# Working with Limits

/text/smath/guide/limits.xhp
limits;in sums/integrals
integral limits
Working with Limits
How can I define the limits in a Sum or Integral formula?i83226
You want to insert a summation formula like "summation of s^k from k = 0 to n" at the cursor in a Writer text document.
- Choose Insert - Object - Formula.
  You see the Math input window and the Elements window. If you don't see the Elements window, you can enable it in the View menu.
- In the upper part of the Elements window, click the Operators icon.
- In the lower part of the Elements window, click the Sum icon.
- To enable lower and upper limits, click additionally the Upper and Lower Limits icon.
- In the input window, the first placeholder or marker is selected, and you can start to enter the lower limit:
  k = 0
- Press F4 to advance to the next marker, and enter the upper limit:
  n
- Press F4 to advance to the next marker, and enter the summand:
  s^k
- Now the formula is complete. Click into your text document outside the formula to leave the formula editor.
In the same way, you can enter an Integral formula with limits. When you click an icon from the Elements window, the assigned text command is inserted in the input window. If you know the text commands, you can enter the commands directly in the input window.
- Choose Insert - Object - Formula.
- Click in the input window and enter the following line:
  int from{a} to{b} f(x)`dx
  A small gap exists between f(x) and dx, which you can also enter using the Elements window: click the Format icon, then the Small Gap icon.
If you don't like the font of the letters f and x, choose Format - Fonts and select other fonts. Click the Default button to use the new fonts as default from now on.
If you need the formula within a line of text, the limits increase the line height. You can choose Format - Text Mode to place the limits besides the Sum or Integral symbol, which reduces the line height.
Example of Integral and Sum ranges