Back To GSP Files Page

Using Sketchpad to Graph a Function with a Restricted Domain

At some point in one's use of Sketchpad, it may become desirable to graph a function on a restricted domain that is easily adjusted or parametrically determined by other quantities in the sketch. This may be for mathematical correctness or for clarity and simplicity of the sketch. Sketchpad does allow you to edit several properties of a plotted function, including its domain, but that is done in the menus and therefore cannot respond to a parameter in the sketch.



Construct a graph of f(x) on a restricted domain that is an open interval (a,b). We can do this by making the function:

g(x)=f(x)*(sqrt(x-xa)/sqrt(x-xa))*(sqrt(xb-x)/sqrt(xb-x))

Now the function g(x) contains two factors which make it equal to f(x) inside the interval (a,b) and undefined outside that interval. We plot the function g(x).

As it is written here, a < b will work and b < a will produce no graph. The use of a maximum/minimum function could make this more versatile if need be. Arrow-heads are not included, although they could be constructed at (a , f(a)) and (b , f(b)) and given slopes of f'(a) and f'(b), respectively. Recall that f(x) is probably useful outside of the graphed domain, but the values for g(a) and g(b) are undefined.



This could be implemented in a transformation sketch to show dilation, which could reduce a common misunderstanding that a vertical 'stretch' is equivalent to a horizontal 'squeeze'. Students see that on any given graph window, a parabola whose height is doubled gets narrower. This is an misleading appearance which may be avoided if we consider a restricted domain.

keywords: gsp, geometer's sketchpad, restricted domain, plot graphs in gsp, function plot, function on an open interval, gsp tricks, wily mathematical goings on

Back To GSP Files Page