<P> In mathematics, a piecewise - defined function (also called a piecewise function or a hybrid function) is a function defined by multiple sub-functions, each sub-function applying to a certain interval of the main function's domain, a sub-domain . Piecewise is actually a way of expressing the function, rather than a characteristic of the function itself, but with additional qualification, it can describe the nature of the function . For example, a piecewise polynomial function is a function that is a polynomial on each of its sub-domains, but possibly a different one on each . </P> <P> The word piecewise is also used to describe any property of a piecewise - defined function that holds for each piece but not necessarily hold for the whole domain of the function . A function is piecewise differentiable or piecewise continuously differentiable if each piece is differentiable throughout its subdomain, even though the whole function may not be differentiable at the points between the pieces . 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 . </P> <P> Piecewise functions are defined using the common functional notation, where the body of the function is an array of functions and associated subdomains . Crucially, in most settings, there must only be a finite number of subdomains, each of which must be an interval, in order for the overall function to be called "piecewise". For example, consider the piecewise definition of the absolute value function: </P> <Dl> <Dd> x = (− x, if x <0 x, if x ≥ 0 (\ displaystyle x = (\ begin (cases) - x, & (\ mbox (if)) x <0 \ \ x, & (\ mbox (if)) x \ geq 0 \ end (cases))) </Dd> </Dl>

When do you consider a function a piecewise function