Laboratory 1

1. Evaluate (1 + x)^{2}, (1 + x)^{10}, (1 + x)^{20}, (1 + x)^{30}, (1 + x)^{100}. Figure out what the coefficients mean.

2. Evaluate (x + y + z)^{10}, (x + y + z)^{20}. Figure out what the coefficients mean.

3. Write maple statements or expressions to compute the following:

See what happens.

(a) #this is an integer exp(I ∗ P i);

(b) #question: Are the following numbers rational or real numbers? # How does one prove this? #this is a floating point number exp(P i); evalf(exp(P i));

(c) (P i e); (P i E); evalf(P i E);

(d) evalf(P i + E);

(e) evalf(P i − E);

(f) sqrt(2) + P i; evalf("); sqrt(2) − P i; evalf(");

(g) sqrt(2) sqrt(2)

evalf(");

(h) log(5); evalf("); log10(5); evalf("); log10(E); evalf("); #what is the relation between the three answers?

(i) #calculating the digits of Pi, E and sqrt(2) #how does one compute these digits; n := 100; evalf(P i, n); evalf(E, n) evalf(sqrt(2), n); n := 1000 #can you make a guess which numbers occur more frequently in these digits. #Repeat the above calculations.

(j) sum(i, i = 1..n); #we will reset n to represent symbol n rather than the value 1000 n :=′ n′; sum(i, i = 1..n);

(k) sum(2 ∗ i + 1, i = 1..n);

(l) #generate 10 throws of dices.

die := rand(1..6); for i from 1 to 10 do print(die()); od;

(m) calculate the area of a circle of radius 2.

(n) #For these two equations, find whether they have one or no solution. #do this by plotting the equations. y = 3 ∗ x + 4 y = x + 2

#you may use ?solve to get a hint.

(o) Find a general formula for the last nonzero digit of n!.