The computer program DERIVE can be used to plot data sets, fit function models to data, solve equations, simplify algebraic expressions, and perform many other useful mathemtaical tasks quickly and (almost) painlessly.
The present page presents an introduction to authoring and plotting algebraic expressions and data sets, solving equations and simplifying algebraic expressions, and fitting a selected function model to a data set.
Authoring Expressions and Solving EquationsAssuming that the icon is on the desktop, click on the DERIVE icon.
The program will load and you will see the initial DERIVE screen, labeled Algebra I at the top.
Near the bottom of the screen you will see the Enter Expression box. Click in that box or use the keyboard combination alt-A then E to Author an expression (note how the Author drop-down menu along the top of the screen is activated by alt-A).
Type in the equation 2x + 3 = 7 and use the Enter key to send this expression into the Algebra window above. The equation will appear as expression #1.
Suppose you wish to solve the equation. You could of course solve it by adding -3 to both sides then multiplying by 1/2. The result is clearly x = 2. Let DERIVE solve the equation for you. Click back in the Algebra window, on the equation you just entered, to reactivate the algebra window (if you find a way to do this using the keyboard please inform the instructor). Click on soLve or use alt-L and choose Expression, then click the Algebraically radio button then on the Solve button.
Again click on the equation, the on soLve, then Expression and click the Numerically radio button, and finally click on the Solve button. Note the difference in the solutions.
Now solve the equation (x-2)(x+3) = 0, as follows:
Solving Equations and Interpreting GraphsClick on Author (or use the keyboard), and enter the equation.
Look at the equation. Note that if x=-3, the equation is true. For what other obvious value of x is the equation true? Is it possible for any other value of x to make the equation true? Record your responses to these questions in your notebook.
Now click on soLve, Expression and click on the Solve button.. You will get two expressions separated by sort of a wide V symbol, which indicates 'or'. Note that DERIVE gives you the solutions you should have expected.
Author and solve the equation (x-2)(x+3) = 2x + 3, time selecting an Algebraic solution. The solutions will be in radical form, which doesn't tell you much about just where the numbers should lie on the graph.
Click on Simplify, then Approximate (or use the keyboard if you choose) and note that you can choose the number of digits of precision. Then click the Approximate button. You can always use this process to render an expression in approximate decimal form.
Now run through the following exercise, in which you author and solve the same equation while plotting relevant graphs and using some helpful editing options:
Highlight the equation (x-2)(x+3) = 0. Press the F3 key and notice how the equation appears in the Expression box. Using the Delete or Backspace key and either mouse or arrows, delete the '= 0' part of the equation and hit the Enter key.
Plotting the expression
Plot the expression as follows:
First open a 2-dimensional plot window by clicking on the Window menu and selecting New 2D Plot Window (remember you can always use the indicated keyboard shortcuts if you wish; that won't be mentioned again, but keyboards are inherently faster than mice so their use is encouraged).
Be sure the expression (x-2)(x+3) is highlighted in the Algebra window (click on Window and choose the Algebra window). Then return to the Plot window. You can plot the expression by clicking on Insert, Plot. Note the icon next to Plot; it should appear on your toolbar and can also be used. Click on that icon and watch the graph replot in a different color.
Note that the graph window (probably) goes from x = -4 on the left to x = 4 on the right, and from y = -4 at the bottom to y = 4 at the top.
To see more or less of the graph, or different parts of the graph, you can change the plot range of the graph. Click on Set then Plot Range. Change the range to plot from x = -10 to x = 10 and y = -5 to y = 5.
Before you click on OK, predict the graph you will obtain when the screen coordinates change, based on the graph you see. Sketch the graph in your notebook and record your prediction of where the graph will pass through the x axis.
Where does the graph pass through the x axis?
How does this compare with your prediction?
Why would you expect the graph to pass through the x axis where it does?
Do you think there are any points outside the window where the graph passes through the x axis? Why or why not?
Record your answers in your notebook.
You should see that the graph passes through the x axis at x = 2.
Why should the graph of (x-2)(x+3) pass through the x axis at x=2?
Can you see another point where the graph passes through the x axis?
Change the range once more, this time going from -20 on the left to 20 on the right, and -30 on the bottom to 30 on the top. Before you enter your changes, predict what your graph will look like. Include a sketch in your notebook.
Compare your prediction with the DERIVE graph, and document your comparison.
Make careful note of the following statement: An equation of the form [expression] = 0 , where [expression] is an algebraic expression involving one variable, will have solutions that coincide with the points where the graph of [expression] passes through the x axis. So to get an idea of where a solution is, plot [expression] and estimate where the graph passes through the x axis.
The Intersection of y = (x-2)(x+3) and 2x + 3
Now author the expression 2x + 3.
Predict the value or values of x for which this expression will be 0. Document your prediction in your notebook. Then plot the expression.
Notice that the graph retains the ranges you chose last time you were in the Plot window.
Does the graph of the new expression pass through y = 0 where you expected? Document the agreement or disagreement of the graph with your prediction.
At what x coordinates do the graphs of (x-2)(x+3) and 2x + 3 intersect? How closely do you think you can predict these coordinates from the present graph? Document your answers.
Change the ranges to x = -5 to 5, and y = -7 to 7. Again estimate the x coordinates of the intersection points. How closely can you predict the coordinates of the intersection points from this graph? How much closer is this than before? Document your estimates and answers.
Solving the equation (x-2)(x+3) = 2x + 7
You know that the above equation is a quadratic, and can be solved using the quadratic formula. You will use DERIVE to solve the equation and interpret its results.
You should now be int the Algebra window. Author the equation (x-2)(x+3) = 2x + 3.
Next solve the equation, choosing the Algebraic solution. You will get two expressions involving square root signs and fractions. If you know how to solve the equation (x-2)(x+3) = 2x + 3, you know how this notation comes from the quadratic formula. However if you are trying to locate the solutions on a graph the radicals are distraction here. So choose Simplify and Approximate the expressions.
Expanding Algebraic ExpressionsAuthor the expression (2x - 3)(4x + 1). On paper, multiply this expression out using the Distributive Law of Multiplication over Addition. Document your result.
Be sure that the expression is highlighted, then use Simplify, Expand to expand the expression. Be sure the radio button to the right is set on Rational.
Does the result agree with what you got when you multiplied the expression out?
Now author the expression (x² + 2x - 3)(3x² - 4x + 1). Don't bother multiplying it out. Just go ahead and use DERIVE to expand it. Document your impression of how much work and potential error the Expand option could save you on a complicated expression.
Plotting a Data Set and Making Predictions from the GraphAn experiment involves letting sand fall from a hole to build a pile. The bigger the pile the more it weighs. The data represents weight vs. the average dimension of the pile.
If you have done the experiment, put in your data from the sand pile experiment. If not, use the numbers given below. Put the data in as follows:
Suppose that the average dimensions of the pile are 3.2, 4.1, 5.3 and 6.1 cm, with weights of 9, 25, 42 and 79 grams. Then the first pile would be represented by the vector [3.2,9].
Don't worry yet about exactly what a vector is. Just think of it as a set of expressions between two brackets [ ] and separated by commas. The other piles would be represented by vectors [4.1,25], [5.3,42], and [6.1,79]. These vectors correspond to the points you plotted to construct the graph of weight vs. average dimension.
To enter your data, you will author a matrix consisting of the four vectors that represent the four piles. Even though you are authoring a matrix, choose Author Expression, not Author Matrix, and enter the matrixin the Expression Box as follows:
The vector will start with a bracket [, which is followed by the vector [3.2,9] which represents the first pile and then by a comma. After the comma we have the vector [4.1,25] representing the second pile followed by a comma, then the vectors [5.3,42] and [6.1,79] separated by a comma. This completes the four piles, and all we have to do is end with a bracket ] and we have constructed a vector consisting of four vectors.
Author the vector corresponding to your weight vs. average dimension data set. The vector in the previous paragraph will read [ [3.2,9], [4.1,25], [5.3,42], [6.1,79] ]. If you have done the experiment, your vector will probably look similar to this, but with different numbers and perhaps more or less than four piles represented.
Plot this vector, just as you would plot an expression. Use an appropriate set of ranges, or you might not see the points. For example, the x coordinates of the above data run from 3.2 to 6.1; an x range from 0 to 10 would contain these points with some space on either side. The y values run from 9 to 79, and increase more and more rapidly; a y range from 0 to 150 might leave enough room around the data points to see what is going on.
The graph you get will consist of four points which are more or less similar to those you might have graphed for homework.
Our goal is to predict the weight of a pile with a certain average dimension. Let us say that the average dimension of the pile is to be 16. How can we use DERIVE to predict the weight when the average dimension is 16?
Your Plot window is cluttered up with the graphs from the previous exercises. Use the Edit menu, then Delete Plot, then note the options (First, Last, Butlast). Use Butlast, which doesn't mean backwards but rather means 'all but the last'.
One way you might have predicted the weight when average dimension is 16 would have been to to sketch a curve which approximates the data points. You could then attempt to predict how the curve will continue until the average dimension finally reaches 16. If you could predict the x=16 point on the curve, you could easily see what weight is represented by the point.
Using the 'Fit' command to obtain a function modelIn DERIVE, we can try to 'fit' a given function to our data. At this point in the course, you aren't expected to know for sure what function is appropriate to this situation. However, you do know that the linear function y = mx + b has a straight-line graph, unlike the graph in front of you, while the quadratic function y = ax² + bx + c has a curved graph, more appropriate to this data set. Maybe if the numbers a, b and c are just right, this curved quadratic graph will 'fit' the data points.
You could at this point pick three points and solve a set of simultaneous equations to get your quadratic model. However, not only will DERIVE save you all that work, it will find a model that doesn't depend on just the three points you choose. In fact it will find a model which is very close to the best possible quadratic model for this data, in the sense of minimizing the average of the squared deviations from the points.
We can easily find out whether some y = ax² + bx + c curve might reasonably represent the data. Be sure you are in the Algebra window and Author the expression
FIT( [x,ax²+bx+c], #**),
where ** stands for the number of the line containing the data matrix. For example, if the data matrix is in line 19, you would author the expression FIT( [x,ax²+bx+c], #19).
Approximate this FIT(...) expression (Simplify, Approximate). Make sure the expression is highlighted first.
Take a good look at the expression you obtain. Is it a quadratic function?
Plot this approximated expression. How well does it fit the data points?
Open a window large enough to find the x = 16 point of the graph, and from the graph determine as nearly as possible what y value would correspond to x = 16 if this curve really represented the way the sandpile's weight increases as it grows.
You can also find, for example, the average dimension (x) which corresponds to a given weight (say, 55):
Author and plot the equation y = 55, and estimate the value(s) of x for which the graphs cross. This (these) will be the value(s) of x for which y is 55.
Set the quadratic expression equal to 55 (highlight the expression, choose Author, use the F3 key; then just type in the right-hand side = 55 to complete the equation).
Choose soLve to find the value(s) of x for which the equation is solved. These are the x values at which the graphs cross. (Remember to approximate the expressions if the solutions you get are not in decimal form.)
Finally, Author the expression consisting of the quadratic expression minus 55. Plot this expression and note where is passes through the x axis. What is the significance of these x values, and why should a plot of this expression go through the x axis at these values?
Repeat this exercise, except using the 'cubic' function ax^3 + bx² + cx + d instead of the quadratic ax²+bx+c. Does the curve fit the data points better, or not as well? By how much does the prediction differ from the previous prediction?
Try fitting each of the following functions to the data set:
y = a x²
y = a x^3
y = a x^4
y = a x^5
y = a x^1.5
y = a x^2.5
y = a x^3.5
y = a x^4.5
What kind of functions are these?
Remember to use the Edit, Delete command if the graph gets too cluttered. In case you have to replot your data points, remember the line number of your data vector. You can go to the line and highlight it, or you can at any time re-author the data set using the line number.