# How do I write an integral from a to b in latex?

1. Sep 20, 2012

### phosgene

As the title suggests, I can only see how to write an integral like:

But how would I write an integral like the following?

2. Sep 20, 2012

### AlephZero

Put a subscript and a superscript on the \int, e.g. \int_{a}^{b}

3. Sep 20, 2012

### phosgene

Oh, argh! Why didn't I think of that? Anyway, thanks :)

4. Sep 20, 2012

### Byron Chen

5. Sep 20, 2012

### micromass

Staff Emeritus
6. Sep 21, 2012

### LCKurtz

Also, if you see an example of what you want to do, just right click on it and select to show math as Tex commands to see the code. You can copy/paste from that.

7. Mar 7, 2013

### whatlifeforme

how do i make the size and font look like that iwth latex? is that latex or a link to an image?

8. Mar 7, 2013

### Greg Bernhardt

It's just an image.

9. Mar 7, 2013

### Staff: Mentor

Here's the actual LaTeX for phosgene's two integrals:

$$F = \int {f(x) dx}$$

$$\int_a^b {f(x) dx}$$

The right-click trick should work on those. Or control-click if you're using a Mac, like I am.

10. Mar 7, 2013

### Staff: Mentor

As long as the subscripts/superscripts are single characters, as in the above, you can omit the braces around the sub-/superscript. The following will render exactly the same:
\int_a^b

When there are two or more characters (e.g. 2x, -3, etc.) you need the braces around the entire expression, as in this example:
\int_{-2}^{3x}

11. Mar 7, 2013

### whatlifeforme

mine looks smaller for some reason.

$\int_a^b {f(x) dx}$

12. Mar 7, 2013

### robphy

tex $$\int_a^b {f(x) dx}$$

itex $\int_a^b {f(x) dx}$

itex with \displaystyle $\displaystyle\int_a^b {f(x) dx}$