All Topics  
Piecewise

 

   Email Print
   Bookmark   Link






 

Piecewise



 
 
In mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, a piecewise-defined function (also called a piecewise function) is a function
Function (mathematics)

The mathematical concept of a function expresses dependence between two quantities, one of which is known and the other which is produced. A function associates a single output to each input element drawn from a fixed Set , such as the real numbers , although different inputs may have the same output....
 whose definition is dependent on the value of the independent variable
Independent variable

The terms "dependent variable" and "independent variable" are used in similar but subtly different ways in mathematics and statistics as part of the standard terminology in those subjects....
. Mathematically, a real
Real number

In mathematics, the real numbers may be described informally in several different ways. The real numbers include both rational numbers, such as 42 and −23/129, and irrational numbers, such as pi and the square root of two; or, a real number can be given by an infinite decimal representation, such as 2.4871773339...., where the digits co...
-valued function f of a real variable
Variable

A variable is a symbol that stands for a value that may vary; the term usually occurs in opposition to constant, which is a symbol for a non-varying value, i.e....
 x is a relationship whose definition is given differently on disjoint subsets of its domain
Domain (mathematics)

In mathematics, the domain of a given function is the set of "input" values for which the function is defined. For instance, the domain of cosine would be all real numbers, while the domain of the square root would be only numbers greater than or equal to 0 ....
 (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
Domain

Domain has several meanings:...
 of the function.






Discussion
Ask a question about 'Piecewise'
Start a new discussion about 'Piecewise'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, a piecewise-defined function (also called a piecewise function) is a function
Function (mathematics)

The mathematical concept of a function expresses dependence between two quantities, one of which is known and the other which is produced. A function associates a single output to each input element drawn from a fixed Set , such as the real numbers , although different inputs may have the same output....
 whose definition is dependent on the value of the independent variable
Independent variable

The terms "dependent variable" and "independent variable" are used in similar but subtly different ways in mathematics and statistics as part of the standard terminology in those subjects....
. Mathematically, a real
Real number

In mathematics, the real numbers may be described informally in several different ways. The real numbers include both rational numbers, such as 42 and −23/129, and irrational numbers, such as pi and the square root of two; or, a real number can be given by an infinite decimal representation, such as 2.4871773339...., where the digits co...
-valued function f of a real variable
Variable

A variable is a symbol that stands for a value that may vary; the term usually occurs in opposition to constant, which is a symbol for a non-varying value, i.e....
 x is a relationship whose definition is given differently on disjoint subsets of its domain
Domain (mathematics)

In mathematics, the domain of a given function is the set of "input" values for which the function is defined. For instance, the domain of cosine would be all real numbers, while the domain of the square root would be only numbers greater than or equal to 0 ....
 (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
Domain

Domain has several meanings:...
 of the function. A function is piecewise differentiable or piecewise continuously differentiable if each piece is differentiable throughout its domain. In convex analysis
Convex analysis

Convex analysis is the branch of mathematics devoted to the study of properties of convex functions and convex sets, often with applications in convex optimization, a subdomain of optimization ....
, the notion of a derivative may be replaced by that of the subderivative
Subderivative

In mathematics, the concepts of subderivative, subgradient, and subdifferential arise in convex analysis, that is, in the study of convex functions, often in connection to convex optimization....
 for piecewise functions. Although the "pieces" in a piecewise definition need not be intervals
Interval (mathematics)

In mathematics, a interval is a set of real numbers with the property that any number that lies between two numbers in the set is also included in the set....
, a function is not called "piecewise linear" or "piecewise continuous" or "piecewise differentiable" unless the pieces are intervals.

Notation and interpretation

Piecewise functions are defined using the common functional notation, where the body of the function is an array of functions and associated subdomains. For example, consider the piecewise definition of the absolute value
Absolute value

In mathematics, the absolute value of a real number is its numerical value without regard to its Negative and non-negative numbers. So, for example, 3 is the absolute value of both 3 and -3....
 function:

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

Consider the piecewise function f(x) evaluated at certain values of x:
x f(x)Function used
-3 3 -x
-0.10.1-x
0 0 x
1/2 1/2x
5 5 x


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

Continuity

Upper Semi
A piecewise function is continuous
Continuous function

In mathematics, a continuous function is a function for which, intuitively, small changes in the input result in small changes in the output. Otherwise, a function is said to be discontinuous....
 on a given interval if it is defined throughout that interval, its appropriate constituent functions are continuous on that interval, and there is no discontinuity at each endpoint of the subdomains within that interval.

The pictured function, for example, is piecewise continuous throughout its subdomains, but is not continuous on the entire domain. The pictured function contains a jump discontinuity at X"

Common examples

  • Absolute value
    Absolute value

    In mathematics, the absolute value of a real number is its numerical value without regard to its Negative and non-negative numbers. So, for example, 3 is the absolute value of both 3 and -3....
  • Heaviside step function
    Heaviside step function

    The Heaviside step function, H, also called the unit step function, is a continuous function Function whose value is 0 for negative argument and 1 for positive argument....
  • Piecewise linear function
  • Spline
    Spline (mathematics)

    In mathematics, a spline is a special Function defined piecewise by polynomials.In interpolation 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....
  • B-spline
    B-spline

    In the mathematics subfield of numerical analysis, a B-spline is a spline function that has minimal Support with respect to a given Degree of a polynomial, Smooth function, and Domain partition....