A Piecewise Linear Function with Absolute Values

A Piecewise Linear Function with Absolute Values
Loading the math board and drawing, please wait…
2014-03-15 03:51
In collections Functions - GeoGebra Book
This applet demonstrates the graph and properties of a piecewise linear function involving absolute values, defined as f(x) = (|x - a| - |x - b| + |a - b|) / 2 + a. The function exhibits a distinctive shape: it remains constant at f(x) = a for x less than or equal to the smaller parameter, rises linearly with slope 1 between the two critical points a and b, and then levels off to a constant value for x greater than or equal to the larger parameter. This produces a smooth ramp-like transition that the Chinese title describes as a function that jumps only once. Users can dynamically adjust the parameters a and b using interactive sliders to explore how the graph changes in real time. Moving a and b along the number line shifts the location of the breakpoints and alters the height and width of the ramp segment. When a and b are far apart, the linear increasing portion stretches across a wider interval; when they approach each other, the ramp compresses into a steeper transition. If a equals b, the function collapses to a single constant value everywhere. The applet helps students understand several important mathematical concepts. First, it illustrates how absolute value expressions naturally give rise to piecewise-defined functions, with each regime determined by the sign of the expression inside the modulus. Second, it demonstrates continuity: the function is continuous at every point, including at the breakpoints a and b, where the pieces join seamlessly without any gaps. Third, it reveals the pattern of slope changes — the derivative is zero on the constant regions and equals 1 on the intermediate linear segment, with the slope changing abruptly at a and b, which serves as a concrete example of how piecewise linear functions behave at their transition points. By actively manipulating the parameters and observing the immediate graphical response, students develop an intuitive sense of how algebraic structure governs geometric behavior, strengthening their ability to analyze and sketch piecewise functions independently.

GeoGebra Commands & Parameters

  1. Vector(B, D) → u
  2. Vector(A, C) → v
  3. Point(xAxis) → P
  4. Point(xAxis) → Q
  5. Segment(B6, C6) → d
  6. Segment(B7, C7) → e
  7. Segment(B8, C8) → i
  8. Segment(B9, C9) → j
  9. Polygon(C1, C2, C3, C4) → poly1, c1, c2, c3, c4

AI Drawing Prompt Reference

Draw a piecewise linear function involving absolute values. Start by drawing points P and Q on the x-axis, then draw line segments d and e through P and Q. Next, draw points B6 and C6, B7 and C7, B8 and C8, B9 and C9, and connect them to form line segments i and j. Finally, use points C1, C2, C3, and C4 to draw a quadrilateral, showing the function remains constant for x less than or equal to the smaller parameter, increases linearly between the two critical points a and b, and then levels off for x greater than or equal to the larger parameter.
The prompt above was compiled from the original drawing commands and is for reference only.