Mathematics with Maple
S.Duzhin
Solutions to Exercises of Lesson 1
Exercise 2:
Which of the two numbers is bugger: 1000! or 2^8000?
Solution: compute
> 1000!-2^8000;
or
> 1000!/2^8000;
I have received several correct solutions of this problem.
Exercise 3:
Find all roots of the equation log[1/16](x)=(1/16)^x.
Draw the graphs of these two functions.
In the students' works, only ONE root was found: x=1/4=0.25.
However, the equation has 3 roots: 0.25, 0.36... and 0.5.
You can see them clearly in this graph:
> plot(log[1/16](x) - (1/16)^x,x=0.2..0.6);
You will find a detailed discussion of this problem in Lesson 3.
Exercise 4:
Find an integer number which is not prime but which cannot be factorized by Maple in 1 minute.
Solution.
Note that if a number is big, but all its prime factors are small, then ifactor works very fast. An example:
> 100!;
> ifactor(%);
The idea of solution is to consider the product of two large prime numbers.
To find two large prime numbers, you can issue the command ifactor(n) several times for arbitrary big numbers n and watch the result. When you see a big number (15 or 20 digits), you assign it to a certain variable to remember it.
Here is how I did that (I used numbers 2^n+1, but you could use any other big numbers):
> ifactor(3^41+1);
To access the second element of this list, we use the command op:
> a:=op(2,%);
To get rid of the parentheses, use this command:
> a:=op(%);
This is big enough, so we remember it.
Let us find one more:
> ifactor(3^43+1);
> b:=op(2,%);
> b:=op(%);
> c:=a*b;
> ifactor(c);
This took 32 seconds on my computer (Pentium III-500 running Linux). Not bad!