Hotmath
Math Homework. Do It Faster, Learn It Better.

Piecewise-Defined Function

A piecewise-defined function is one which is defined not by a single equation, but by two or more.  Each equation is valid for some interval .

Example 1:

Consider the function defined as follows.

y = { x + 2 for   x < 0 2 for   0 x 1 x + 3     for   x > 1

  

The function in this example is piecewise-linear, because each of the three parts of the graph is a line.

Piecewise-defined functions can also have discontinuities ("jumps"). The function in the example below has discontinuities at x = 2 and x = 2 .

Example 2:

Graph the function defined as shown.

y = { 1 2 x 2 for   x < 2 0for   2 x < 2 1 2 x 2 for   x 2

 Note that we use small white circles in the graph to indicate that the endpoint of a curve is not included in the graph, and solid dots to indicate endpoints that are included.

  

Example 3:

Graph the function defined below.

y = { log x for   0 < x < 1 1 x 2      for   x 1

  

Negative values of x and 0 are not included in the domain because the first function, log x , is undefined for those values.  The value x = 2 is not included in the domain because the second function is not defined for that value (it has a vertical asymptote there). Therefore the domain of this function is { x | 0 < x < 2 } { x | x > 2 } . This can be represented using interval notation as ( 0 , 2 ) ( 2 , ) .