TOPICS
Search

Piecewise Linear Function


A piecewise linear function is a function composed of some number of linear segments defined over an equal number of intervals, usually of equal size.

For example, consider the function y=x^3 over the interval [1,2]. If y(x) is approximated by a piecewise linear function over an increasing number of segments, e.g., 1, 2, 4, and 8, the accuracy of the approximation is seen to improve as the number of segments increases.

In the first case, with a single segment, if we compute the Lagrange interpolating polynomial, the equation of the linear function results.

The trapezoidal rule for numeric integration is described in a similar manner.

Piecewise linear functions are also key to some constructive derivations. The length of a "piece" is given by the

 sqrt((Deltax)^2+(Deltay)^2)=sqrt(1+((Deltay)/(Deltax))^2)Deltax,
(1)

summing the length of a number of pieces gives

 sum_(i=1)^n(sqrt(1+((Deltay_i)/(Deltax_i))^2)Deltax_i),
(2)

and taking the limit as max_(i)(Deltax_i)->0, the sum becomes

 intsqrt(1+((dy)/(dx))^2)dx,
(3)

which is simplify the usual arc length.


See also

Linear Function, Piecewise Constant Function, Piecewise Function

This entry contributed by Stuart Wilson

Explore with Wolfram|Alpha

WolframAlpha

More things to try:

Cite this as:

Wilson, Stuart. "Piecewise Linear Function." From MathWorld--A Wolfram Web Resource, created by Eric W. Weisstein. https://mathworld.wolfram.com/PiecewiseLinearFunction.html

Subject classifications