• Nem Talált Eredményt

Solving Math Problems with Maple

N/A
N/A
Protected

Academic year: 2022

Ossza meg "Solving Math Problems with Maple"

Copied!
201
0
0

Teljes szövegt

(1)

Műszaki és gazdasági szakok alapozó matematikai ismereteinek e-learning alapú tanagyag- és módszertani fejlesztése TÁMOP-4.1.2.A/1-11/1-2011-0098

Klincsik Mihály, Maróti György

Solving Math Problems with Maple

(2)

>

>

(1.1.1) (1.1.1)

1. The first meeting

Or rather rendezvous since you usually go to a date whistling, full of hope and heightened

expectations. You hope that this relationship will have a future, will be fruitful and you will have pleasant and memorable experiences. The writers of this book are sure that you have made a good decision. Maple is going to be attractive and exciting but certainly not easy. If you only want to flirt with it you had better give it up now.

This chapter aims to convey the first impressions. The tasks to be solved are not trivial but they are easy enough to achieve the target: the acquirement of Maple. While getting to know the input methods of the instructions, the basic Maple data types, the simpler call forms of several methods, you unconsciously start to gain experience of the basic properties of the generic target computer- algebra systems. The technical sheet, which is at the end of this chapter, presents how Maple displays numbers.

1.1 The roots of the polynomials

Prove that if the four real roots of a fourth degree polynomial form an arithmetical sequence, then the same is true for the roots of its derivative.

The roots are a,aCd,aC2 d,aC3 d, and enter the polynomial p as well by typing the character sequence

p:=(x-a)*(x-(a+d))*(x-(a+2*d))*(x-(a+3*d)) after the Maple prompt (>) and press Enter.

p:= xKa $ xK aCd $ xK aC2$d $ xK aC3$d p:= xKa xKaKd xKaK2 d xKaK3 d

Let’s see what has happened. As we can see, Maple is an interactive system. The communication operates by typing the command chosen – in our case the character sequence p:=x*(x-d)*

(x-2*d)*(x-3*d) after the Maple prompt. Press Enter to close the command. After this the response of the system is displayed on the screen right under the command. In this case this is the repetition of the command in the common mathematical form. Notice that Maple has removed the brackets from certain factors but much more happened in the background of which you are going to hear later.

Notice that when we were typing the command it was not always the typed characters that were displayed on the screen. Namely instead of the asterisk (*) – which is the sign of multiplication in Maple – the dot (.) was displayed. The dot is the sign of multiplication as well but only if we write the formulas by hand. Although the system requires using its syntax when entering the formulas, it tries to please us by converting this form into the common mathematical formula during display.

This behaviour may be disturbing for some users, that is, what we see on the screen is not what we are typing. At this point we can use the 1-D Math input method instead of 2-D Math that we have used so far. We have to press F5 before typing the command. Pressing F5 makes the cursor turn into a vertical line and the result of the typing is displayed in red.

(3)

>

>

>

>

>

>

(1.1.2) (1.1.2)

(1.1.3) (1.1.3)

>

>

p:=(x-a)*(x-(a+d))*(x-(a+2*d))*(x-(a+3*d));

p:= xKa xKaKd xKaK2 d xKaK3 d

This is the 1-D Math input. Notice that in the case of 1-D Math the command has to be closed with a semicolon. The advantage of this input is that the typed characters coincide with the ones

displayed on the screen. In spite of this you should use the 2-D Math input whenever it is possible.

Since its format is more similar to the common mathematical signs, it is more convenient to use during interactive work. Unfortunately, its usage is limited that is why we need to use 1-D Math sometimes.

Congratulations if you have managed to display the formulas mentioned above on your screen.

You have taken your first step towards acquiring Maple.

But probably you have mistyped at least one of the characters, like this:

p:= xKa $ xK aCd $ xK aC2$d $ xK aC3$d Error, unable to match delimiters

p:= xKa $ xK aCd $ xK aC2$d $ xK aC3$d Or like this:

p:= xKa $ xK aCd $ xK aC$d $ xK aC3$d Error, invalid product/quotient

p:= xKa $ xK aCd $ xK aC$d $ xK aC3$d

It is not a serious problem so you do not have to worry about the error messages of the system.

Sometimes – but not in all cases – these warnings are understandable and try to inform the user about the error, which sometimes succeeds. Let’s take this example. In the first case the system has problems with the pasting of the delimiters, that is, it cannot match the opening and the closing brackets. If you take a closer look at the formula you can notice that a right bracket is missing from the second factor. So the system is right. Later on it will turn out that the system is always right.

The second error message is about an invalid product/quotient. This would be really

incomprehensible if Maple did not frame the character sequence +.d in the middle of the output.

Now you can easily notice that two figures are missing between the operations + and *.

As for correction, the usual editing functionalities are available when we enter the input line, that is, with the help of the cursor control keys we can move the cursor to the left and the right. Delete and Backspace are used for deletion. More resolute readers can try the commands Copy, Cut and Paste. Note that a clipboard is also available since we are in a Windows application. Naturally you do not have to retype the wrong command after you sent it and received the error message.

You can return to the wrong line with the cursor control keys or with the mouse and correct it. It is also important to note that the cursor need not be put at the end of the command line after finishing the correction. When we press Enter, the cursor is allowed to stand anywhere in the line.

Let’s correct the wrong line and repeat the command.

p:= xKa $ xK aCd $ xK aC2$d $ xK aC3$d p:= xKa xKaKd xKaK2 d xKaK3 d

We have dealt so much with the input of the first command that we may dimly remember the original task. So far we have created the variable p the value of which is the

x xKd xK2 d xK3 d expression. We can make sure of this if we query the value of p. To do this we only have to type its name and then press Enter.

(4)

>

>

(1.1.5) (1.1.5)

(1.1.7) (1.1.7)

>

>

>

>

(1.1.6) (1.1.6) (1.1.4) (1.1.4)

>

>

>

>

p

xKa xKaKd xKaK2 d xKaK3 d

The value of p is a polynomial the roots of which form an arithmetical sequence. Concerning the task in hand, we have to show that the derivative of p inherits these properties of p. So we have to calculate the differential by x of the expression. Use the diff procedure to do this.

diff p,x

xKaKd xKaK2 d xKaK3 d C xKa xKaK2 d xKaK3 d C x Ka xKaKd xKaK3 d C xKa xKaKd xKaK2 d

The first parameter of the diff procedure is the expression which we want to differentiate. Its second parameter is the variable according to which the derivation is done. Notice that Maple knows the rules of derivation thus it has created the differential of the polynomial p.

Maybe it has escaped your attention but now you have to notice that Maple has numbered the outputs of the given commands, that is, it has labelled the outputs. These labels can be used to refer to the different formulas in the text and used in the case of Maple commands as well. To use these labels we need to open a window where we want to put the label reference. We can open the window by pressing CTRL+L

and here we can give the label of the formula to which we want to refer in the Label Value field.

Note that the input window of the labels can be opened by using the Label submenu of the Insert menu.

Let’s see an example. We get the following command by typing the solve( character

sequence. This time the cursor is on the right side of ( . After this, open the label input window by pressing CTRL+L where enter 7 into the Label Value field then press OK. It makes the system paste the label reference (5) in the location where the cursor was. In this way we get the solve(

(7) character sequence which we can complete to the solve((7)=0,x) command by typing.

solve (1.1.5)= 0,x aC 3

2 d,aC 3

2 dC 1

2 5 d,aC 3

2 dK 1

2 5 d r:=(1.1.6)

r:=aC 3

2 d,aC 3

2 dC 1

2 5 d,aC 3

2 dK 1

2 5 d

The solve procedure was used to solve the (1.1.5)= 0 equation. In the second parameter of the solve procedure, we had to give to which variable the solution is to be generated. It is not unnecessary because Maple does not know that we consider x the independent variable of the polynomial while a and d the parameters. Notice that the polynomial (5) has three real roots which the system placed in the variable r as a sequence (but separated by commas) according to the second command. We can refer to each root by their sequence indexes.

r 3 ; r 1

(5)

>

>

>

>

(1.1.11) (1.1.11) (1.1.8) (1.1.8)

(1.1.9) (1.1.9)

(1.1.12) (1.1.12)

>

>

(1.1.10) (1.1.10)

>

>

aC 3

2 dK 1

2 5 d aC 3

2 d

Type the name of the variable which contains the sequence. Indicate within square brackets which element of the sequence you want to get. Notice that the input line mentioned above includes a semicolon, which shows that more commands can be written within a line. Maple executes the commands from the left to the right as if we had given each command in a different line.

The indexing of the sequence elements does not use the common mathematical signs, which is a little bit unusual. But the 2-D Math input can help us. Type the name of the variable which contains the sequence, that is, r then press underscore ( _ ). As a result the cursor switches to subscript where we can give the number of the preferred element. By pressing Enter, Maple executes the command, that is, it displays the preferred index element of the sequence.

r2

aC 3

2 dC 1

2 5 d

How can the cursor be removed from subscript? Let’s take the example that we want the system to calculate the r2Kr1 difference. During the input of r2, we have to switch to subscript and if we do not exit we can get the following command:

r2Kr

1

aC 3

2 d,aC 3

2 dC 1

2 5 d,aC 3

2 dK 1

2 5 d

2KaK 3 2 d

This output is rather surprising. The explanation is that the element of the sequence r was asked which is indexed by 2Kr1 . The index was evaluated as 2KaK 3

2 d but since such an element

does not exist, Maple listed all the elements of the system. Then it displayed the non-existing index next to the elements, which seems right but it is meaningless for us right now.

The solution is that after typing the index during the input of the element r2, we can exit the subscript by pressing the right arrow cursor control key. When you input the next command type the following: r, _, 2, right arrow, -, r, _, 1, Enter.

r2Kr1

1

2 5 d

If we type the name of the variable which contains the sequence without an index then the system shows the whole sequence in response:

r

aC 3

2 d,aC 3

2 dC 1

2 5 d,aC 3

2 dK 1

2 5 d

These are the roots of the derivatives of polynomial p. If we take a closer look at them, we can persuade ourselves that the roots really look like an arithmetical sequence in which the first

(6)

(1.1.13) (1.1.13)

(1.1.15) (1.1.15)

>

>

(1.1.16) (1.1.16)

>

>

>

>

>

>

(1.1.14) (1.1.14) element of the sequence is r3 and its difference is `Q` 5 $d

2 . While typing the following commands, notice that when you are ready with the subscript, you have to finish the input of the index with the right arrow key and continue the typing of the other parts of the command in this way.

r3, r1,r2

aC 3

2 dK 1

2 5 d,aC 3

2 d,aC 3

2 dC 1

2 5 d r3-r1, r1-r2

K1

2 5 d,K1

2 5 d

The results are convincing. Let us present you one of our students’ creative solution who realized that numbers a, b and c form a mathematical sequence only if the product of

aQ bCc

2 bQ aCc

2 cQ aCb 2 is zero. This statement can be easily seen.

Let’s see how it works with the r sequence. But before this you cannot skip practicing the usage of the 2-D Math input. First, try the input of the bCc

2 formula. Type the following: b, +, c, / (it is SHIFT+6), 2.

bC c 2

bC 1 2 c

Notice that after pressing / the 2-D Math input generated a fraction. It looks nice but you also have to notice that you have not been waiting for this output. If you give it some thought, the procedure is right because fractions are higher priority operations than additions. The solution is that we put the sum bCc between brackets.

bCc 2

1

2 bC 1 2 c

Now it is working well. But there is a third option for the input of fractions. When using this method, start the fraction by pressing /. This displays a fraction bar and the cursor is blinking in the presently empty numerator of the fraction bar to indicate that the system is waiting for the input of the numerator. After finishing this we can move onto the input of the denominator by pressing the down arrow cursor control key. We can switch back to the input of the numerator with the up arrow cursor control key and we can exit the input of the fraction with the right arrow key. Enter, which indicates the end of the command, can be pressed at any positions of the cursor. Feel free to try it

After such a long preparation, we hope that you will succeed in entering the following command the result of which will reassure you that the elements of the r sequence really form an

arithmetical sequence.

(7)

(1.1.17) (1.1.17)

>

>

r1- r2Cr3

2 $ r2- r1Cr3

2 $ r3- r1Cr2 2

0 We have solved the task.

What have you learnt about Maple?

Maple commands have two input methods: 2-D Math and 1-D Math. You can switch between them by pressing F5.

In 2-D Math it is not mandatory to close the commands with special characters. Naturally the usage of semicolon is not forbidden. The end of the command is indicated by pressing Enter.

On the contrary, if the commands are given in 1-D Math a semicolon is needed before pressing Enter.

More commands can be given within a line. In this case each command is separated by a semicolon.

The input of the mathematical expressions in 2-D Math is to be done in the following way.

Asterisk ( * ) is the sign of multiplication but a dot (.) is displayed on the screen.

Underscore ( _ ) makes the cursor switch into subscript from which we can exit with the right arrow key.

If we do not want to put the numerator of the fraction containing more terms into extra brackets then it is useful to start the input of the fraction with a / character. In this case the numerator and the denominator can be fixed separately and we can switch between them with the down and up arrow keys. The input of the fraction is finished with the right arrow key.

The operator of the assignment is the dcharacter sequence.

The diff f,x command calculates the derivative of the expression f with respect to x.

The solve f= 0,x command solves the f= 0 equation for the unknown x.

The value of a variable can be queried by typing its name and then pressing Enter.

We can refer to the labels of the outputs by giving the value of the label in the dialogue window called by CTRL+L. Maple puts the value of the label in parentheses in the relevant position of the cursor.

You have become familiar with the data type of the Maple sequence (expression sequence) which – as regards its appearance – seems to be the sequence of Maple objects separated by commas. Certain elements of the sequence can be referred to with their sequence indexes and the whole sequence can be referred to with the name of the sequence.

1.2 The display of polynomials

(8)

>

>

(1.2.3) (1.2.3)

>

>

(1.2.1) (1.2.1)

>

>

(1.2.4) (1.2.4)

>

>

(1.2.2) (1.2.2) Consider the polynomial f=4 x4C4 x3K13 x2K7 xC8 !

a) Determine all the real roots of the f!

b) Plot the f in an interval which contains all the real roots. Try to plot a graph that looks fine!

c) Determine the equation of the tangent of the f at the x=0 point and plot the f and its tangent in the same graph!

We have met some services of the 2-D Math input. We have learnt that it is not always the typed characters that can be seen on the screen in this input mode. For example, when we press the sign of multiplication *, the system substitutes it with a dot ( . ). The difference is much more striking in the case of the input of fractions when the system converts the sequentially typed characters into a two dimensional formula.

While the sign of division ( / ) operates as a kind of control character, underscore ( _ ) is

responsible for the subscripts. But right now the aim is to input a polynomial into the system so the task is to generate the exponent. In 2-D Math, the character ^ makes the cursor switch into the superscript. If we use a Hungarian keyboard, press ALT GR+3 to get it. This procedure is annoying in itself and what is more, after pressing ALT GR+3 the character will only be

displayed if we press the subsequent character as well. This is rather awful but get used to it. We can exit superscript with the right arrow cursor control key (supposing that the cursor is blinking after the last character of the superscript).

To practice, enter the formula x4. The characters to be typed are: x, ALT GR + 3, 4 és Enter.

x4

x4

The next exercise is to enter x4Cx3. In the course of the previous command, the cursor was located in the superscript when we closed the command with Enter. Now, however, we have to exit it in order to type the second half of the formula. The characters to be typed are: x, ALT GR + 3, 4, right arrow, +, x, ALT GR + 3, 3, Enter.

x4Cx3

x4Cx3

The entering of * is cumbersome in itself if we use a keyboard without a numeric keypad. Usually we have to press ALTGR+ - to get it. That is why it is very convenient that 2-D Math accepts (SPACE) as the sign of multiplication. Let’s try it. Input the expression 4 x4 by typing the following characters: 4, SPACE, x, ALT GR + 3, 4 and Enter

4 x4

4 x4

After such a long preparation it is time for us to start the task. Enter the polynomial f!

f:= 4 x4C4 x3K13 x2K7 xC8

f:= 4 x4C4 x3K13 x2K7 xC8

If everything has gone smoothly, we can see the line above on the screen.

When we start to use the system we can easily forget the parameters of the different procedures.

Can we tell the parameters of the solve procedure mentioned in the previous chapter by heart? If

(9)

(1.2.7) (1.2.7)

>

>

(1.2.5) (1.2.5)

>

>

(1.2.6) (1.2.6)

>

>

>

>

not, the example procedure helps us with illustrations of the call of the procedure given as a parameter. The example solve command opens a new window on the screen where we can see examples of the possible calls of the solve procedure.

example solve # The command opens a new window on the screen.

Notice that by starting with the # symbol we typed a comment in the command line above. These comments can greatly help the understanding of the worksheets.

The first parameter of the solve procedure is an equation and the second parameter is the variable according to which the equation is to be solved. The examples also show that if the solve gets an f expression as its first parameter then the system considers the f=0 as the equation to be solved, that is, when we call the solve procedure, the =0 sign may be omitted.

In order to solve our task, not only the roots of the polynomial f are needed but the smallest and the largest root as well. Use the min and max procedures of Maple to get them.

solve f,x K1

4 K 1

4 29K4 17 ,K1 4 C 1

4 29K4 17 ,K1 4 K 1

4 29C4 17 ,K1 4 C 1

4 29C4 17 maximum:= max %

maximum:=K1 4 C 1

4 29C4 17 minimum:= min %%

minimum:=K1 4 K 1

4 29C4 17

The solve procedure has found four real roots out of which we probably cannot decide which is the smallest and the largest. The max procedure – for which we gave the % sign as a parameter – will come in handy. The percent sign represents the result of the previously executed instruction in Maple. In this case max chooses the largest root out of the four roots generated by solve. We gave two percentage signs (%%) to the min procedure as a parameter. Obviously, this represents the result of the operation prior to the previously executed operation. The question is: how many percentage signs can be put sequentially? Only three, that is, we can refer to the results of the previous operations like this: %, %% and %%%. There is no need to have more percentage signs because who could remember the results of the four times or even more times earlier executed commands?

So why do we need the reference of the last three executed operations when we have the labels of the outputs? It is true that when choosing the largest and the smallest elements we could have directly referred to the output (3). But labels can be disabled (in Tools menu Options) and then the percentage sign reference remains the only one available. On the other hand, it is beneficial if we can choose between the absolute reference guaranteed by the labels and the relative reference executed by the percentage signs.

We have determined the smallest and the largest real roots of the polynomial f. In accordance with the task we have to plot the polynomial in the interval the left endpoint of which is the value of the minimum variable and the right endpoint is the value of the maximum variable. The general drawing function of Maple is called plot the first parameter of which is the expression to be plotted and the second parameter is the domain on the xQaxis.

(10)

>

>

>

>

>

>

plot f,x=minimum..maximum

x K1.5K1 0.5 1

K4 K2 2 4 6 8

Are we satisfied with the displayed graph? The function itself looks fine but it is a bit awkward that the curve of the function ends in the intersection point shared with the x axis. As a solution we should give a wider interval.

plot f,x=minimum-1 ..maximumC1

x K2 K1 0 1 2

20 40 60 80 100

The middle arc of the function has shrunk. We can wonder why. Notice that while in the first graph approximately the [-4,8] interval, in the second graph the [-4,110] interval is the domain represented on the yQaxis. Maple calculates the smallest and the largest value of the function in a given domain and it scales the yQaxis based on this. Accordingly, the value of the function is too big in the minimumK1 and maximumC1 endpoints. Let’s try the following command.

plot f,x=minimum-0.4 ..maximumC0.4

x K2 K1 0 1

5 10 15 20

What a nice graph. Keep on experimenting.

Now let’s continue the solution of the task. To determine the tangent of the f we need the slope of

(11)

>

>

(1.2.10) (1.2.10)

>

>

>

>

(1.2.13) (1.2.13)

>

>

>

>

(1.2.11) (1.2.11)

(1.2.12) (1.2.12) (1.2.9) (1.2.9)

(1.2.14) (1.2.14)

>

>

>

>

(1.2.8) (1.2.8)

>

>

(1.2.15) (1.2.15)

>

>

>

>

the tangent in the (0,f 0 ) point. As we know the tangent is the value of the derivative of the f.

Therefore, we have to calculate the derivative of the f. Should we not remember how to call the diff procedure, use the example procedure!

example diff # omit the output of the command derivált:=diff f,x

derivált:= 16 x3C12 x2K26 xK7 x0d0

x0:= 0 y0deval f,x=x0

y0:= 8 gddiff f,x

g:= 16 x3C12 x2K26 xK7 mdeval g,x=x0

m:=K7 ydy0Cm$ xKx0

y:= 8K7 x

After this we have to execute the x= 0 substitution in the derivative. The subs procedure is used for this.

t:=subs x= 0,derivált

t:=K7

As the result of this command, Maple substitutes all the appearances of the variable x in the f with zero while it leaves the derivative unchanged in the variable name derivált. After this the equation of the tangent line and the desired graph can be plotted with the following commands.

y:=subs x= 0,f Ct xC0

y:= 8K7 x plot f,y ,x=minimum-0.4 ..maximumC0.4

x K2 K1 0 1

5 10 15 20

With the first command we entered the equation of the tangent line with slope t which goes through the (0,f 0 ) point. More precisely the value of the variable y is the expression that

(12)

(1.2.17) (1.2.17)

>

>

(1.2.20) (1.2.20) (1.2.19) (1.2.19)

>

>

>

>

(1.2.16) (1.2.16)

>

>

>

>

(1.2.18) (1.2.18) describes the line. We gave the two-element set f,y as the first parameter of the plot command which made plot display the two curves in one graph.

Syntactically set – which is another example of Maple data types – is the sequence of Maple objects between curly brackets. Usually in mathematics a set is the unsorted collection of its elements. The sign of an empty set is {} and the system can execute common set operations such as union, intersect and minus. Let’s take some examples!

Enter the sets H1 and H2. Note that the elements of the sets might be different objects, numbers, names and expressions. Remember that we have to type the underscore character (_) in 2-D Math to switch to subscript mode.

H1:= 1, sin x ,x2K4 ; H2d Maple,sin x H1:= 1,x2K4, sin x

H2:= Maple, sin x The following commands do not need further explanation.

H1 intersect H2

sin x H1 union H2

1,Maple,x2K4, sin x H1 minus H2

1,x2K4 H1 subset H2

false

During the 2-D Math input the aim was to make the input resemble the common mathematical signs as much as possible. This is not true for the set theoretical operations previously mentioned.

The solution is to use the palettes of the system.

Palettes are charts which contain useful characters out of which the desired character can be placed on the worksheet by clicking or with drag and drop.

Maple provides a number of palettes for the users.

These palettes can be found on the so-called docks situated on the two sides of the worksheet. Docks can be shown and hidden. Docks can be made visible with the Expand Docks command of the Palettes submenu of the View menu and can be made disappear with the Collapse Docks command.

The palettes of the docks can be opened or closed.

We can open and close them by clicking on the triangle standing in front of the name of the palette.

The Common Symbol palette, which is displayed in the figure as open, contains a lot of common

(13)

>

>

(1.2.23) (1.2.23)

>

>

>

>

(1.2.21) (1.2.21)

(1.2.22) (1.2.22)

(1.2.24) (1.2.24)

>

>

mathematical symbols.

The previous operations seem easier if we use the set theory operator signs of the Common Symbol palette. Here are the keys to be pressed at the input of the first command: H, _, 1, Rightarrow, `Click on X symbol of the palette`, H, _, 2, Enter.

H1XH2

sin x H1WH2

1,Maple,x2K4, sin x H1yH2

1,x2K4 H14H2

false

What have we learnt about Maple?

If we press ALTGR+3 during the input of the mathematical signs in 2-D Math the cursor will switch into superscript. Here we can give the exponent and exit with the right arrow key.

More precisely the right arrow key makes the cursor exit the superscript.

The formats of the inputs can be improved by using the palettes. We can find several common mathematical signs in the Common Symbols palette. These signs can be placed in the relevant cursor position of the worksheet by clicking on the sign.

The example procedure illustrates how to call the procedure which has been given as a parameter, e.g. example solve , example diff , etc.

The solve procedure accepts expressions instead of equations and in this case it solves the expression= 0 equation.

While the max procedure chooses the largest, the min procedure chooses the smallest element of the sequence given as their parameter.

The easiest call of the plot procedure is plot expression,x=a..b . In this case the system displays the curve defined by the expression in the a,b closed interval.

If we give the set of expressions to the plot procedure then the system displays the curves in a graph with different colours.

The subs procedure creates the substitution value of the expressions. The simplest way to do this is: subs variable=expression1,expression2 . It makes all the appearances of the variable in each expression2 be substituted by the value of the expression1. Notice that the substitution does not change the expression2!

(14)

Data type set is the sequence of Maple objects between curly brackets. A set is the unsorted collection of its elements. Set operations are union, intersect and minus.

The Common Symbols palette contains the common signs of the set operations.

Exercises

1. Practice the commands by typing the following input lines. Try to figure out the responses of the system in advance!

2C3

• 282

aCb $ aKb

y = a x2Cb x Cc

• f:= e

K1 x2

g := cos x2C1

x sin x

x2K1

sin x

• 4

123456787654321

• 1 2

2 3

3 4

4

• 5

s := MAPLE, tan x , 3

• 7

s := 1, 2, 3, 4

s := tan x

cos x , tan x $cos x

2. Determine the derivatives of the following functions.

xQ23 xC9

x xC1 x2C1 x3 2

sin x Ccos x Ctan x ln tan x

arctan 1Kx 1Cx

3. Find the roots of the following equations.

a x2Cb xCc= 0;

a x3Cb x2Cc xCd= 0 x4Cx3C4 x2K4 = 0 x3K2$x2K30 = 0 3 x3C2 x2CxC1 = 0

(15)

(1.3.3) (1.3.3)

>

>

>

>

(1.3.2) (1.3.2)

>

>

(1.3.1) (1.3.1) 4. Prove that if the five real roots of a fifth degree polynomial form an arithmetical sequence then the same is true for the roots of its second derivative.

5. Consider the function f x =x3K3 x2 and the fourth degree polynomial y x =x f xK1 that derives from it. Prove that the roots of the derivatives of the y form a geometric sequence.

1.3 The plotting of ratrional functions

Plot the graph of the function f= x5C8 x2K2 xK6

x5C1 . The graph should display the behaviour of the f clearly.

The task seems a little bit indefinite but soon we will understand it. It is sure that the f has to be plotted by the plot command. The second parameter of plot is the interval to be plotted. The question is that in which interval the function f should be plotted? The roots of the f should appear in the graph so we have to choose an interval which contains all the roots of the f. Let’s determine the roots.

f:= x5C8 x2K2 xK6 x5C1

f:= x5C8 x2K2 xK6 x5C1 solve f,x

RootOf _Z5C8 _Z2K2 _ZK6,index= 1 ,RootOf _Z5C8 _Z2K2 _ZK6,index= 2 , RootOf _Z5C8 _Z2K2 _ZK6,index= 3 ,RootOf _Z5C8 _Z2K2 _ZK6,index

= 4 ,RootOf _Z5C8 _Z2K2 _ZK6,index= 5

The response is that the roots of the f are the roots of its own numerator. We would have known this without the help of Maple, I guess. But there is more to this than meets the eye. The solve command has not found a closed formula for the roots of the polynomial located in the numerator.

This has been acceptable since Galois because according to the results of his theory, there are no existing closed formulas for fifth or even higher degree polynomials. Maple uses the RootOf notation for the representation of the algebraic numbers so that everything could go on smoothly.

So we have not received a closed formula for the roots of the f. But would we really need it? No, we would not because we want to determine only one interval that contains all the roots. To do this, it is enough to know the real approximation of the roots. The fsolve procedure does this.

fsolve f,x

K1.953178620

We have received the real approximation of one root as a response. Unfortunately this does not rule out the existence of more roots. While fsolve gives all the real approximations of all the roots for the polynomials, in the case of the rational functions the command only calculates the

approximate value of one solution. But fsolve can do better if we help it. If we give the interval which contains a root then fsolve can determine the real approximation of the root of that interval.

Let’s try if it gives a root and if yes what root it gives in the interval K1, 0 ]. To do this, give the x=K1 ..0 option as a third parameter to the fsolve procedure.

(16)

>

>

(1.3.6) (1.3.6)

(1.3.7) (1.3.7)

(1.3.9) (1.3.9) (1.3.8) (1.3.8)

>

>

>

>

(1.3.5) (1.3.5) (1.3.4) (1.3.4)

>

>

>

>

>

> fsolve f,x,x=K1 ..0

K0.7690029727

We have received a root in the appointed interval. Naturally, we cannot try out all the possible intervals but Maple can help us with the realroot procedure. It isolates the roots of the univariate polynomial that was given as a parameter. First, however, separate the numerator of the fraction function f with the numer f command.

n:=numer f

n:=x5C8 x2K2 xK6 realroot %

K251

128,K125

64 , K99

128 ,K49

64 , 15 16, 121

128

The output of realroot is our first encounter with the list data type of Maple. Syntactically this data type is the sequence of Maple objects between square brackets.

lista:= 12, sin 5 x , x2

ln y ,elem

lista:= 12, sin 5 x , x2

ln 8K7 x ,elem lista3, lista4; lista

x2

ln 8K7 x ,elem 12, sin 5 x , x2

ln 8K7 x ,elem

The examples illustrate that we can refer to the elements of the list just like in the case of the expression sequence. Do we remember how to switch to subscript? By pressing the underscore after the name of the list the cursor switches into subscript which we can exit with the right arrow key.

If we do not type an index after the name of the list then we get the whole list.

So, the output of realroot is a list containing three elements and each element is a two-element list.

The two-element lists determine such open intervals in which the polynomial f has exactly one root. After this we can be sure that the three real roots of the f are:

fsolve f,x,x=K2 ..K1 , fsolve f,x,x=K1 ..0 , fsolve f,x,x= 0 ..4 K1.953178620,K0.7690029727, 0.9445420160

We have typed fsolve so many times that we should have realised the importance of the instruction completion functionality of Maple. This enables the user not to type the whole name of the

procedures. It is enough if we type only the first letters of the desired procedure and press CTRL+SPACE. This makes a dropdown list appear which contains the names of those procedures which match the typed characters. We can choose from this list the usual way (e.g.

with mouse click). For example, if we press the fs characters and after CTRL+SPACE then the following list appears on the screen.

(17)

>

>

>

>

(1.3.11) (1.3.11)

>

>

(1.3.10) (1.3.10)

>

>

If we click on fsolve the system completes the fs character sequence to fsolve. It is recommended to experiment and get used to using the instruction completion functionality. Naturally in this case the best solution is the golden mean. If we give few initial characters (e.g. only one) then we might have to choose from a really long list, which can be tiring. If we type more and more characters to make the list shorter, then it might be easier to finish the name of the procedure by typing rather than choosing from a list that contains only some elements.

So far we have learnt that it is recommended that the left endpoint of the interval is a little bit smaller than the smallest root and the right endpoint is a little bit bigger than the largest root.

plot f,x=K3 ..2

x K3 K2 K1 0 1 2

K10 K5 5 10

This graph does not seem so fine. The reason for this is that the value of the f is getting bigger and bigger while getting closer to the x=K1 point from the right. Notice that the scale of the y axis finishes above 200 while in most parts of the graph the values lower than five are dominant. In this case, the option of the plot command that can be given as a third argument comes in handy.

This option determines the domain for the values of the function.

plot f,x=K3 ..2,'y'=K10 ..10

We can be surprised when we see the details of the behaviour of the function. If we look at the graph it seems if the function had an extreme in the 1, 2 interval. Examine the possible extremes of the f, that is, those x-es for which the derivative of the f is 0.

d dx f

5 x4C16 xK2 x5C1

K 5 x5C8 x2K2 xK6 x4 x5C1 2

solve (1.3.10),x

RootOf 24 _Z6K8 _Z5K35 _Z4K16 _ZC2,index= 1 ,RootOf 24 _Z6K8 _Z5 K35 _Z4K16 _ZC2,index= 2 ,RootOf 24 _Z6K8 _Z5K35 _Z4K16 _ZC2, index= 3 ,RootOf 24 _Z6K8 _Z5K35 _Z4K16 _ZC2,index= 4 ,

(18)

(1.3.16) (1.3.16) (1.3.15) (1.3.15)

>

>

(1.3.13) (1.3.13)

>

>

(1.3.14) (1.3.14) (1.3.12) (1.3.12)

>

>

>

>

>

>

RootOf 24 _Z6K8 _Z5K35 _Z4K16 _ZC2,index= 5 ,RootOf 24 _Z6K8 _Z5 K35 _Z4K16 _ZC2,index= 6

fsolve (1.3.10),x

0.1244656572 fsolve (1.3.10),x,x= 1 ..2

1.463114340 d2

dx2 f 20 x3C16

x5C1

K 10 5 x4C16 xK2 x4 x5C1 2

C 50 x5C8 x2K2 xK6 x8 x5C1 3

K 20 x5C8 x2K2 xK6 x3 x5C1 2

signum eval (1.3.14),x=(1.3.13)

K1

A brief explanation is needed here. We got the derivative of the f but then we did not succeed in specifying the roots with a closed formula. That is why we have used the fsolve procedure which has given the approximation of the root between 0 and 1. But we need the root in the 1, 2 interval which we have got by giving the x= 1 ..2 option in the call of fsolve.

Notice that the derivative was not created with the diff(f,x)command but with the usage of the d

dx f notation commonly used in calculus. This happened because we have chosen the d

dx f placeholder from the Expression palette. The same was done when calculating the second derivative. After inserting the d

dx f placeholder into the input line, the d and x were squared.

Notice that we could have got the second derivative with the diff(f,$2) call of diff as well.

The last command contains two procedures which have not been used yet. The eval procedure evaluates expressions while we can give what value we want to give to the variables of the

expression. The call of the eval (1.3.14),x=(1.3.13) procedure evaluates the expression (14), that is, the second derivative in the x=(1.3.13) point which is at the zero of the derivative of the function. Since we want to get only the sign of the value we can use the signum procedure.

According to the result, the substitution value of the second derivative is negative so our function has a maximum in point (13). In this case we can see that our graph and approach have been right.

The function f is continuous in the 1!x interval. It has a maximum in 1.463114340 so near the right side of this point it has to decrease. Since it has got no more roots it cannot decrease in such a way that it crosses the x axis. So, how does the function behave for the values (1.3.13)!x? The behaviour of the function in x!K2 is interesting as well. To see this, consider the limit value of the f in the infinity. The command below calls the procedure limit. As a first parameter, it gives the expression the limit value of which we are looking for. As the second parameter it gives the domain where we are looking for the limit value. Infinity is the notation of the infinity in Maple.

limit f,x=infinity

(19)

(1.3.16) (1.3.16)

>

>

>

>

(1.3.17) (1.3.17)

1

The previously experienced problem can arouse at this point: this notation is not similar to the common notation of the limit value. The solution is to use the Expression palette. We can find the

xlim/af expression here. We can replace the sign a with N sign from the Common Symbol palette.

x/limKN

f

1

According to this the function f approaches to the line y= 1 while the x is tending to either plus or minus infinity. This cannot be seen in the previous graph. It is recommended that the limits of the plotting interval are to be chosen for the plus and minus infinity.

plot f, x=Kinfinity..infinity, 'y'=K10 ..10

x

KN 0 N

y

Let’s summarise what we have done so far. First, we defined the interval which contains the roots of the f. This interval is a good solution for the domain in the case of polynomials while we should act more carefully in the case of rational functions. That is why we had to find the extremes and the limits of the function. Since both limits in plus and minus infinity existed, we had to define the plotting interval as x=Kinfinity..infinity.

What have we learnt about Maple?

Palettes contain not only simple symbols but expression patterns as well, e.g. n a. In this pattern n and a are the so-called placeholders. We can switch back and forth between the placeholders with CTRL+TAB and TAB. When we input the exact values of the placeholders we can use the constants or the patterns of the palettes.

Use CTRL+SPACE to activate the instruction completion functionality of Maple.

The command fsolve gives the real approximation of the roots of the functions. In the case of polynomials fsolve approximates all the roots. In any other cases it gives only one root. As an option we can give fsolve the interval to which the root is to be approximated:

fsolve f,x,x=a..b .

The numer procedure gives the numerator of the fraction or the rational function given as a parameter. The denom procedure gives the denominator.

(20)

The procedure realroot isolates the roots of the univariate polynomials. Its output is a1..b1 , ..

., [an..bn and each interval contains a root.

The diff f, x$i command gives the ith derivative of the expression f.

The limit procedure determines the limit values of the functions in the finite and the infinity. So limit f, x=a is the limit value of the f while the x is approaching to a.

In the case of the plot procedure we can give the domain of the function values as a third parameter. So the syntax of plot is: plot f,x=a..b,y=c..d .

Exercises

1. Isolate the roots of the following polynomials and find the roots in each interval.

x3K3 xK1

x3K7 x2K2 xK1 x4KxK1

x4Cx2K1

x4C4 x3K12 xC9

2. Try out the fsolve f,x,x=a..b command on such an f and in such an interval x=a..b where the f has not got a root. What is the response of the system?

3. Determine the following limits!

limx/0

sin x x

n/liminfinity

n 3 nC2

n/liminfinity

n2C1

2 nC1 K 3 n2C1 6 nC2

n/liminfinity

n n K nC1 4. What is the output of lim

x/af if the limit does not exist?

5. Plot the following functions.

f= tan x ; x=Kπ..π f= sin x

x ; x=K1 ..1 f= x2K5 xC4

x2K6 xK7

(21)

(1.4.1) (1.4.1)

>

>

(1.4.2) (1.4.2)

>

>

(1.4.4) (1.4.4)

(1.4.5) (1.4.5) (1.4.3) (1.4.3)

>

>

>

>

>

>

f= ln x2K5 xC4 x2.6 xK7 f=x sin 1

x

6. Examine the extrem values and their locations of the following functions. Plot the first and the second derivatives of the functions on one figure.

f= 2 x4K4 x3K11 x2C8 xC4 f=x5K5 x4C5 x3C7

f= e Kx2 x2

f= sin x Cx cos x 2 f=x2 eK2 x

1.4 The Representation of Numbers

Maple, as like every computer algebra-system, tries to represent the integers, rational, real and complex numbers exactly. But what does this dubious statement mean? This is what we are going to discuss in this chapter.

Let’s start with the integers.

40!

815915283247897734345611269596115894272000000000

A brief remark is needed at this point. The integer above is too big to be represented in any numeric systems in the usual way, even in double word. Indeed, Maple represents the integers in a so-called dynamic data vector, namely in a 104 based number system. And because it uses 17 bits to represent the length of the data vector, the number of the digits of the biggest number that can be represented is: 217K1. The base of the number system is 104 thus the number of the digits of the biggest number that can be represented is 4 217K1 = 524284. Don’t misunderstand it! This is not the biggest representable number. This is only the number of its digits.

Maple offers several procedures for the operations executed on the integers. It is impossible to go through all of them. Here we will confine our discussion only to some examples.

ifactor %

2 38 3 18 5 9 7 5 11 3 13 3 17 2 19 2 23 29 31 37 expand %

815915283247897734345611269596115894272000000000 nextprime % ;

815915283247897734345611269596115894272000000053 prevprime %% ;

815915283247897734345611269596115894271999999917

(22)

(1.4.8) (1.4.8) (1.4.7) (1.4.7) (1.4.6) (1.4.6)

>

>

>

>

>

>

(1.4.10) (1.4.10)

>

>

>

>

(1.4.9) (1.4.9)

>

>

The ifactor procedure creates the prime factor decomposition of the integers, which is the product of the powers of the primes. We had the appointed operations executed with the expand

procedure. Notice that we have got back the results above word for word.

The nextprime procedure determines the first prime subsequent to the integer given as a

parameter, while the prevprime procedure determines the last prime prior to the integer given as a parameter. Based on the instructions above we can come to the conclusion that 40!C53 and 40!K83 are prime numbers.

The quotient and the remainder of the division executed on the integers and the greatest common divisor of two integers can be created by the iquo, irem and igcd procedures.

iquo 40, 6 ,irem 40, 6 ,igcd 40, 6

Let’s continue our investigations with the rational numbers.

K4 18

K2 9 op %

K2, 9

Notice that Maple did not execute the division. It did not respond that the result is K0.22. Instead it simplified with the greatest common divisor of the numerator and the denominator and then it represented the result as a pair of integers in which the denominator is positive. The result of the op % command also shows this.

The op procedure shows the components of its parameter. In this case the two operands are K2 (the numerator) and 9 (the denominator). This representation is called the representation of the rational numbers in the canonical form. We want to emphasise that with this solution the system gives the exact representation of the rational number above. If the specified division had been executed then this exactness would have lost.

In the case of real numbers the situation is more difficult. Let’s see.

s:= 3

s:= 3 op s

3, 1 2 evalc K18CI

1

2 K36C10 13 C 1

2 I 36C10 13

The solutions of Maple are great because they are obvious. This is also true in this case: instead of executing the appointed operations and after carrying out some conversions, the system shows the real number with the expression that created it. In this way the representation is exact. The formulas are shown on the screen as it is usual in mathematics.

The imaginary unit I (I2=K1) gives an example of the constants built in the system. More information can be gained with the help of the help(“constant”) command. But now let’s look at

(23)

(1.4.13) (1.4.13)

>

>

(1.4.16) (1.4.16)

(1.4.12) (1.4.12)

(1.4.14) (1.4.14)

(1.4.15) (1.4.15)

>

>

>

>

(1.4.11) (1.4.11)

>

>

>

>

(1.4.18) (1.4.18)

>

>

(1.4.17) (1.4.17)

>

>

>

>

some examples.

Pi,true,false,infinity

π,true,false,N sin Pi

4

1

2 2

testeq aCb aKb =a2Kb2

true

Naturally Maple provides the approximation of the real numbers with arbitrary exactness.

s:= 2

s:= 2 evalf s, 4 ;evalf s, 40 ;evalf s

1.414

1.414213562373095048801688724209698078570 1.414213562

The evalf procedure creates the real approximation of its argument, namely with the exactness given by the second argument. In case we do not give a second parameter then the value of the Digits environment variable determines the exactness of the real approximation.

Digits

10 Digits:= 120;evalf s ;evalf Pi

Digits:= 120

1.4142135623730950488016887242096980785696718753769480731766797379907324\

7846210703885038753432764157273501384623091229702

3.1415926535897932384626433832795028841971693993751058209749445923078164\

0628620899862803482534211706798214808651328230665 Digits:= 10

Digits:= 10

The default of Digits is 10. After we set it to 120 the system gives the values of 2 and π with the exactness of 120 significant digits.

What Have You Learnt About Maple?

Maple is able to represent extremely large, approximately 500 000 digit integers. It represents exactly the rational numbers as integer pairs in which the numerator and the always positive denominator are relative primes. To represent the real and complex numbers it uses the

expressions which have generated them. Consequently, the operations executed on the numbers

(24)

represented in this way are supported by software arithmetic.

The evalf procedure provides for the approximation of real numbers, namely with the arbitrary exactness that can be set runtime. We can specify the exactness of the approximation as the second parameter of evalf. If we do not give a second parameter then it is the value of the Digits environment variable that determines the exactness of the approximation.

The evalc procedure executes the operations selected for the complex numbers and it creates the canonical form of the result, that is, the complex number.

The testeq procedure examines the equivalence of expressions and it gives a logical value (true, false) as a result.

Exercises

1. Execute the following operations.

2200 1000!

ifactor 1010 2 2 2

2 22

22 22

22

22 2

2 2 2

2. Determine the biggest primes smaller than 10, 100, 1000, 10000 and 100000.

3. Determine the greatest common divisor and the least common multiple of 54321 and 12345.

Give the ratio and the remainder when the two numbers are dividing with remainder.

4. Calculate the area and the volume of the circle and respectively the sphere with radius 2.3 cm.

Calculate the area of the square and the volume of cube with side length 3.2 cm for 24 significant digits.

5. Calculate the following expressions:

2 I K8 I

4CI C 4KI K1

1 4

1K I 3

6. Assume that a:=2. Check the following equalities with the testeq procedure.

a3K4 =a2

(25)

a3K4 =aC2 a3= sin a

a3Kb3= aKb a2Ca bCb2 tan a = sin a

cos a

2. Tasks and Solutions

We designed the worksheets of the chapter in such a way that it beautifully illustrated how Maple participated in the process of the solution of the tasks. More precisely, how it participates in the interpretation and the demonstration of the selected task and the solution.

While we are trying to understand the behaviour and the inner properties of the mathematical objects which come up as a solution, new questions keep on arising. For example, would we think about which parabolas out of the class of parabolas received as results of the task in 2.1 are upstanding and reverse parabolas if we did not start to draw the elements of the class of parabolas and found an upstanding and a reverse parabola accidentally? We are afraid that the answer is no. Especially as this was not part of the original task. The arising questions shed new light on the whole topic in many cases. And in these cases the merits of Maple are exceptional.

2.1 The Representation of a Class of Parabolas

Let’s determine the parameters a, b and c in parabola a x2Cb xCc such a way that a) the extremum of the parabola is on the y = x line and

b) the parabola goes through the point [0,1].

Before we get down to solve the task we have to do some introductory preparations. Namely, we have to calculate the critical points of the polynomial a x2Cb xCc. Of course, we could do it without Maple but it is practical to execute the following instructions, especially because it offers an opportunity for getting to know another input method of the commands, namely the usage of the context menus.

The context menu is a dropdown list which can be activated by the mouse right click. We navigate the pointer above the object on which we want to execute an operation and thus start the context menu. Its characteristic is that it offers the execution of different instructions depending on the object located under the mouse pointer.

The context menu can be launched from any parts of the worksheet: from text, from input line and even from the output of the instruction. This functionality mentioned previously gives us the opportunity to execute operations sequentially in a way that practically we do not have to type commands. We choose the operation to be executed from the context menu, or maybe we can also give the necessary parameters in the open dialogue window and the system inserts the command generated by itself subsequent to the Maple prompt.

The left column of the following table shows the command in question and its output. It gives you a guide to the usage of the context menu. The right column shows that what kind of actions are to

(26)

(2.1.5) (2.1.5)

>

>

be executed following the correctly executed steps.

Enter the parabola.

parab:=a x2Cb xCc

>

parab:=a x2Cb xCc (2.1.1) Take the pointer above the output line next to the letter c and then right click.

diff (2.1.1), x

>

2 a xCb (2.1.2)

Take the pointer above the output line, open context menu with right click and choose the Apply Command.

Enter the solve character sequence in the Applicable Command field of the appearing dialogue window then enter x in the Applicable Arguments field.

solve (2.1.2), x

>

K1 2

b

a (2.1.3)

Open the context menu again above the output line and choose the Assign to Name command. Type the szhely character sequence into the To name field.

szhely := (2.1.3)

>

szhely:=K1 2

b

a (2.1.4)

We met both diff and solve commands in the first chapter. The solve command solves the result of the previous command for x which is the derivative of the parabola. According to this, szhely contains the critical point of the parabola.

According to the second specification of the task, the value of the parabola(s) we are looking for is 1 at the point x= 0. We can give value to the variable appearing in an expression with the subs command and the system executes the simplification of the expression to the given value of the variable.

e1:=subs x= 0,parab = 1

e1:=c= 1

So we substituted zero in the place of x in the parab expression and Maple simplified the solution

(27)

(2.1.8) (2.1.8)

(2.1.9) (2.1.9)

>

>

>

>

>

>

(2.1.6) (2.1.6)

>

>

(2.1.7) (2.1.7)

>

>

>

>

to c. We made this solution equal to 1 and we gave the received equation as a value to the variable e1. Maybe at first sight the two equal signs can seem strange in the result of the command. But notice that the first equal sign is really := which is the sign of the assignment. So please understand that the value of e1 is an equality the left side of which is c and right side is 1.

The other specification of the task is that the extremum of the parabola should be on the y=x line.

Since we know that the critical point of the parabola is at the szhely, this is what we have to substitute into the variable parab in order to get the extremum of the parabola. The extremum will be on the line y=x if it is equal to the value of szhely.

e2:=subs x=szhely,parab =szhely e2:=K1 4

b2

a Cc=K1 2

b a

Notice that e1 and e2 provide two equations to the variables a,b and c. We can solve the system of equations to a and c considering b as a parameter or a free variable, if you like. Although so far we have used the solve procedure to solve equations for one unknown, it can also be used to solve the equation systems. In this case a set of equalities must be given as the first parameter and the set of those variables the solutions of which we are looking for must be given as the second parameter.

solve e1,e2 , a,c

a= 1

4 b2K 1

2 b,c= 1

We have received the solution of the system of equations in the form of a set in which two

equalities can be found: the solution to variables a and c expressed with parameter b. What do you think will be the value of the variables a and c? In other words, does the solve procedure give value to the variables to which it has solved the system of equations? The following command gives the answer:

a,c

a,c

Both variables have returned their own names. These kinds of variables are called unbounded variables. The name derives from the fact that we bounded the own value of the variable that has a value to the variable itself, thus this kind of variable is called a bounded variable. So if the

variable does not have a value then it is obviously unbounded.

The solve procedure has only generated the solution set and it has not given value to the variable.

The assign procedure, to which we can give the output of the solve procedure as the parameter, ensures this.

assign (2.1.7)

The command itself does not return an output. Its response is empty, which means its output is the NULL constant, that is, an empty sequence. However, if we ask for the value of the variables a and c, then we get the wanted solution.

a,c

1

4 b2K 1

2 b, 1

So the parabolas which we are looking for are described by the one-parameter family of curves.

parab

(28)

>

>

(2.1.11) (2.1.11)

>

>

(2.1.12) (2.1.12) (2.1.10) (2.1.10)

>

>

>

>

1

4 b2K 1

2 b x2Cb xC1

Just a side question: Why do we find it natural that Maple evaluates the variable parab to 1

4 b2K 1

2 b x2Cb xC1 when its value was a x2Cb xCc at the time of its creation? The answer is that in the meantime variables a and c got a value which Maple obviously substituted into the original formula. This is the complete evaluation process which is typical of the computer-algebra systems and of which we are going to talk about later in details.

We can consider the task is solved. But the advantages of Maple can be seen clearly at this point.

It would be good to see how the solutions of the task look like. The plot command is very expressive.

Parab:=subs b= 1,parab

Parab:=K1

4 x2CxC1

plot x,Parab ,x=K3 ..5.2,color=blue,scaling=constrained ;

x K3K2 1 2 3 4 5

K4 K1 1 3 5

The graph speaks for itself. It beautifully illustrates the parabola, the y=x line and the fact that the parabola crosses the yKaxis in the point 1 and its extremum lies really on the line. Notice that first we created the parabola in Parab which is the element belonging to the b= 1 parameter values of the group of parabolas. It is very important to notice that the variables parab and Parab are different variables. Maple is sensitive to lower case and capital letters.

The color=blue option of the plot procedure ensures the representation in blue and the option scaling=constrained ensures that the axes are scaled according to equal measure. We suggest that our readers should draw other solutions with the other values of the parameter b and with the changing of the domain.

If you took our advice and you really have experimented then we are pretty sure that a graph similar to the one below has been created.

subs b= 2.1,parab

0.052500000 x2C2.1 xC1

plot x,(2.1.12) ,x=K3 ..5.2,color=red,scaling=constrained

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

The decision on which direction to take lies entirely on the researcher, though it may be strongly influenced by the other components of the research project, such as the

In this article, I discuss the need for curriculum changes in Finnish art education and how the new national cur- riculum for visual art education has tried to respond to

This method of scoring disease intensity is most useful and reliable in dealing with: (a) diseases in which the entire plant is killed, with few plants exhibiting partial loss, as

The plastic load-bearing investigation assumes the development of rigid - ideally plastic hinges, however, the model describes the inelastic behaviour of steel structures

I examine the structure of the narratives in order to discover patterns of memory and remembering, how certain parts and characters in the narrators’ story are told and

Here, we report the rapid identi fi cation of Neisseria menin- gitidis in a cerebrospinal fl uid sample from a patient with purulent meningitis using a commercially

Keywords: folk music recordings, instrumental folk music, folklore collection, phonograph, Béla Bartók, Zoltán Kodály, László Lajtha, Gyula Ortutay, the Budapest School of

Originally based on common management information service element (CMISE), the object-oriented technology available at the time of inception in 1988, the model now demonstrates