+ The Oktave Forum » Technical » Science and Mathematics » Optimization Theory (Moderator: sanket)
|-+ Calculus: Piecewise Function
Username:
Password:

Pages: [1]
Topic Tools  
Read August 16, 2008, 09:19:35 pm #0
sanket

Calculus: Piecewise Function

A function is said to be defined for an input if there is a corresponding output. A function is defined over a set of
inputs called its domain. Now, it may so happen sometimes that a function is defined differently for different sets of inputs. For a set of inputs the function "behaves" in one way, for another set it behaves in a different way, and so on. Such functions are called piecewise functions or piecewise-defined functions. The different pieces correspond to disjoint subsets of the domain.

For example, the absolute value function, is defined as |x| = x, if x >= 0 and |x| = -x, if x < 0.

A special class of piecewise functions that one comes across (which is relevant to optimization) is the piecewise linear function. A linear function is one whose plot is a straight line. A piecewise linear function is one in which every "piece" represents a straight line.

We can visualize this by considering some commonly occurring functions. A triangular waveform is a (periodic) piecewise linear function made up of 2 pieces. A rectangular waveform is made up of 3 pieces.
Offline  
Pages: [1]
Jump to: