# Ok to post Homework # Matt Charnley, Assignment 6, February 11, 2018 with(numtheory): Help := proc() print(`th(x), IntZ5(n), CheckZ5(N), gT(f, t, z, T)`): end: #1) Carry out the integration on each interval of length 1, and then add them up. #th(x): sum(log(p), 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: # IntZ5(n): Computes the integral in Z5 from n to n+1 using the value of th(n) IntZ5 := proc(n) local x: evalf(Int((th(n) - x)/x^2, x=n..n+1)): end: # CheckZ5(N): Does the integral in V5 from 1 to N to try to determine if it is convergent CheckZ5:= proc(N) local n: add(IntZ5(n), n=1.. N-1): end: # It looks like this is converging towards something like -2.29 as N -> infinity #2) I have read it. #3) gT:= proc(f,t,z,T) evalf(Int(f*exp(-z*t), t=0..T)): end: # Based on the definition, if $f$ is integrable, the integral with z = 0 should converge, and it will converge to the integral of f from 0 to infinity # # This was confirmed by my experimentation in Maple. All polynomials gave increasing numbers or infinity, e^-t went to 1, and sin(t)/t went to pi/2.