23
$\begingroup$

Looking for something beyond a contrived textbook problem concerning jelly beans or equations that do not represent anything concrete. Not just a piecewise function for its own sake. Anyone?

$\endgroup$
7
  • 7
    $\begingroup$ I use b-splines for some image processing work. These are piecewise polynomial functions and very useful I might add! $\endgroup$
    – WimC
    Commented Jun 5, 2012 at 12:37
  • 10
    $\begingroup$ Piecewise what? Piecewise defined, piecewise linear, piecewise continuous... $\endgroup$ Commented Jun 5, 2012 at 12:37
  • 7
    $\begingroup$ And if you are going for full on real life: The marginal tax rate is piecewise linear (at least in some countries) $\endgroup$ Commented Jun 5, 2012 at 12:40
  • 4
    $\begingroup$ @SimonMarkett: I think you mean the marginal tax rate is piecewise constant, so that the amount of tax to be payed itself is a piecewise linear function of the income. What you sugfgest would make the tax amount piecewise quadratic, which would be fun (sort of) but is not common. $\endgroup$ Commented Jun 5, 2012 at 14:19
  • 4
    $\begingroup$ @MarcvanLeeuwen, yes you are right. Since I don't pay tax yet I just vaguely remembered the graph as it was shown to us back in high school and probs confused it. Luckily I am still right strictly speaking, since any constant function is linear :P $\endgroup$ Commented Jun 5, 2012 at 14:25

18 Answers 18

29
$\begingroup$

I always thought the horizontal distance from a wall to an object is a good example of a piecewise continuous function (of the height):

enter image description here

Here the various red lines show the various distances and the green line marks the point of discontinuity.

$\endgroup$
27
$\begingroup$

Computing income taxes in a bracketed system.

$\endgroup$
19
$\begingroup$

Cab fares are a piecewise constant function of distance travelled.

$\endgroup$
2
  • 2
    $\begingroup$ They charge for time, too! $\endgroup$ Commented Jun 5, 2012 at 13:05
  • $\begingroup$ Partly distance as in the answer, partly time as in a comment. Not sure but I think the instantaneous charging rate per unit distance (NB not the total charge) is actually a piecewise function of velocity. $\endgroup$
    – David
    Commented Jan 9 at 23:21
14
$\begingroup$

The classic example is friction---say for a block sitting on a rough horizontal plane and subject to a continuously increasing horizontal force. The frictional force rises steadily to match the applied force, and then it drops back a bit to a constant value when the block begins to slide.

$\endgroup$
5
  • 6
    $\begingroup$ Though this, like every example from physics, is of course just an approximation. If you measure precise and quickly enough, the drop of the frictional force is really just a fuzzy transition, governed by randomness (thermal fluctuations). $\endgroup$ Commented Jun 5, 2012 at 17:51
  • 5
    $\begingroup$ @leftroundabout: If you measure even more precisely and quickly, you will get only discrete (quantized) transitions in the output of your measuring device. $\endgroup$ Commented Jun 5, 2012 at 20:50
  • $\begingroup$ Close to absolute zero temperature / in a closed system yes, but not at the conditions where you would usually measure something like friction. Force isn't much good as a quantum-mechanical observable anyway. $\endgroup$ Commented Jun 5, 2012 at 22:46
  • $\begingroup$ Is this also called static vs dynamic friction ? $\endgroup$
    – JackOfAll
    Commented Sep 17, 2014 at 12:10
  • $\begingroup$ @JackOfAll: Yes. $\endgroup$ Commented Sep 17, 2014 at 16:36
10
$\begingroup$

Something like "buy $5$, and get each one after that at half price" say at a grocery store or clothing store. For example, let $C(x)$ be the cost of the item for the consumer and $p(x)$ be the price (assume it is constant.)

Then,

$C(x) = 5p |x\le5$ or $C(x) = 5p + (x-5)\cdot\frac{1}{2}p|x>5$

$\endgroup$
1
  • 2
    $\begingroup$ Are we assuming that the customer is not allowed to buy one item at the price $p$? $\endgroup$
    – ahorn
    Commented Apr 28, 2016 at 20:39
9
$\begingroup$

How about a monthly mobile phone plan? Your cost is constant (maybe $50/month) as long as you stay under the allotted minutes (maybe 1000/month), but then you are charged per minute after.

$\endgroup$
7
$\begingroup$

Shock waves. Properties of materials before and after phase transitions.

$\endgroup$
1
5
$\begingroup$

Any disturbed physical system. If you're dealing with circuits you'll often want to solve an equation that involves switches. E.g, letting a capacitor charge for 1 ms and then switching the connection to a closed loop where it discharges. That switch naturally gives a piecewise-defined function. Similar ideas go for physical systems involving collisions, such as a bouncing ball. They come up all the time.

$\endgroup$
5
$\begingroup$

Depth of a swimming pool as function of the distance from one end:

enter image description here

$\endgroup$
3
$\begingroup$

As Wim mentions in the comments, piecewise polynomials are used a fair bit in applications. In designing profiles and shapes for cars, airplanes, and other such devices, one usually uses pieces of Bézier or B-spline curves (or surfaces) during the modeling process, for subsequent machining. In fact, the continuity/smoothness conditions for such curves (usually continuity up to the second derivative) are important here, since during machining, an abrupt change in the curvature can cause the material for the modeling, the mill, or both, to crack (remembering that velocity and acceleration are derivatives of position with respect to time might help to understand why you want smooth curves during machining).

$\endgroup$
2
$\begingroup$

Piecewise constant functions come up all the time in the design and analysis of digital circuits (see square waves, for example). The finite element method is a very widely used technique that approximates solutions of differential equations as piecewise linear functions.

$\endgroup$
2
$\begingroup$

Postal rates (as a function of weight, in ounces):

enter image description here

Look at the price of a $1.9$ oz letter, then $1.99$ oz letter, then $2.01$ oz letter, etc.

$\endgroup$
2
$\begingroup$

The free-fall acceleration on and in the earth must be modeled piece-wise, even in the simplest model of constant density.

$\endgroup$
1
$\begingroup$

Body must be at least 30 characters.

enter image description here

$\endgroup$
0
$\begingroup$

What about the travel time to a fixed destination in a scheduled public transport system? It is a piecewise linear function of the departure time with slope $-1$.

$\endgroup$
0
$\begingroup$

Bussiness is a good example. The increase in salary shows a piecewise function.

$\endgroup$
0
$\begingroup$

I liked the rates in a parking garage as a step function or there is the wages at a job - when you include overtime you have a piecewise function of your pay as a function of the hours you worked.

$\endgroup$
0
$\begingroup$

You want to visit two shops in the High Street. You drive your car to the High Street, park it, walk to each shop and back to your car. What distance do you have to walk as a function of where you park?

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .