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

Graphs with two intervals

  1. Jan 24, 2010 #1
    In general,
    if f(x)=k but only for a < x < b and c < x < d
    how would you integrate the graph ?
    To find the mean for example, would you find the mean for each and add together, or is there some special thing for this case?
  2. jcsd
  3. Jan 24, 2010 #2


    Staff: Mentor

    What's the value of f(x) for x not in the two intervals? Presumably the value is zero, but you didn't state this.

    Assuming for the moment that f(x) = 0 outside the two intervals, finding the integral of this function (not the integral of its graph) is easy to find.
    [tex]\int_{-\infty}^{\infty} f(x) dx~=~\int_a^b f(x) dx~+~\int_c^d f(x) dx~=~k(b - a)+ k(d - c)[/tex]

    To find the mean value of this function over the two intervals, evaluate the integral of the function (see above), and then divide by the length of the two intervals, b - a + d - c.
  4. Jan 24, 2010 #3
    sorry, yes I meant if it is zero everywhere else.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook