<Text-field layout="Heading 1" style="Heading 1">1.</Text-field>wallis := n -> evalf( product( 4*k^2/(4*k^2-1),k=1..n));Show that the average value of the upper and lower bounds on Pi can be computer aswallisaverage := n -> 2*evalf( product( 4*k^2/(4*k^2-1),k=1..n)*(1+1/(4*n)) );
<Text-field layout="Heading 1" style="Heading 1">1.</Text-field>The nth Bernoulli number is stored in Maple as bernoulli(n). The following command generates a list of the first forty Bernoulli numbers[seq(bernoulli(n),n=1..40)];We can now use the recursive formula for Bernoulli polynomials:B := (n,x) -> if n=1 then x-1/2 else n*int(B(n-1,t),t=0..x)+bernoulli(n) end if;[seq(B(n,x),n=1..10)];
<Text-field layout="Heading 1" style="Heading 1">2.</Text-field>for n from 1 to 8 do plot(B(n,x),x=-1..2) end do;
<Text-field layout="Heading 1" style="Heading 1">8 & 9</Text-field>The command NB(n) finds the numberator of the 2nth Bernoulli number. Thus, the numerator of B_20 is NB. The command DB(n) finds the denominator.NB := n -> numer(bernoulli(2*n)); DB := n -> denom(bernoulli(2*n));The following commands list the factorizations of the numerators and of the denoninators of the Bernoulli numbers. The first column gives the value of n (it is the Bernoulli number for 2n), the second column list the prime divisors, and the third column gives the powers of each of those prime divisors.[seq([n,ifactor(NB(n))],n=1..20)];[seq([n,ifactor(DB(n))],n=1..20)];