#OK to post homework # Edna Jones, Math 640 (Spring 2018), Homework Assignment 6 # 1. get procedure CheckZ5(N) to work by first creating a list of floating-point numbers for (phi(x)-x)/x^2 from 2 to N and then adding them, i.e. replacing integration by summation #th(x): sum(log(p), primes p <= x) th := proc(x) local i, su: su := 0; for i from 1 while ithprime(i) <= x do su := su + log(ithprime(i)); od: su; end: # CheckZ5(N): Checks V in Zagier's paper using summation instead of integration CheckZ5 := proc(N) local x: evalf(add((th(x)-x)/x^2, x=2..N)); end: # CheckZ5(1000) returns -1.561336322 # CheckZ5(10000) returns -1.615454926 # It appears to grow slowly enough so that the sum might converge. # 2. It has been read and understood. # 3. Write a procedure gT(f,t,z,T) that inputs an expression f in a variable t, a complex number z, and a real number T, and outputs the integral of f(t)*exp(-z*t) for t from 0 to T. Experiment with several f and see or which ones limit of gT(0) converges, and whether it goes to g(0). gT := proc(f,t,z,T) evalf(Int(f*exp(-z*t), t=0..T)); end: # gT(sin(t),t,0,1000) returns 0.4376209237. # gT(sin(t),t,0,10000) returns 1.952155368. # int(sin(t),t=0..infinity) returns undefined. # If f(t) = sin(t), {gT(0)} does not converge. # gT(exp(-t),t,0,1000) returns 1.000000000. # gT(exp(-t),t,0,10000) returns 1.000000000. # evalf(limit(gT(exp(-t),t,0,T),T=infinity)) returns 1.000000000. # int(exp(-t),t=0..infinity) returns 1, which agrees with evalf(limit(gT(exp(-t),t,0,T),T=infinity)). # That is, if f(t) = exp(-t), then the limit of gT(0) converges to g(0). # gT(1/(t+1),t,0,1000) returns 6.908754779. # gT(1/(t+1),t,0,10000) returns 9.210440367. # gT(1/(t+1),t,0,100000) returns 11.51293546. # int(1/(t+1),t=0..infinity) returns infinity. # If f(t) = 1/(t+1), {gT(0)} does not converge. # gT(1/(t+1)^2,t,0,1000000) returns 0.9999990000. # gT(1/(t+1)^2,t,0,1000000000) returns 0.9999999990. # gT(1/(t+1)^2,t,0,1000000000000) returns 1.000000000. # evalf(limit(gT(1/(t+1)^2,t,0,T),T=infinity)) returns 1.000000000. # int(1/(t+1)^2,t=0..infinity) returns 1. # Thus, if f(t) = 1/(t+1)^2, then the limit of gT(0) converges to g(0). # 4. It's optional.