This is a collection of examples suitable for in-class demonstration and/or individual student exploration.
The examples are built into a Java applet from the Java Components for Mathematics collection. A picture of the applet grapher is shown below.
To access the built-in example functions, use the pull-down menu in the applet to select the appropriate example.
In this demo, the focus is on constructing differentiable piecewise functions. Thus the object is to move the appropriate sliders to
as shown in the next picture.
The functionality of the applet allows for user input of piecewise functions that can have as many as 6 parameters. The syntax for entering piecewise functions is illustrated using the following examples.
would be entered as
would be entered as
(x<-2)?3*x+2:(-2<=x AND x < 1)?2*x^2-x+1:(x>=1)?x-1.
In this applet, the function and its derivative are plotted on the same graph. Enter the function as f1(x) and its derivative as f2(x). The applet does not actually compute the derivative.
Note that axis limits can be adjusted as necessary.
Endpoints are not displayed by the Java applet so it is important to discuss endpoint inclusion/exclusion as appropriate as well as behavior at the break points in the domain.
The syntax for entering functions is quite cumbersome and may be confusing for students. Use with caution and ample explanation if you choose to use the applet for individual student work. If you have Excel available, the Excel spreadsheet is much more user-friendly for individual student work.
If you provide the applet for student assignments/experimentation, please point out what the appropriate parameters are for the particular example. These can be observed from the function coding, however, they are also noted in the table below. If a parameter is NOT relevant in a particular example, the slider will have no effect.
The built-in functions are given below. The correct values of the parameters are whole number multiples of -0.25 or 0.25 except in the cases that the parameters can have any value (e.g. Example 10).