# Describing a piecewise function

## Homework Statement

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 ... ?

Related Precalculus Mathematics Homework Help News on Phys.org
Defennder
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.

HallsofIvy
Homework Helper

## Homework Statement

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 ... ?
Well you would nned to more clearly state what you mean by "k-" and "k+". Another way to write it would be
$$f(x)= \left\{\begin{array}{c}-1 if 0< x< 2 \\ 1 if 2< x< 4\end{array}\right$$
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.

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!