Piecewise

Last updated
Plot of the piecewise linear function
f
(
x
)
=
{
-
3
-
x
if
x
<=
-
3
x
+
3
if
-
3
<=
x
<=
0
3
-
2
x
if
0
<=
x
<=
3
0.5
x
-
4.5
if
3
<=
x
{\displaystyle f(x)=\left\{{\begin{array}{lll}-3-x&{\text{if}}&x\leq -3\\x+3&{\text{if}}&-3\leq x\leq 0\\3-2x&{\text{if}}&0\leq x\leq 3\\0.5x-4.5&{\text{if}}&3\leq x\\\end{array}}\right.} Piecewise linear function gnuplot.svg
Plot of the piecewise linear function

In mathematics, a piecewise-defined function (also called a piecewise function, a hybrid function, or definition by cases) is a function whose domain is partitioned into several intervals ("subdomains") on which the function may be defined differently. [1] [2] [3] Piecewise definition is actually a way of specifying the function, rather than a characteristic of the resulting function itself.

Contents

A function property holds piecewise for a function, if the function can be piecewise defined in a way that the property holds for every subdomain. Examples of functions with such piecewise properties are piecewise constant functions, piecewise linear functions (see the figure), piecewise continuous functions, and piecewise differentiable functions.

Notation and interpretation

Graph of the absolute value function,
y
=
|
x
|
{\displaystyle y=|x|} Absolute value.svg
Graph of the absolute value function,

Piecewise functions can be defined using the common functional notation, where the body of the function is an array of functions and associated subdomains. These subdomains together must cover the whole domain; often it is also required that they are pairwise disjoint, i.e. form a partition of the domain. [4] In order for the overall function to be called "piecewise", the subdomains are usually required to be intervals (some may be degenerated intervals, i.e. single points or unbounded intervals). For bounded intervals, the number of subdomains is required to be finite, for unbounded intervals it is often only required to be locally finite. For example, consider the piecewise definition of the absolute value function: [2]

For all values of less than zero, the first sub-function () is used, which negates the sign of the input value, making negative numbers positive. For all values of greater than or equal to zero, the second sub-function () is used, which evaluates trivially to the input value itself.

The following table documents the absolute value function at certain values of :

xf(x)Sub-function used
−33
−0.10.1
00
1/21/2
55

In order to evaluate a piecewise-defined function at a given input value, the appropriate subdomain needs to be chosen in order to select the correct sub-function—and produce the correct output value.

Examples

Continuity and differentiability of piecewise-defined functions

Plot of the piecewise-quadratic function
f
(
x
)
=
{
x
2
if
x
<
0.707
1.5
-
(
x
-
1.414
)
2
if
0.707
<=
x
{\displaystyle f(x)=\left\{{\begin{array}{lll}x^{2}&{\text{if}}&x<0.707\\1.5-(x-1.414)^{2}&{\text{if}}&0.707\leq x\\\end{array}}\right.}
Its only discontinuity is at
x
0
=
0.707
{\displaystyle x_{0}=0.707}
. Upper semi.svg
Plot of the piecewise-quadratic function Its only discontinuity is at .

A piecewise-defined function is continuous on a given interval in its domain if the following conditions are met:

The pictured function, for example, is piecewise-continuous throughout its subdomains, but is not continuous on the entire domain, as it contains a jump discontinuity at . The filled circle indicates that the value of the right sub-function is used in this position.

For a piecewise-defined function to be differentiable on a given interval in its domain, the following conditions have to fulfilled in addition to those for continuity above:

Applications

In applied mathematical analysis, "piecewise-regular" functions have been found to be consistent with many models of the human visual system, where images are perceived at a first stage as consisting of smooth regions separated by edges. [5] In particular, shearlets have been used as a representation system to provide sparse approximations of this model class in 2D and 3D.

Piecewise defined functions are also commonly used for interpolation, such as in nearest-neighbor interpolation.

See also

Related Research Articles

<span class="mw-page-title-main">Antiderivative</span> Concept in calculus

In calculus, an antiderivative, inverse derivative, primitive function, primitive integral or indefinite integral of a function f is a differentiable function F whose derivative is equal to the original function f. This can be stated symbolically as F' = f. The process of solving for antiderivatives is called antidifferentiation, and its opposite operation is called differentiation, which is the process of finding a derivative. Antiderivatives are often denoted by capital Roman letters such as F and G.

In mathematics, a continuous function is a function such that a small variation of the argument induces a small variation of the value of the function. This implies there are no abrupt changes in value, known as discontinuities. More precisely, a function is continuous if arbitrarily small changes in its value can be assured by restricting to sufficiently small changes of its argument. A discontinuous function is a function that is not continuous. Until the 19th century, mathematicians largely relied on intuitive notions of continuity and considered only continuous functions. The epsilon–delta definition of a limit was introduced to formalize the definition of continuity.

<span class="mw-page-title-main">Integral</span> Operation in mathematical calculus

In mathematics, an integral is the continuous analog of a sum, which is used to calculate areas, volumes, and their generalizations. Integration, the process of computing an integral, is one of the two fundamental operations of calculus, the other being differentiation. Integration was initially used to solve problems in mathematics and physics, such as finding the area under a curve, or determining displacement from velocity. Usage of integration expanded to a wide variety of scientific fields thereafter.

<span class="mw-page-title-main">B-spline</span> Spline function

In the mathematical subfield of numerical analysis, a B-spline or basis spline is a spline function that has minimal support with respect to a given degree, smoothness, and domain partition. Any spline function of given degree can be expressed as a linear combination of B-splines of that degree. Cardinal B-splines have knots that are equidistant from each other. B-splines can be used for curve-fitting and numerical differentiation of experimental data.

<span class="mw-page-title-main">Quantile</span> Statistical method of dividing data into equal-sized intervals for analysis

In statistics and probability, quantiles are cut points dividing the range of a probability distribution into continuous intervals with equal probabilities, or dividing the observations in a sample in the same way. There is one fewer quantile than the number of groups created. Common quantiles have special names, such as quartiles, deciles, and percentiles. The groups created are termed halves, thirds, quarters, etc., though sometimes the terms for the quantile are used for the groups created, rather than for the cut points.

<span class="mw-page-title-main">Riemann integral</span> Basic integral in elementary calculus

In the branch of mathematics known as real analysis, the Riemann integral, created by Bernhard Riemann, was the first rigorous definition of the integral of a function on an interval. It was presented to the faculty at the University of Göttingen in 1854, but not published in a journal until 1868. For many functions and practical applications, the Riemann integral can be evaluated by the fundamental theorem of calculus or approximated by numerical integration, or simulated using Monte Carlo integration.

<span class="mw-page-title-main">Lipschitz continuity</span> Strong form of uniform continuity

In mathematical analysis, Lipschitz continuity, named after German mathematician Rudolf Lipschitz, is a strong form of uniform continuity for functions. Intuitively, a Lipschitz continuous function is limited in how fast it can change: there exists a real number such that, for every pair of points on the graph of this function, the absolute value of the slope of the line connecting them is not greater than this real number; the smallest such bound is called the Lipschitz constant of the function. For instance, every function that is defined on an interval and has a bounded first derivative is Lipschitz continuous.

<span class="mw-page-title-main">Linear interpolation</span> Method of curve fitting to construct new data points within the range of known data points

In mathematics, linear interpolation is a method of curve fitting using linear polynomials to construct new data points within the range of a discrete set of known data points.

<span class="mw-page-title-main">Maximum and minimum</span> Largest and smallest value taken by a function takes at a given point

In mathematical analysis, the maximum and minimum of a function are, respectively, the largest and smallest value taken by the function. Known generically as extremum, they may be defined either within a given range or on the entire domain of a function. Pierre de Fermat was one of the first mathematicians to propose a general technique, adequality, for finding the maxima and minima of functions.

<span class="mw-page-title-main">Non-uniform rational B-spline</span> Method of representing curves and surfaces in computer graphics

Non-uniform rational basis spline (NURBS) is a mathematical model using basis splines (B-splines) that is commonly used in computer graphics for representing curves and surfaces. It offers great flexibility and precision for handling both analytic and modeled shapes. It is a type of curve modeling, as opposed to polygonal modeling or digital sculpting. NURBS curves are commonly used in computer-aided design (CAD), manufacturing (CAM), and engineering (CAE). They are part of numerous industry-wide standards, such as IGES, STEP, ACIS, and PHIGS. Tools for creating and editing NURBS surfaces are found in various 3D graphics, rendering, and animation software packages.

<span class="mw-page-title-main">Improper integral</span> Concept in mathematical analysis

In mathematical analysis, an improper integral is an extension of the notion of a definite integral to cases that violate the usual assumptions for that kind of integral. In the context of Riemann integrals, this typically involves unboundedness, either of the set over which the integral is taken or of the integrand, or both. It may also involve bounded but not closed sets or bounded but not continuous functions. While an improper integral is typically written symbolically just like a standard definite integral, it actually represents a limit of a definite integral or a sum of such limits; thus improper integrals are said to converge or diverge. If a regular definite integral is worked out as if it is improper, the same answer will result.

In mathematics, a piecewise linear or segmented function is a real-valued function of a real variable, whose graph is composed of straight-line segments.

<span class="mw-page-title-main">Spline (mathematics)</span> Mathematical function defined piecewise by polynomials

In mathematics, a spline is a function defined piecewise by polynomials. In interpolating problems, spline interpolation is often preferred to polynomial interpolation because it yields similar results, even when using low degree polynomials, while avoiding Runge's phenomenon for higher degrees.

<span class="mw-page-title-main">Smoothness</span> Number of derivatives of a function (mathematics)

In mathematical analysis, the smoothness of a function is a property measured by the number, called differentiability class, of continuous derivatives it has over its domain.

In mathematics, more specifically functional analysis and operator theory, the notion of unbounded operator provides an abstract framework for dealing with differential operators, unbounded observables in quantum mechanics, and other cases.

<span class="mw-page-title-main">Triangular function</span> Tent function, often used in signal processing

A triangular function is a function whose graph takes the shape of a triangle. Often this is an isosceles triangle of height 1 and base 2 in which case it is referred to as the triangular function. Triangular functions are useful in signal processing and communication systems engineering as representations of idealized signals, and the triangular function specifically as an integral transform kernel function from which more realistic signals can be derived, for example in kernel density estimation. It also has applications in pulse-code modulation as a pulse shape for transmitting digital signals and as a matched filter for receiving the signals. It is also used to define the triangular window sometimes called the Bartlett window.

In mathematics – specifically, in operator theory – a densely defined operator or partially defined operator is a type of partially defined function. In a topological sense, it is a linear operator that is defined "almost everywhere". Densely defined operators often arise in functional analysis as operations that one would like to apply to a larger class of objects than those for which they a priori "make sense".

<span class="mw-page-title-main">Finite element method</span> Numerical method for solving physical or engineering problems

The finite element method (FEM) is a popular method for numerically solving differential equations arising in engineering and mathematical modeling. Typical problem areas of interest include the traditional fields of structural analysis, heat transfer, fluid flow, mass transport, and electromagnetic potential.

Most of the terms listed in Wikipedia glossaries are already defined and explained within Wikipedia itself. However, glossaries like this one are useful for looking up, comparing and reviewing large numbers of terms together. You can help enhance this page by adding new terms or writing definitions for existing ones.

References

  1. "Piecewise Functions". www.mathsisfun.com. Retrieved 2020-08-24.
  2. 1 2 3 4 Weisstein, Eric W. "Piecewise Function". mathworld.wolfram.com. Retrieved 2020-08-24.
  3. "Piecewise functions". brilliant.org. Retrieved 2020-09-29.
  4. A feasible weaker requirement is that all definitions agree on intersecting subdomains.
  5. Kutyniok, Gitta; Labate, Demetrio (2012). "Introduction to shearlets" (PDF). Shearlets. Birkhäuser: 1–38. Here: p.8