High Quality Content by WIKIPEDIA articles! In mathematics, a piecewise-defined function (also called a piecewise function) is a function whose definition changes depending on the value of the independent variable. Mathematically, a real-valued function f of a real variable x is a relationship whose definition is given differently on disjoint subsets of its domain (known as subdomains).The word piecewise is also used to describe any property of a piecewise-defined function that holds for each piece but may not hold for the whole domain of the function. A function is piecewise differentiable or piecewise continuously differentiable if each piece is differentiable throughout its domain. In convex analysis, the notion of a derivative may be replaced by that of the subderivative for piecewise functions. Although the "pieces" in a piecewise definition need not be intervals, a function is not called "piecewise linear" or "piecewise continuous" or "piecewise differentiable" unless the pieces are intervals.