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: How do I write this interesting piecewise function?

  1. Jun 18, 2011 #1
    1. The problem statement, all variables and given/known data
    [URL]http://www2.seminolestate.edu/lvosbury/images/VibSpringAnNS.gif[/URL]
    Find the governing differential equation and position functions for a 32 pound object attached to the end of a spring with a spring constant of 1 and a forcing function that yields a constant velocity in the direction of motion. This velocity changes sign periodically. The forcing function is piecewise. The object is pulled down until the spring is stretched to 5 feet below its equilibrium position and then the object is released with an initial velocity of -1 ft/sec and the forcing function produces a constant velocity of -1 ft/sec. After the object has traveled 10 feet it is impeded and reverses direction with an initial velocity at that point of 1 ft/sec. and the forcing function changes to produce a constant velocity of 1 ft/sec. This behavior continues indefinitely.

    2. Relevant equations



    3. The attempt at a solution

    I am interested in only finding the piecewise function.

    I drew the graph.
    [URL]http://assets.openstudy.com/updates/attachments/4dfd29cf0b8bbe4f12e6e1ca-joseph20111-1308436975669-piecewise.bmp[/URL]


    I think I can use a calculator function such as frac(x) or int(x).

    I wrote a piecewise (unfinished) function that I believe can be simplified.
    [URL]http://assets.openstudy.com/updates/attachments/4dfd29cf0b8bbe4f12e6e1ca-joseph20111-1308447921585-pie.bmp[/URL]

    -t represents line with negative 1 slope. t represents line with positive 1 slope.
    I wrote (1)^n * t for alternating t.

    To write inequalities, 5 + 10n.
     
    Last edited by a moderator: Apr 26, 2017
  2. jcsd
  3. Jun 19, 2011 #2

    HallsofIvy

    User Avatar
    Science Advisor

    Your forcing functio is periodic with period 20. The simplest thing to do would be to solve it as two separate problems for -5< t< 5 and then for 5< t< 15.
     
  4. Jun 19, 2011 #3

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Your piecewise description of your forcing function is not correct. For the period from -5 to 15 your formula would be:

    f(x) = x, -5<x<5
    f(x) = 10 - x, 5 < x < 15

    You can write this portion of f(x) using the unit step function u(x):

    f(x) = x + (10-2x)u(x-5) for -5 < x < 15

    and call F(x) the periodic extension of f(x) with period 20. Then you could solve the DE using LaPlace transforms, making use of the expression for the LT of a periodic function.
     
  5. Jun 20, 2011 #4
    f(t) = t, -5<t<5
    f(t) = 10 - t, 5 < t < 15

    I think I can find the Laplace transform of this periodic function.
     
  6. Jun 20, 2011 #5

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Since your piecewise function is actually not defined for t < 0, you should use a formula on (0,20) to take the LaPlace transform. I think it is:

    f(t) = t -10u(t-5) - 10u(t-15) on (0,20)

    but you can check to be sure.
     
  7. Jun 21, 2011 #6

    chiro

    User Avatar
    Science Advisor

    One way of representing this that comes to mind is to use a x arcsin(sin(bx)) for constants a and b. From your drawing let a = A and b = pi/10 and hopefully that should give you what you need.
     
    Last edited by a moderator: Apr 26, 2017
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook