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!

Describing a piecewise function

  1. Aug 28, 2008 #1
    1. The problem statement, all variables and given/known data
    Hi all

    I have a function f(x), which is:

    -1 when x is in the intervals .. (-4;-2), (0;2), (4;6) etc.. and
    1 when x is in the intervals ... (-6;-4), (-2;0), (2;4) etc...

    At the points -4,-2, 0, 2 .. there are discontinuities.

    1) How would I write this function correctly?

    2) Is it correct to state that: f(k-) = 1 where k = -6, -2, 2, 6 and f(k+) = 1 where -4, 0, 4 and f(k+) = -1 when k = -6, -2, 2, 6 .. and f(k-) = -1 where k = -4, 0, 4 ... ?
  2. jcsd
  3. Aug 28, 2008 #2


    User Avatar
    Homework Helper

    It depends on what you mean by "write". A fancy way would be to find the Fourier series of the function. A more explicit way would be to define:

    f(x) = -1 for (...condition...)
    1 for (...condition...)
    For the latter, note that all the intervals for which it is -1, begin as a mutiple of 4.

    2)That expression only determines the function at the points, and besides as you note earlier there are discontinuities at some of the points given as 1 or -1 by your expression.
  4. Aug 28, 2008 #3


    User Avatar
    Science Advisor

    Well you would nned to more clearly state what you mean by "k-" and "k+". Another way to write it would be
    [tex]f(x)= \left\{\begin{array}{c}-1 if 0< x< 2 \\ 1 if 2< x< 4\end{array}\right[/tex]
    and assert that f is periodic with period 4.

    By the way, I think you mean to say that that f is not defined at -4, -2, etc. There would have to be discontinuites there no matter how it is defined at the even integers.
  5. Aug 28, 2008 #4
    By "k+" I mean when we approach k from right going towards left, and likewise "k-" is when we approach k from left going towards right.

    I see what you mean, HallsOfIvy and Defennder. I had not thought of stating that the function is periodic. Thanks!
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Describing a piecewise function
  1. Piecewise function (Replies: 3)