• Nem Talált Eredményt

Mathematical Induction

In document Solving Math Problems with Maple (Pldal 50-56)

What Have You Learnt About Maple?

3. Gaining Experience, Abstraction

3.2 Mathematical Induction

Let’s examine the n! and 3n number sequences. Let’s gain experience and draw up our conjecture about the behaviour of the sequences and the relation of the two sequences!

Naturally we could start by drawing the two point sequences with the plot procedure and solve the task in this way. But this is not our aim. Indeed, we would like to become familiar with the behaviour of the sequences.

Therefore, we have to gain some experience but with the least input. That’s why we use Maple.

The basic idea is that we calculate the factorial function and its three powers for little natural numbers.

restart k:= 1;k!, 3k

k:= 1 1, 3 k:= 2;k!, 3k

k:= 2 2, 9 k:= 3;k!, 3k

k:= 3 6, 27

This is the point where we lose our patience. It seems that the factorial function increases slower than the 3k and the difference between the numbers received is getting bigger. Let’s look at a bigger value, for example 10.

k:= 10; 1k!, 3k

k:= 10 1

3628800, 59049

It seems that something has gone wrong because 10!=3628800 is far more bigger than 59049.

In such cases we have to check if it happened accidentally or not. We have to keep on checking larger values until we persuade ourselves that 10! is not accidentally larger. We have to

experiment by stepping back with the cursor to the previous input line and write the value of the k and then press Enter. Unfortunately we cannot illustrate this in this book but we are sure that our readers can imagine it. This electronic notebook style operation ensures that Maple is the perfect tool for the “What happens if...” type experiments.

(3.2.6) (3.2.6)

>

>

>

>

(3.2.5) (3.2.5)

>

>

>

>

>

>

So far we have experienced that the factorial is smaller for small values and larger for larger values than the powers of 3. In this case there has to be a least value for which the factorial is larger than the same power of 3.

We can determine this with the help of Maple.

for k from 1 to 10 while (k!<=3^k) do k, k!, 3^k

od;`The least integer for which n!>3^n `= k;

1, 1, 3 2, 2, 9 3, 6, 27 4, 24, 81 5, 120, 243 6, 720, 729

The least integer for which n!O3^n = 7

The for instruction in the example contains a new element: the while condition. In this case the cycle variable runs through the 1,2 ...10 values but the run of the cycle immediately stops when the condition subsequent to the while key word becomes false. According to this, the cycle instruction above finishes when it finds the first k number which is not larger than 10 and for which the k! is larger than 3k.

Based on the previous we presume that in the case of 7<n it is 3n<n!. In this case we can also prove it with the whole induction by the n. The first step of the induction is that we calculate the two values for 7 and recognize that 5040 is definitely larger than 2187

7!, 2187

5040, 2187 And if we assume that 3n<n! then

3nC1 = 3$3n! nC1 $n!= nC1 !.

The first equality is true because of the induction conjecture and the second inequality is true because 7<n. We are ready with the induction proof.

And what did Maple have to do with the proof? The answer is: nothing. You have to come to terms with the fact that some mathematical calculations – or even more if you think about the pre-Maple era – can be done without pre-Maple.

But in the post-Maple era the representation of the two functions and the illustration of the proven mathematical solution are a piece of cake.

p:=plot seq m,m! ,m= 1 ..7 ,'x'= 1 ..7,'y'= 1 ..1000,color=red : q:=plot seq m, 3m ,m= 1 ..7 ,'x'= 1 ..7,'y'= 1 ..1000,color=blue : plotsdisplay p,q

>

>

>

>

>

>

>

>

x 1 2 3 4 5 6 7 y

100 400 700 1000

The graph beautifully illustrates that the factorial point sequence (shown in red on the screen) stays below the powers of 3 in the beginning, then it gets larger and finally takes the lead.

Let’s discuss the instructions given. The seq procedure is the most efficient Maple tool to create a sequence data type object. The seq n,n! ,n= 1 ..7

p:=plot seq m,m! ,m= 1 ..7 ,'x'= 1 ..7,'y'= 1 ..1000,color=red,style=point : q:=plot seq m, 3 m ,m= 1 ..7 ,'x'= 1 ..7,'y'= 1 ..1000,color=blue,style=point :

plotsdisplay p,q

x

1 2 3 4 5 6 7 y

100 300 500 700 1000

instructions the outputs of which we do not indicate here. In our case the omitting of the style option, which means the usage of the style=line option set as default, illustrates the relation of the two point sequences better.

The representation of the difference between the n! and 3n expressions as a function speaks volumes.

plot x!K3x,'x'= 0 ..7,'y'=K150 ..300,color=blue,title=' x!K3^x '

x

1 2 3 4 5 6 7 y

K100 0 100 200 300

x!K3x

Let’s continue with the solution of a task in which case we can lean on Maple not only during the drawing up of our conjectures but the proof as well.

>

a) Draw up our conjecture concerning the syntax of the nth derivative of the f.

b) Prove our conjecture.

Naturally at first we have no idea about the syntax of the nth derivative of the f function. Enter the function and look at the derivatives.

restart

`First derivative`d d dx f

First derivative:= 2 e

K1 x2

x3

“A professional mathematician generalizes from one case” – as my university professor used to say. Although generalizing from one case does not seem absolutely true in our case, we can still see that the e

K1 x2

function itself appears in the numerator, which is not surprising concerning the rules of the derivation. So let’s continue

d

dx `First derivative`

K6 e

`Second derivative`dnormal %

Second derivative:=K2 e

K1 x2

3 x2K2 x6

We get the second derivative with the derivation of the First derivative. This solution is less compact so we simplify it with the normal procedure.

The normal procedure is the basic simplification mechanism of Maple. It changes the rational functions to a so-called factorised normal form in which case the numerator and the denominator are relative prime whole number coefficient polynomials. In our case the procedure has done the calculation of the common denominator and it arranged the numerator.

However, let’s concentrate on the derivatives about the syntax of which we can make further observations. The f function is still present in the numerator but in this case it is multiplied with a polynomial. The denominator for the second derivative is the 6th power of the x. Since the x3

(3.2.15)

appeared in the first derivative it would be good that the numerator be the 9th power of the x in the third derivative

`Third derivative`dnormal d3 dx3 f Third derivative:= 4 e

K1 x2

6 x4K9 x2C2 x9

`Fourth derivative`=normal d4 dx4 f Fourth derivative=K4 e

K1 x2

30 x6K75 x4C36 x2K4 x12

We also indicated the fourth derivative besides the third.

The numerator seems right: we expect the denominator of the nth derivative to be x3n. The f function in the numerator also seems fine. But we have also found a polynomial the degree of which is 2(n-1).

Therefore, our conjecture is the following: the syntax of the nth derivative of the function f is Dn:= f $poli x

in which case poli(x) is the 2(n-1) degree polynomial of the x at best. We can prove this with the whole induction by the n.

eval Dn,n= 1 K`First derivative`

e

You can see that if we choose the poli(x)=2 for the First derivative then it coincides with our statement. Because in this case the (14) difference is identically zero.

Assume that the Dn is the nth derivative of the f function. We have to show that the derivative of the Dn is a fraction function in the numerator of which

e

Q1

x2 is multiplied with a 2nd degree polynomial at best and its denominator is the (3 nC3)rd degree power of the x. Let’s create the derivative of the Dn.

(3.2.17) the numerator as a multiplier factor is also true. We only have to accept that the expression with brackets in the numerator is the 2nth degree polynomial of the x at best. And this can be proven because according to the induction conjecture the degree of poli(x) is 2n-2 at best, thus the degree of 3 n x2 poli x fis 2n at best.

The derivative of the poli(x) is 2.n-3 degree at best thus its x3 fold must be 2.n degree at best. We have finished the proof.

It is worth considering the polynomial appearing in the (17) numerator. The expression K2 poli x K d

dx poli x x3C3 poli x n x2

exactly describes how we can get the polynomial belonging to the (n+1) derivative from the polynomial belonging to the nth derivative. Since the first polynomial is 2 we can easily make a cycle which creates these polynomials for an arbitrary n.

m:=5:

Notice that the giving of the start value was omitted in the for instruction. In this case the system considers 1 as start value as default.

The expand procedure executes the operations appointed on the expressions. More precisely, in the case of the product of the sums it executes the multiplications selected then it contracts the identical elements in the result. Since the polynomial created is in disorder by the powers of the x, we applied the sort procedure to get a better-looking output. The sort procedure sorts the

polynomial descending by the powers of the x.

(3.2.22) (3.2.22)

>

>

>

>

(3.2.19) (3.2.19)

(3.2.20) (3.2.20)

(3.2.21) (3.2.21)

>

>

>

>

If we take a closer look at the polynomials we can declare two facts. First, the degree of the polynomial belonging to the nth derivative is 2n-2 and its highest degree term is

Q1nC1 nC1 ! x2 nQ2 .

Secondly, the free term of the polynomial belonging to the nth derivative is 2n. In the case of n=1 it is really 2.1=2 and this is the free term of the polynomial 2. Moreover, the

Q11C1 1C1 ! x2 $1Q2 = 2,

which is the highest degree (zero degree) term of the 2 constant polynomial. If we assume that our statements are true for the n then if we examine the polynomial belonging to the nC1 st

derivative

p:=expand poli x 2K3 n x2 C d

dx poli x x3

p:= d

dx poli x x3K3 poli x n x2C2 poli x

we can see that the its free term must be the free term of the 2poli(x) because x2 and x3 appear in the other sub-expression as multiplier factors. According to the induction conjecture, the free term of the poli(x) is 2n thus the free term of 2poli(x) is 2(n+1).

The same thoughts can be true in the case of the highest degree term. According to the induction conjecture, the highest degree term of the poli(x) is

t:= K1 nC1 nC1 ! x 2 nK2

t:= K1 nC1 nC1 ! x2 nK2

We can easily accept the fact that the highest degree term of the polynomial p is the following expression.

K3 n x2 tC d

dx t x3

K3 n x2 K1 nC1 nC1 ! x2 nK2C K1 nC1 nC1 ! x2 nK2 2 nK2 x2 factor %

K K1 nC1 nC1 ! x2 nK2 x2 nC2

And this is what we have been looking for because we can see that this expression is equivalent to the K1 nC2 $ nC2 !$x 2$ nC1 K2 expression

The factor procedure does the factorisation of polynomials with one or more variables and it did the same in our case as well. It converted the two-term sum into a product

In document Solving Math Problems with Maple (Pldal 50-56)