INTRODUCTION TO DERIVE - Ursinus College Student, Faculty and

Math 111/112-Calculus I & II- Ursinus College
INTRODUCTION TO DERIVE - by M. Yahdi
This is a tutorial to introduce main commands of the Computer Algebra System DERIVE. You should
do (outside of class) all parts of this tutorial lab and have it with you for all the future labs. Please
check the COMMON MISTAKES (section 3) and read the section 21 on Saving your DERIVE
work from the Algebra Window; As a Microsoft WORD-FILE.
Most of the lab-work takes part outside of class, so it should come as no surprise that you cannot finish
a lab in class. You should finish this lab outside of class and let me know if you have any questions. For
future labs, you must plan at least two long meetings with your lab partners in order to finish a lab and
to write/edit the required lab-report.
Contents
1.
Starting Derive
2
2.
Entering a mathematical expression
2
3.
Common Mistakes
3
4.
Simplifying and Approximating
3
5.
Factoring
3
6.
Substituting
3
7.
Solving Equations Algebraically
3
8.
Solving Equations Numerically
4
9.
Plotting a Graph from a formula
4
10.
Plotting a Graph from a table of values
4
11.
Declaring a function
5
12.
Make list and table of values from a function
5
13.
Limits using Derive
6
14.
Derivative Using Derive
6
15.
Antiderivative of Indefinite Integral using Derive
6
16.
Definite Integral using Derive
6
17.
Including text on the Algebra Window
7
18.
Including Annotations on the Plot Window
7
19.
Printing your Work
7
20.
Saving your DERIVE work from the Algebra Window
7
21.
Saving your DERIVE work from the Plot Window
8
22.
Other buttons
8
23.
Help
8
1
2
1. Starting Derive
(1) It can be done two different ways:
• Look for the “Derive for Windows” icon : →
on the computer desktop and double click
it. An Algebra window will appear.
• The other way is to go to START/Programs/DERIVE for Windows/ → DERIVE
for Windows. An Algebra window will appear.
(2) The Algebra window is used to enter all expressions and to display the calculations.
(3) For the GRAPHS, you will need to open a Plot window: click on the graph button
—v
—
|
and the plot window will appear.
(4) To view the algebra and plot window together, choose Window/Tile Vertically from the menu.
This will split the screen into 2 windows.
2. Entering a mathematical expression
Examples: Follow the procedure below to type in all of the expressions in the Table below. Focus on
the importance of the parentheses and use the list of symbols displayed on the entry form.
(1) Select the Algebra Window (just click on).
(2) Click the picture of a pencil button (called Author): the Author Expression window, also
called Entry Form, will appear. Type the mathematical expression (from the table below),
then press the Enter key or else click OK . DERIVE will place the corresponding output in the
Algebra window. It will not perform the calculations yet!
You enter
You get
3+5
(3+5)/2
2
5
3+5/2
3+
2
xˆ2
x2
5ˆ2x
52 x
5ˆ(2x)
5(2x)
sin x
sin x
sin 3x
sin (3)x
sin(3x)
sin (3x)
asin(x)
asin(x); which means arcsin(x)
atan(x)
atan(x); which means arctan(x)
You enter
You get
asin x
asin(x) (means arcsin x)
5x2 −x
(5 xˆ2 - x)/(4xˆ3 - 7)
4x3 −7
(4+x)ˆ(1/2)
(4√+ x)1/2
√
(4+x) or sqrt(4 + x)
4+x
ê (from the list) or [Ctrl]& e
ê (for the exponential e)
ê ˆ 5
ê5
pi
π (or choose it from the list)
ln x
LN(x) (means logarithm)
abs(5+3x)
|5 + 3x|
3
3. Common Mistakes
• The standard order of operations is Exponentiation before Multiplication and Division, and then
Addition and Substraction.
• To avoid mistakes, use parentheses to be sure that the operations are performed in the desired
order. For example (3 + 5)/4 is not the same as 3 + 5/4.
• Be sure to use round parentheses rather than square brackets [ ] or curly braces {}, which have
other meanings in DERIVE.
• Be aware that the number e for the exponential function appears with a hat in DERIVE: ê. It
can be accessed from the list on the entry form or by entering [Ctrl]+e. For DERIVE, “e”
alone means just a variable like “x”.
4. Simplifying and Approximating
Examples: Read the procedure below, then apply it to the two following examples
π
√
(24 + 32)/6 and sin
4
(1) If the expression is not already in the Algebra Window, then you have to enter it like above by
Authoring the expression on entry form and clicking on OK .
(2) Highlight the expression from the Algebra Window, and click the = button (called “simplify”).
The = button is used to perform the operations or calculations of entered expressions
(3) Derive uses exact calculation. To see a decimal approximation, you click the ≈ button.
(4) The number of decimal places used can be changed to any number: choose Simlify/Approximate
from the menu and enter the number of decimals.
(5) An alternative method is to click Simplify instead of OK on the entry form. Try it for the
same examples. But by doing this you will see the answer without the original expression which
is not convenient if you want to keep track of the all operations! I recommend using the first
method for your reports to keep track of your work and to avoid typing mistakes.
5. Factoring
Example: Apply the procedure below to the expression x4 − 9x2 − 4x + 12.
(1) Choose Simplify/Factor from the menu, enter the expression and click Factor .
(2) If you want to keep track of your work I recommend that you click on OK instead of Factor ,
then click on = . Try it for the same example above.
6. Substituting
Example: To evaluate x4 − 9x2 − 4x + 12 for x = 2, x = 3 and x = 4, follow the steps below.
(1) Author the expression.
(2) Highlight it, click the SUB button and then fill in the substitution value, then click OK .
(3) Finally, to perform the calculation click on = and on ≈ if needed.
7. Solving Equations Algebraically
Examples:Apply the procedure below to each of the following examples
x2 − x − 2 = 0
and 5x2 + 14 = 3x2 + 25
4
(1) Author the equation.
(2) Highlight the equation and click the ⊂
=
⊃ button (called Solve). Then click = to perform the
factorization.
(3) An alternative method is to choose Solve/Algebraically from the menu. Try it!
8. Solving Equations Numerically
Example: Follow the steps below to solve x4 = ex
(1)
(2)
(3)
(4)
Derive cannot solve algebraically this equation (try it).
But Derive can give an approximation of the solution using numerical techniques.
To do this, choose Solve/Numerically from the menu.
Fill in the equation. (If the equation is already in the Algebra Window, just Highlight it, then
choose Solve/Numerically.)
(5) You will be asked to choose an appropriate interval that you believe contains the desired solution,
which is at the intersections of the two curves; (see next paragraph, in the meantime, try
the interval [0, 2]). You may need to repeat this to cover all possible intersections between the
two curves.
(6) Click OK , then = or ≈ if needed.
9. Plotting a Graph from a formula
Examples: Graph each of the following function: f (x) = x4 , g(x) = ex andh(x) = sin x.
(1) Author the expression x4 (without the f(x)).
(2) Then click the —v
—
| button. The plot window will be selected. Then click a second time the
—v
—
| button (note that its position is different in the plot window menu!).
(3) Do the same for the two other functions g(x) and h(x).
(4) Take a look at the set of buttons on the plot window; you will see several buttons for zooming
horizontally in →← , zooming horizontally out ↔ , zooming vertically out l , etc . . . , use them
to familiarize with.
10. Plotting a Graph from a table of values
Example:
x y
1 2.5
2 3
3 5
4 5.5
...
(1) Click the [......] button (picture of a matrix).
(2) Select the number of rows and columns.
(3) Fill in the values in the form (without x and y) and click OK .
(4) Highlight the data and click the —v
—
| button twice (note that its position changes after the
first click).
(5) You will see a set of points that you can choose to connect them with line segments (if it is not
already done) so that a graph will appear. You do this by choosing Options/Points from the
menu of the plot window, and then check Yes, then click on —v
—
| button again.
5
(6) Have a look at the Options from the menu, there are lots of other interesting features).
11. Declaring a function
Example:Apply the procedure below to the functions: f (x) = x4 , g(x) = ex andh(x) = sin x.
(1) This helps to enter a name of a function in DERIVE to avoid retyping the expression of the
function, to simplify the calculations and to improve the presentation of your work.
(2) Choose Declare/Function from the menu. A “Declare Function Definition” dialogue box will
appear.
(3) Fill in the function name on “Name and Arguments”: for example f (x).
(4) Fill in its expression on “Definition”: for example x4 .
(5) DERIVE will then show F(x) := x4 for example.
(6) REMARK that the :=sign is used to declare a function, and the =sign is used for an equation,
please do not confuse them. You can also define a function by using :=in the “Author” dialogue
box instead of the “Declare Function Definition” dialogue box; e.g., f(x):=x^4.
(7) Whenever a function is Declared on DERIVE, substituting values of x can be done directly
with the name of the function without using the formula of the function. For example, define
F(x) := x4 , then Author f (2) and click = . Repeat it for f (5.5), etc. . .
(8) Try it for the functions g(x) and h(x) above.
12. Make list and table of values from a function
This is a good technique for studying patterns in data and limits in particular.
Example1: Suppose we want to have f (x) = x2 for many values of x where x=1,2,3,4,5.(note that x
follows a specific pattern!)
(1) As a LIST of outputs only: Choose Calculus/Vector from the menu and fill in the form
starting with the function. If f (x) := x2 was previously Declared, enter f (x), otherwise you
have to enter its expression x2 .
(2) As a TABLE of inputs and outputs: The same as above with only one modification; replace f (x) (or x2 ) with [x, f (x)] (or with [x, x2 ]).
It is important to note the square brackets!. You will get a table with the first column
containing the x-values and the second column containing the f (x)-values.
(3) Example 2: Make a 2-columns table with values of x and f (x) = x2 for x = 1, 0.8, 0.6, 0.4, 0.2,
0.
(4) Example 3: Make a 2-columns table with the values of x = 0.1, 0.01, 0.001, 0.0001 in the first
columns and the corresponding values g(x) = sinx x in the second columns. Because the step size
between the values of x is not the same, the previous method is not adequate. One good method
in this case is:
• Declare the function g(x) := sinx x .
...
• Click the [......] button (picture of a matrix), select the number of rows (4) and columns (2).
• Fill in the values of x in the first column and the corresponding values g(x) in the second
column, i.e. g(0.1), g(0.01), g(0.001), g(0.0001).
• Click OK , then click = and click ≈ if needed.
6
13. Limits using Derive
Click the lim button and fill in the form.
Example: Consider the functions f (x) =
sin x
x
and g(x) =
1
x.
Calculate lim f (x), lim+ g(x) and
x→0
x→0
lim g(x).
x→0−
Notation: 0− means at the left of 0, and 0+ means at the right of 0.
14. Derivative Using Derive
On Derive, DECLARE the function f (x) := (6x − x2 ) arctan x. In this problem, you will find f 0 (2)
using several methods.
• click ∂ button, a “Calculus Differentiate Window” will open, type in the Function f (x) (without
its formula), select the Variable x and the Order 1, click OK then = .
• The result is the derivative f 0 (x)
• To find f 0 (2), highlight the derivative and click on SUB button to substitute x by 2 then click
= or ≈
• The result is the value of f 0 (2) .
15. Antiderivative of Indefinite Integral using Derive
Z
Follow the steps below to find the Indefinite integral
f (x) dx , i.e. the antiderivative of f (x),
where f (x) = 3x
R
, called calculate integral.
Click on the button with icon
Type the expression of the function (for our example, type 3x)
Select the variable (x in this case)
Choose Indefinite in the integral box down to the left.
Enter the value of the constant if it is given or just enter c.
Click on OK .
Z
3x dx will appear highlighted on the Algebra Window.
(7) The integral
(1)
(2)
(3)
(4)
(5)
(6)
(8) Click on the
=
button to get the answer.
16. Definite Integral using Derive
Z
Follow the steps below to find the Definite integral
4
f (x) dx , where f (x) = 3x
1
(1)
(2)
(3)
(4)
R
Click on the button with icon
.
Type the expression of the function (for our example, enter 3x)
Select the variable (x in this case)
Choose Definite in the integral box down to the left.
(5) Then choose the Upper Limit 4 (in our example), and the Lower Limit 1 (in our example)
7
(6) Click on
OK
Z 4
.
3x dx will appear highlighted on the Algebra Window.
(7) The integral
1
(8) Then click on the button
=
for the answer, then
≈
for an approximation.
17. Including text on the Algebra Window
To type a text on the Derive Algebra Window, you click on the picture of a pencil button and
you should start typing your sentence with a quotation mark “. Example: Type “This is the first
lab” with and without the quotation marks to see the difference.
18. Including Annotations on the Plot Window
Do the following to type a text or expression on the Plot window, for example the names or the
expressions of the functions near their corresponding graphs, the problem number, or any comment on
the graphs:
• Click the position on the plot window where you want the expression to appear. (a cross “+”
will appear at the selected position.)
• Select Edit/Create Annotation . . . from the menu (or click on the picture of a pencil
button). A form will appear.
• Type the expression and click OK
To remove this expression, select Edit/Delete Annotation . . . from the menu, a small form will
appear then click on Yes .
19. Printing your Work
Just select print from the menu. But if you do not want or cannot print it yet, you should save your
work as described below.
20. Saving your DERIVE work from the Algebra Window
• As a Microsoft WORD-FILE: This is alternative way that is more practical for typing and
presenting your lab-report. First, in the Word file, select Format/Font and set the font to be
DfW Printer, then simply “Copy” the work on the DERIVE Algebra window, and “Paste”
it on the Word file. The trick of changing the font is necessary otherwise it will not look nice.
Beside the fact that you are more familiar with Word files, this method allows you to better
present your work since you can type in easily directly on the Word file (and even between the
DERIVE Inputs) any explanations or comments, and insert any graphs from the Drive Plot
Window (see below). This method is required for your lab report.
• As a DERIVE-FILE: Select File/Save or Save As from the menu. A form will appear. Select
a location where you want it to be saved and give a name to the file. You can save it in a “Disc”,
a “shared file” or email it as an “Attachment” to you and the members of your group so you can
access the file from any other computer to finish the work later.
• How to open a saved DERIVE-FILE? A DERIVE file has a name that ends with “.mth”.
You CANNOT open it by just clicking on, you need first to open DERIVE, select File/Open. . .
from the menu, then finally select the file and click on Open .
8
21. Saving your DERIVE work from the Plot Window
• As a DERIVE-FILE: You CANNOT save the curves on the Plot Window! You should then
immediately print any work or save it as a Microsoft Word file.
• As a Microsoft WORD-FILE: Like in the previous section, this method is required for your lab
report because it saves pictures of the curves and improves the presentation of your report. Just
“Copy” the work on the Plot Window, and “Paste” it on a Microsoft Word file. You may
need to copy just a part of the Plot Window, to do that you select Edit/Mark and Copy. . . from
the menu then, using the mouse, select a part in the plot window that you want to copy.
22. Other buttons
Several buttons are on the top of the Algebra window and the Plot window as well as other features
in the menu bar. We will learn more all along the semester. I recommend that you try some of them
such as:
• In the algebra window, Remove to remove expressions, Renumber to renumber all inputs in
the algebra window, etc.
• In the plot window, see the boutons for zooming horizontally in →← , zooming horizontally out
↔ , zooming vertically out l , an others boutons such as Zoom vertical in, Zoom both in, Zoom
both out, Center on cross, Center on origin, etc.
23. Help
Select Help/Index or Help/Contents from the menu of the Derive Window. Then type a keyword
from the topis you are looking for, and/or select topic from the list.