Power It Up!

Prerequisites: Definition of derivative.

Goal: To conjecture a general rule for the derivative of f(x)=xn.

Today we begin by starting Maple, then copying and pasting the following code into our Maple worksheet. The color is only for your own reference; you may want to edit the purple characters, but probably not the red.

```restart: with(plots):
xMin := -4:
xMax :=  4:
yMin := -8:
yMax :=  8:
f := x -> x^2:
graph1 := plot( f(x),    x=xMin..xMax, y=yMin..yMax, color=blue):
graph2 := plot( D(f)(x), x=xMin..xMax, y=yMin..yMax, color=red):
display(graph1, graph2);```
1. After pasting this code into Maple, press <enter> (or <return>). Two graphs (one of a function and the other of its derivative) should appear on the same axes, one in blue and the other in red. Which is which?

Note: Although it is often done in mathematics, graphing the function and the derivative on the same axes is unconventional. The function takes a variable x and gives a value y, while the derivative takes a variable x and gives a value dy/dx. For example, if x, measured in seconds, represents time and y, measured in meters, represents distance, then dy/dx is measured in meters per second and represents velocity; note then that y and dy/dx have different units and cannot be compared.

2. The parts in purple are parts that we will be editing. First, try changing xMin to -3 instead of -4. What changed? Similarly, experiment with xMin, xMax, yMin, and yMax until you understand their roles.
3. What happens if we change the function to x3 (typed x^3 in Maple)? To sin(x)? to 2x? Experiment with a number of different functions.
4. Change the function back to x2, and produce the graph again. To add an extra line before the last "display..." line, place the cursor at the end of the line above it and press "shift" and "return" simultaneously. Now add the line
`graph3 := plot( 3*x, x=xMin..xMax, y=yMin..yMax, color=green):`
and edit the last line by adding "graph3" to the list of things to display. Now the code should draw a third graph, y=3x, in green. By looking at your graph, decide if y=3x is the derivative of f(x)=x2. Explain.
5. Edit the line plotting graph3 by changing the function. Attempt to discover the correct derivative of f(x)=x2 by finding a function that looks the same as the red one.
6. Repeat 5 & 6 for functions x3, x4, x5, and x6. Do you see a pattern?
7. Repeat the last question for x -1 and x½. Does your pattern still work?
8. Make a prediction about the derivative of 2x using the pattern you found in part 6, and then use Maple to test your prediction. Does your pattern still work? Why or why not?
Last Update: 2007/06/21