# Piecewise definition of function

## Definition

A **piecewise definition of function** is a method used for defining a function that does the following:

- It divides the domain of the function into pairwise disjoint subsets (we can call this a set partition).
- It gives a different rule or expression for calculating the function on each of the subsets.

In the context of functions on the reals, piecewise definitions could be *interval-based piecewise definitions* (where each piece is a union of intervals and points) or other kinds of piecewise definitions (For instance, by partitioning the domain into its rational and irrational elements).

## Notes

### For interval-based piecewise definitions

For this type of piecewise definition, the key things to note are that:

- At points in the interior of each interval, the function behaves completely like the
*piece*function for that interval. In particular, attributes such as continuity and differentiability, as well as values for the derivatives, are all determined by the piece function. - Interesting stuff can happen at boundary points between different intervals of definition, where there is more than one operative definition in the immediate neighborhood of the point. Here, we have to beware of one-sided phenomena.