1. Limited time only! Sign up for a free 30min personal 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!

Homework Help: Unit Step Functions (How to approach)

  1. Apr 9, 2012 #1
    1. The problem statement, all variables and given/known data
    The problem is given as a piece-wise function f(t)={1, 0≤t<4; 0, 4≤t<5; 1, t≥5}. I am asked to write the function in terms of unit step functions and then find the Laplace Transform of the function. I can do the Laplace if I could ever get the unit step function.

    2. Relevant equations
    For a function of the type f(t) = {0, 0≤t<a; g(t), a≤t<b; 0, t≥b}
    f(t) can be written as: f(t) = g(t)[U(t-a) - U(t-b)]

    3. The attempt at a solution
    So, if I follow the given equation, then g(t) would be zero.
    f(t) = 0[U(t-4) - U(t-5)] = 0 (for any value of t). This doesn't seem correct.

    Then I thought maybe I could re-write it as f(t)={0, 0≤t<4; 1, 4≤t<5; 0, t≥5} and subtract the result from 1 giving:
    f(t) = 1 - 1[U(t-4) - U(t-5)]. Evaluating this at t=0, would give 1-[0-1]=2. Wrong again.

    I have struggled with what should be a simple problem for way to long. I think I am simply approaching the problem all wrong and have a fundamental lack of understanding. Can anyone nudge me in the right direction and give me an alternate way to approach the problem. I have looked at various sites online, but they only confused me more. Any help at all would be appreciated.
    1. The problem statement, all variables and given/known data

    2. Relevant equations

    3. The attempt at a solution
  2. jcsd
  3. Apr 9, 2012 #2
    Try drawing this out first, you've gotten 3 parts to the piecewise function.

    You know that a unit step function operates in an on/off manner, so it's on (1) to begin with, and then at 4 seconds, it's off (0), and then again at 5 seconds it's on (1) again.
  4. Apr 9, 2012 #3
    OK, the graph is attached (hope it shows up). In case it doesn't, the graph is a horizontal line at f(t) =1 from 0 to 4, drops to 0 from 4 to 5, and back up to 1 for t>5.

    Attached Files:

  5. Apr 9, 2012 #4

    You know that u(t) is defined as {0; for t < 0, and 1; for t ≥ 0}

    Looking at that graph, at t = 0, the graph is turned on, so we know here that u(0) = 1

    So we start with u(t) as the first part of our function.

    f(t) = u(t) + ............

    So now consider the other parts of the piecewise function, at what point does it drop to 0? How would you express that in terms of a unit step function? Note, you've already listed it earlier. Remember your signs for when something is rising/falling.

    Edit: u(t) = 1 for when t = 0, not just by that graph only.
    Last edited: Apr 9, 2012
  6. Apr 9, 2012 #5
    It drops to zero at t=4, so I think it would be expressed as u(t-4). Does this lead to:
    f(t) = 1 - u(t-4)? This is whats getting confused in my head, but I will wait to see if my response is correct before I elaborate.
  7. Apr 9, 2012 #6
    Somewhat yes, though why did you change u(t) to 1?

    What if you wanted to substitute t = -1 into the equation? u(t) would not be 1 then.

    Leave it as u(t), you want to express the entire equation in terms of the unit step function first before we start using values from it.

    You are correct about the second part, it is -u(t-4) because it drops down at 4 seconds, what about the last part, when does it rise again?
  8. Apr 9, 2012 #7
    I just realised this piecewise function isn't defined for t < 0, so you're correct, it would be 1

    Sorry about any confusion, although it is best to fully determine the function before changing values. This way there are no errors made if you're dealing with slightly bigger functions or functions that are defined for t < 0
  9. Apr 9, 2012 #8
    It rises again at t=5 so it would be u(t-5). I'm not sure why I changed u(t) to 1, part of my mis-understanding. So now we would have:
    f(t) = u(t) + u(t-4) - u(t-5) ?

    The signs are confusing me. If we are falling from 1 to 0 at t=4, it seems to me that it would be u(t) - u(t-4) and similarly when t=5 we go from 0 to 1 so it seems to me that it should be (u(t) - u(t-4)) + u(t-5). But that's not correct is it? Sorry for the stupid questions, just trying to understand, instead of just getting it right on this one problem.
  10. Apr 9, 2012 #9
    You were correct it was 1, although leaving it as u(t) is also correct, and best until the function is fully determined.

    Your last equation is correct and your reasoning is correct, if you're dropping it would be -u(t-4) and if you're rising again it would be +u(t-5)

    Now substitute some values for t and see what you get:

    t = 4;

    u(4) - u(4 - 4) + u (4 - 5) = u(4) - u(0) + u(-1) = 1 - 1 + 0 = 0

    At t = 4, there is a fall to 0, so that is correct.

    t = 3;

    u(3) - u(3 - 4) + u(3 -5) = u(3) - u(-1) + u(-2) = 1 - 0 + 0 = 1

    At t = 3, the function is on (1)
  11. Apr 9, 2012 #10
    I think I am catching on, but at t=4:
    wouldn't u(4) = 0, u(4-4) = u(0) = 1, & u(4-5) = u(-1) = 1? Since f(t) = 0 when 4≤t<5. I think it was just a matter of < vs ≤, either way we get the same answer.
    0-1+1=0? vs 1-1+0=0.

    I appreciate you walking me through this. It finally cleared everything up at the end. I sometimes make things much harder than they really are.
  12. Apr 9, 2012 #11
    u(t) = 0 only when t < 0; that is the definition of a unit step function.

    So when t = 4, u(4) = 1 always; which is why you were correct earlier when you made that u(t) = 1

    Similarly, by the definition. u(-1) = 0

    Since we weren't dealing with values of t < 0, that u(t) was always going to be 1.


    Let's consider for (4 < t < 5), let's take t = 4.5; according to the graph we know that we should get f(t) = 0.

    u(4.5) - u(4.5 - 4) + u(4.5 - 5) =

    u(4.5) - u(0.5) + u(-0.5) =

    1 - 1 + 0 = 0

    So it matches.

    It is very important that we remember the definition for the unit step function. You just need to remember when t < 0, u(t) = 0 and it's 1 when t is greater or equal to 0.
  13. Apr 10, 2012 #12
    "It is very important that we remember the definition for the unit step function. You just need to remember when t < 0, u(t) = 0 and it's 1 when t is greater or equal to 0."

    Thanks again for the additional clarification. I know this was like hammering a nail into concrete. I can see my future...Auditing Calc II and re-taking Diff EQ.

    This site has been great to help me (when I remember to use it). How does this site get supported? Donations? I'll do some checking and if donations are accepted to keep the site going, I will contribute.
  14. Apr 10, 2012 #13
    Check here: https://www.physicsforums.com/payments.php [Broken]

    I'm glad you like the site :smile:
    Last edited by a moderator: May 5, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook