1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Integration with a step function?

  1. Sep 16, 2007 #1
    Integration with a step function??

    1. The problem statement, all variables and given/known data
    How do you go about integrating a function that has parameters "x" and "delta" where "delta" is a step function of "x" (delta is 1 for x>0, 0.5 for x=0, and 0 for x<0)??

    I don't remember doing anything like this in any of my math classes before :(


    2. Relevant equations
    3. The attempt at a solution
    No clue as to where to even start? Do you divide up the integrals to include the different ranges for the step functions? So like, integral of whole function from negative infinity to 0 and then from 0 to positive infinity? Except that doesn't make sense to me either...
     
  2. jcsd
  3. Sep 16, 2007 #2

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    I have no idea what you mean by "How do you go about integrating a function that has parameters "x" and "delta" where "delta" is a step function of "x" (delta is 1 for x>0, 0.5 for x=0, and 0 for x<0)"

    Do you simply mean that f(x)= 1 if x> 0, f(x)= 0.5 if x= 0, f(x)= 0 for x < 0? and are you doing a definite integral or indefinite integral.

    You integrate a piecewise function by doing the pieces separately. If should be obvious that x< 0 contributes nothing to an integral. Similarly, "f(x)= 0.5, if x= 0", since that is at a single point, contributes nothing (the "area" under a single point is 0). For x> 0, you are just looking at the anti-derivative of f(x)= 1.
     
  4. Sep 16, 2007 #3
    Sorry, what I meant was, for example, a function like:

    y=x(delta(2-x))+(1-x)(delta(x-3))

    where delta(x) is a step function: delta=1 for x>0, delta=0.5 for x=0, and delta=0 for x<0.

    Integrate with respect to dx... and it's an indefinite integral.

    Does that make any more sense? I'm just as confused :(
     
  5. Sep 16, 2007 #4
    Can you imagine what the integral of your delta function would look like? Imagine doing the following integral:

    [tex]\int_{-\infty}^{x} \delta(u)\,du[/tex]

    What's the answer in terms of x?

    Hints:

    1. Draw a picture.
    2. Use the fact that [tex]\int_{a}^{b} f(x)\,dx + \int_{b}^{c} f(x)\,dx = \int_{a}^{c} f(x)\,dx[/tex] to split the function into pieces which you know how to integrate.
     
    Last edited: Sep 16, 2007
  6. Sep 16, 2007 #5
    Sorry I'm still lost :( I know that fact you listed as #2 but I'm not sure how that applies to the integral you told me to picture and how that relates to my original question?
     
  7. Sep 16, 2007 #6
    Draw a picture of delta... it might help you visualise the following:

    if x < 0, [tex]\int_{-\infty}^x \delta(u)\,du = 0[/tex]

    if x > 0, [tex]\int_{-\infty}^x \delta(u)\,du = \int_{-\infty}^0 0\,du + \int_0^x 1\,du = x[/tex]
     
  8. Sep 16, 2007 #7

    EnumaElish

    User Avatar
    Science Advisor
    Homework Helper

    What is confusing is that it is an indef. integral. First off the bat, do you know which value of delta will never come into play in any kind of integration? (Hint: one of its values is defined over a measure-zero set.) You have 2 values that matter; so you have 4 possibilities:
    2-x > 0 and x-3 > 0,
    2-x < 0 and x-3 > 0,
    2-x > 0 and x-3 < 0,
    2-x < 0 and x-3 < 0.

    For each of these possibilities you can solve the indef. integral separately.
     
  9. Sep 16, 2007 #8
    oh man, sorry, the integral is not an indefinite one. It goes from 0 to "L."

    This is a particle in a box normalization problem where I got completely lost when I had to integrate the square of that function (ie. y^2) from 0 to L with respect to x...
     
  10. Sep 16, 2007 #9

    EnumaElish

    User Avatar
    Science Advisor
    Homework Helper

    Okay, even easier. Do you understand the bit about measure zero interval?
     
  11. Sep 16, 2007 #10
    Btw, you should probably not call it a delta function, as that is usually used to denote a different, but related function. Your function is called the step function, because it looks like a step. See: http://en.wikipedia.org/wiki/Heaviside_step_function where there is a picture of it. Try imagining integrating over various ranges of it -- and seeing what the area under the line would turn out to be.
     
  12. Sep 16, 2007 #11
    I'd be surprised if she's been taught integration via measure theory...
     
  13. Sep 16, 2007 #12
    Yeah, I'm not sure what that's about :(
     
  14. Sep 16, 2007 #13

    EnumaElish

    User Avatar
    Science Advisor
    Homework Helper

    Well, an integral is an area under a curve defined over an interval, correct?

    Look at the "intervals" over which the 3 values of the delta function have been defined. Can you visualize each of the intervals? Does one look different that the other two? Which one? What is different about it?
     
  15. Sep 16, 2007 #14
    [tex]\Psi[/tex]=x[tex]\vartheta[/tex](l/2-x)+(l-x)[tex]\vartheta[/tex](x-l/2)

    That's the equation that I have to square and find the integral from 0 to l given the above definition of [tex]\vartheta[/tex]...

    So I drew the graph of delta, but I'm still confused as to if it'll still be the same graph when it is squared (since 1^2 is still 1) or what's thing about delta=0.5 when x=0... and this delta term is multiplied by other x terms, so how would that affect integration techniques?
     
  16. Sep 16, 2007 #15

    EnumaElish

    User Avatar
    Science Advisor
    Homework Helper

    Okay, so it's a theta, whatever, function. What is the exact definition of [itex]\vartheta[/itex], same as "1 for x>0, 0.5 for x=0, and 0 for x<0"?

    The part about "squaring": you mean, [itex]\Psi^2[/itex]?

    Let L = 10. Now substitute that value into your formulas. Then c-a-r-e-f-u-l-l-y make a graph of [itex]\Psi^2[/itex] over 0 < x < 10.
     
    Last edited: Sep 16, 2007
  17. Sep 16, 2007 #16
    The usual way to do these to to split the function into pieces that you can tackle individually. So in your case, I'd split the integral into [0, l/2] and [l/2, l]. Then inside each interval, delta(l/2-x) equals 1 and 0, and delta(x-l/2) equals 0 and 1. That should let you work out the integral.
     
  18. Sep 16, 2007 #17

    EnumaElish

    User Avatar
    Science Advisor
    Homework Helper

    And, do you understand why you need to split it into two and not three?
     
  19. Sep 16, 2007 #18
    Thanks so much! I got the answer that I was expecting. So just to make sure, is this the correct method?
    ====================
    using the relationship such as: theta(l/2-x) is 1 when x<l/2 [and therefore theta^2(l/2-x) is also 1 in that case], theta(l/2-x) is 0 when x>l/2, etc...

    and since: psi^2=x^2 theta^2 (l/2-x) + (l-x)^2 theta^2(x-l/2)

    if you do Integ(psi^2)=Integ(x^2 dx) + Integ((l-x)^2 dx)
    where the 1st integral on the right hand side is from 0-->l/2 and the second one is from l/2-->1... and just evaluate that?
    ======================

    And I think I see why it's split into two integrals not three (by the third one, do you mean an integral that goes from l/2 to l/2??)... but I thought the range that you integrate stuff over is including the endpoint values itself... so in my first integral, I'd be finding the area from 0 to l/2, including the points 0 AND l/2... but I know at point l/2 exactly, it's value isn't 0 or 1.... so are we just ignoring that point?
     
  20. Sep 16, 2007 #19
    More importantly, any integral like:

    [tex]\int_a^a \ldots\,dx = 0[/tex]

    because the limits are the same. In other words, it didn't matter what your function was at 0, as long as it was finite.

    You might want to wonder what the derivative of the step function is -- that is what we usually call the delta function (I seriously recommend this nomenclature, otherwise people will get confused).
     
  21. Sep 16, 2007 #20

    EnumaElish

    User Avatar
    Science Advisor
    Homework Helper

    psi^2 is NOT x^2 theta^2 (l/2-x) + (l-x)^2 theta^2(x-l/2). You are missing the interaction term.

    Hint: how do you expand (a + b)^2? [Edit: I do realize that the interaction term happens to be 0 in this case, but that should have been part of your argument.]

    Did you mean the second one is from L/2 --> L? (I suggest using uppercase L instead of l, which you seem to be confusing with 1.)
     
    Last edited: Sep 17, 2007
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Integration with a step function?
Loading...