6
$\begingroup$

Allegedly

$1 - \int_1^\infty \frac{ (t-\left \lfloor{t}\right \rfloor ) } { t^2 } dt = \gamma$

where $\gamma$ = EulerGamma

( Introduction to Analytic Number Theory, Apostol; Theorem 3.2 p 56 )

I would like to prove this with Mathematica. ( Use Fourier Series or whatever if necessary. )

Is this possible?

$\endgroup$

2 Answers 2

8
$\begingroup$

This is almost the required one.

Sum[Integrate[1/t - n/t^2, {t, n, n + 1}], {n, 1, Infinity}]
(*1 - EulerGamma*)

The difficulty consists in

FullSimplify[1/t - Floor[t]/t^2, Assumptions -> n > 0 && n \[Element] Integers && t >=n && t < n + 1]
(*(t - Floor[t])/t^2*)

One sees Mathematica is not able to simplify Floor[t] to n under the assumptions.

$\endgroup$
7
  • $\begingroup$ Interesting... that is at least a start. $\endgroup$ Commented Jul 12, 2020 at 7:35
  • $\begingroup$ Yes, I like the technique! Could handle most integrals with Floor / Fraction like that, I suppose. $\endgroup$ Commented Jul 12, 2020 at 7:41
  • $\begingroup$ Just to compare. The code of Maple 2019.1 int(1/t - floor(t)/t^2, t = 1 .. n)assuming n>1,n::integer:limit(%, n = infinity) assuming n::integer does the job. $\endgroup$ Commented Jul 12, 2020 at 7:45
  • $\begingroup$ Work to do for Wolfram... $\endgroup$ Commented Jul 12, 2020 at 8:06
  • $\begingroup$ Would you know if Sage can handle this? My Sage is rusty... $\endgroup$ Commented Jul 12, 2020 at 8:12
6
$\begingroup$

In cases you have problems to determine the integrand depending on n, you can calculate integrals for some n and find formula for the integral with FindSequenceFunction .

Calculate the difference for n+1 and n and sum up the found formula. Since FindSequenceFunction does not recognize Log, do it in two steps.

tab = Flatten@
  Table[{Integrate[(t - Floor[t])/t^2, {t, 1, n + 1}] - 
  Integrate[(t - Floor[t])/t^2, {t, 1, n}] // Expand}, {n, 1, 8}]

fs1 = FindSequenceFunction[tab /. Log[_] -> 0, n];
fs2 = FindSequenceFunction[Cases[tab, Log[aa_] -> aa, 2], n];

int1 = fs1 + Log[fs2]

(*   1/(-1 - n) + Log[(1 + n)/n]   *)

Sum[int1, {n, 1, ∞}]

(*   1 - EulerGamma   *)

An other example:

tabx = Flatten@
  Table[{Integrate[(Floor[t] - t)/Ceiling[t]^2, {t, 1, n + 1}] - 
  Integrate[(Floor[t] - t)/Ceiling[t]^2, {t, 1, n}] // 
 Expand}, {n, 1, 8}]

(*   {-(1/8), -(1/18), -(1/32), -(1/50), -(1/72), -(1/98), 
      -(1/128), -(1/162)}   *)

fs1 = FindSequenceFunction[tabx, n]

(*   -(1/(2 (1 + n)^2))   *)

Sum[fs1, {n, 1, ∞}]

(*   1/2 (1 - π^2/6)   *)
$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.