Math Insight

Applet: The derivative of a piecewise linear function

The blue line segments are the graph of a function $f(x)$ that is linear along each of a bunch of small intervals in $x$. You can change $f$ by dragging the blue points, which move the ends of line segments up and down. You can also drag the red points to move a line segment up and down without changing its slope. The derivative $f'(x)$ of the function $f(x)$ is shown by the green horizontal line segments. The derivative $f'(x)$ indicates the slope of the function $f(x)$. Since, along each small interval of $x$, the function $f(x)$ has the same slope, the derivative $f'(x)$ is constant along each of those intervals. If two adjacent line segments of $f(x)$ have two different slopes, then the derivative $f'(x)$ jumps to a new value at the point between the corresponding intervals in $x$. To test your ability to estimate the derivative from the function, you can uncheck the “show derivative” checkbox and attempt to sketch what you think the derivative is. Alternatively, you can uncheck the “show function” checkbox to test your ability to sketch the function from its derivative.

Applet file: derivative_piecewise_linear.ggb

Applet links

This applet is found in the pages

List of all applets

General information about Geogebra Web applets

This applet was created using Geogebra. In most Geogebra applets, you can move objects by dragging them with the mouse. In some, you can enter values with the keyboard. To reset the applet to its original view, click the icon in the upper right hand corner.

You can download the applet onto your own computer so you can use it outside this web page or even modify it to improve it. You simply need to download the above applet file and download the Geogebra program onto your own computer.