Possible solutions to the first homework assignment
First, here is a complete solution to the first meeting's homework
problems. A version of what I hoped students would hand in follows,
accompanied by a discussion of the Maple
commands.
> nextprime(5555555555); 5555555557 > ifactor(5555555557); (5555555557) > degree(((1+2*x^2)^5-3*y^3)^(10)); 100 > coeff(coeff(((1+2*x^2)^5-3*y^3)^(10),x^(18)),y^(15)); -64053051955200The nextprime instruction asks for (reasonably enough!) the first prime after its argument. If you believe in nextprime, that answer alone is enough. You can find this function by exploring with the help command. The ifactor is a further verification. I decided that I would "check" using the instruction ifactor which asks for integer factorization, and the result indicated this was prime. I typed 5555555555 for fun. There are lots and lots of ten digit primes. The command ifactor should have been found by students during work in the first class. By the way, finding a prime by testing random 10 digit long strings will likely be successful with after only a few attempts (this is good, because internet security usually depends on similar guesses!).
degree gives the total degree (in all variables) of a polynomial. The command coeff(coeff(((1+2*x^2)^5-3*y^3)^(10),x^(18)),y^(15)); "nests" two coeff commands. You can learn about these commands by looking at help for degree and coeff.
Typographical hints (using different fonts) were given for these commands in the assignment sheet.
Student task in class in the second meeting
Here is a complete solution to the problem that students were asked to
solve in class on Monday, September 15: discover and verify a formula
for the sum of the first n squares:
1^{2}+2^{2}+3^{2}+...n^{2}. The
discussion which follows tries to explain each step. I hope this is
helpful in solving your homework problem.
> v:=n->add(j^2,j=1..n); 2 v := n -> add(j , j = 1 .. n) > v(4);1+4+9+16; 30 30 > w:=n->add(C[j]*n^j,j=0..3); j w := n -> add(C[j] n , j = 0 .. 3) > coefficients:=solve({seq(v(j)=w(j),j=1..4)}); coefficients:={C[0]=0,C[1]=1/6,C[2]=1/2,C[3]=1/3} > w1:=n->subs(coefficients,w(n)); w1:=n->subs(coefficients, w(n)) > w1(n); 2 3 1/6 n + 1/2 n + 1/3 n > w1(n+1)–w1(n)–(n+1)^2; 2 3 2 3 (n + 1) (n + 1) n n 1/6 – -------- + -------- – ---- - ---- 2 3 2 3 > expand(%); 0Comments
The result
We have checked that
2 2 2 2 2 3 1 +2 +3 + ... +n =(1/6)n+(1/2)n +(1/3)is true when n is any positive integer.
Maintained by greenfie@math.rutgers.edu and last modified 9/16/2008.