Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Show the bounds of an integral in LaTeX

  1. Feb 2, 2008 #1
    Hey I'm typing out my math homework, and I've run into some notation that I'm kind of confused about:

    I need to know how to show the bounds of an integral after you've taken the antiderivative. Kind of like this:

    Integral (bounds: 0 to 2) of x^2 = [1/3x^3] (0 to 2).

    The actual notation might look like this:


    Sorry if I have this in the wrong forum; I didn't see any designated for LaTeX.
  2. jcsd
  3. Feb 2, 2008 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Something like:

    [tex] \int_0^2 x^2 dx = \left[\frac{1}{3} x^3 \right]_0^2 [/tex]

    Code (Text):
    \int_0^2 x^2 dx = \left[\frac{1}{3} x^3 \right]_0^2
  4. Feb 2, 2008 #3
    That's exactly what I needed...

  5. Feb 2, 2008 #4
    Okay, now I've got another question:

    What if I want to have negative bounds like this:


    pdflatex doesn't seem to like that very well.
  6. Feb 2, 2008 #5


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Bound them with curly brackets {..}. What Latex package are you using? Most come with a PDF explaining the simple operations of Latex in the source folder.
  7. Feb 2, 2008 #6
    Compound expressions should be enclosed in curly braces:

    \int_{-3}^3 dx

    Also, as an alternate answer to your original question, if you just want a long vertical bar try \bigg|

    For example,

    [tex]\int_{-3}^3 dx = x \bigg|_{-3}^3 = 3 - (-3) = 6[/tex]

    (if you think \bigg| looks too big you can drop down a size with \big| )
  8. Feb 2, 2008 #7
  9. Feb 3, 2008 #8


    User Avatar
    Science Advisor
    Homework Helper

    and if you have an expression which is tall enough of itself, you may just want to use left and right;
    [tex]\int_{-3}^3 x^2 dx = \left. \frac{1}{3} x^3 \right|_{-3}^3 = \cdots [/tex]
    (note the use of the \left. - otherwise LaTeX will complain!)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook