Coping over stupidity

Recently I was struggling with "stupid" problems (I should've mastered them way year(s) ago, but it turns out that I was stuck on those problems...)

Problem 1. (Encountered on 22 Feb) Find a closed formula for the sum k=1nk3\sum_{k=1}^n k^3.

Woah... This looks very easy. I think I've seen this in my middle school. It was umm something squared... But what? (2n+1)2(2n+1)^2? No. Probably something with degree 22 squared (to obtain something of degree 44, because k=1nk2=n(n+1)(2n+1)6\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6} is of degree 33, and k=1nk=n(n+1)2\sum_{k=1}^n k = \frac{n(n+1)}{2} is of degree 22).

Note. Bruhh that's not even mathematics! The reasoning is absurd, not deductive, and not even scientific as there is not enough evidence! Well, I must've probably seen this sometime before...

Well, randomly, it turns out that I recalled correctly that k=1nk3=(n(n+1)2)2\sum_{k=1}^n k^3 = \left(\frac{n(n+1)}{2}\right)^2.

Proving from this is easy. Let's try.

Proof. Let us prove by induction. For n=1n = 1, we have sum 13=(1(1+1)2)21^3 = \left(\frac{1(1+1)}{2}\right)^2 so it is done. Now suppose the formula works for nNn \in \mathbb{N}^*, let us prove that it also works for n+1n+1. We know that k=1n+1k3=(n+1)3+k=1nk3\sum_{k=1}^{n+1} k^3 = (n+1)^3 + \sum_{k=1}^n k^3. Substitute the induction hypothesis, which says that k=1nk3=(n(n+1)2)2\sum_{k=1}^n k^3 = \left(\frac{n(n+1)}{2}\right)^2, we have k=1n+1k3=(n+1)3+(n(n+1)2)2\sum_{k=1}^{n+1} k^3 = (n+1)^3 + \left(\frac{n(n+1)}{2}\right)^2. This gives

(n+1)3+(n(n+1)2)2=(n+1)2n+(n+1)2+(n(n+1)2)2=(n(n+1)2+(n+1))2=((n+2)(n+1)2)2 (n+1)^3 + \left(\frac{n(n+1)}{2}\right)^2\\= (n+1)^2 n + (n+1)^2 + \left(\frac{n(n+1)}{2}\right)^2\\= \left(\frac{n(n+1)}{2} + (n+1)\right)^2\\=\left(\frac{(n+2)(n+1)}{2}\right)^2

which satisfies the formula on n+1n+1, hence the induction is complete. \square

Ok, yes, the proof is done. But why, and how, can we deduce these formulas by ourselves (intuitively if possible)? I think there was once a blog post on this problem. Let me see... Ah yes! Neizod once gave a nice blog post on this. I haven't read it completely though. I thought I'll read it later (and never did). Now I still think I'll read it later and probably forgot about it again :( aaaa.

Let us move to the next one first.

Problem 2. (Encountered on 23 Feb) Does k=1(1)kk\sum_{k=1}^\infty \frac{(-1)^k}{k} converge? If so, then what is the value (i.e. the limit of the partial sums).

Yes. This one looks very very easy. So I answered very confidently that it is 00 and this is very very wrong! Well it probably converges. But why? I forgot the reason! And hence how can I say with full confidence that it converges? Ok. I thought of decomposing it to k=1(1)2k2k+(1)2k+12k+1\sum_{k=1}^\infty \frac{(-1)^{2k}}{2k} + \frac{(-1)^{2k+1}}{2k+1}, so we can deal with 12k12k+1=1(2k)(2k+1)1k2\frac{1}{2k} - \frac{1}{2k+1} = \frac{1}{(2k)(2k+1)} \leq \frac{1}{k^2} so it converges by the comparison test on series.

Another way is by the adjacent sequence reformulation. Let

(Sn)nN (S_n)_{n \in \mathbb{N}}

be the sequence of partial sums, i.e. Sn=k=1n(1)kkS_n = \sum_{k=1}^n \frac{(-1)^k}{k}. Then

(S2n)nN(S_{2n})_{n \in \mathbb{N}}

are decreasing (because S2(n+1)=S2n12n+1+12n+2S_{2(n+1)} = S_{2n} - \frac{1}{2n+1} + \frac{1}{2n+2} with 12n+1+12n+20-\frac{1}{2n+1} + \frac{1}{2n+2} \leq 0). Also,

(S2n+1)nN (S_{2n+1})_{n \in \mathbb{N}}

are increasing since S2(n+1)+1=S2n+1+12n+212n+3S_{2(n+1)+1} = S_{2n+1} + \frac{1}{2n+2} - \frac{1}{2n+3} with 12n+212n+30\frac{1}{2n+2} - \frac{1}{2n+3} \leq 0. And observe that S2nS2n+1=12n+1n0S_{2n} - S_{2n+1} = \frac{1}{2n+1} \xrightarrow[n \to \infty]{} 0. So the even indices subsequence and the odd indices subsequence are adjacent sequences, hence convergent, and converges to the same limit.

Well, now what can we say about the value of the sum? Obviously it is not zero since it is equivalent to the sum k=112k(2k+1)\sum_{k=1}^\infty \frac{1}{2k(2k+1)} as shown above, and this is obviously greater than 12(1)(2(1)+1)=16\frac{1}{2(1)(2(1)+1)} = \frac{1}{6}, which is the first term, among all the positive terms of the series.

A quick google search gives this. So I'll read this later (hopefully).

Problem 3. (Encountered on 23 Feb) Suppose a,bRa, b \in \mathbb{R} such that a<ba < b. Suppose f ⁣:]a,b[Rf \colon ]a, b[ \to \mathbb{R}. If the integral abf(x)dx \int_{a}^b f(x) \mathrm{d}x converges, then for any ε>0\varepsilon > 0 there exists δa,δb]0,ba[\delta_a, \delta_b \in ]0, b-a[ such that aa+δaf(x)dx<εandbδbbf(x)dx<ε \int_{a}^{a+\delta_a} f(x) \mathrm{d}x < \varepsilon \qquad \text{and} \qquad \int_{b-\delta_b}^{b} f(x) \mathrm{d}x < \varepsilon

Well this is just in the basic theory of Riemann integration! I should've been able to state and prove this by myself, but no! I wasn't convinced! What if ff is unbounded?

It turns out that there are two cases, if we're talking about ab\int_a^b as an actual Riemann integral, then, by definition of the original Riemann integral, ff must be bounded on [a,b][a, b], since we must consider all the step functions under ff, find the supremum, consider all the step functions above ff, find the infimum, and prove that they are the same first, so that we can conclude the value of the integral. If ff is unbounded on [a,b][a, b] then the step functions doesn't exist, and hence not (originally) integrable (but actually integrable by extension, i.e. by the limit of the integrals, extended to aa and bb). Now, if ff is bounded, it is easy since supfM\sup |f| \leq M so aa+δafaa+δafaa+δa(supf)δaM\int_a^{a+\delta_a} f \leq \int_a^{a+\delta_a} |f| \leq \int_a^{a+\delta_a} (\sup |f|) \leq \delta_a M. If we want the integral to be bounded by ε\varepsilon, we can easily pick δa=ε2M\delta_a = \frac{\varepsilon}{2M}. The case of δb\delta_b is the same.

Now for the case of the extended (improper) integrals, by definition, the integral abf\int_a^b f is defined as the sum of limx>axcf+limx<bcxf \lim_{x \xrightarrow[>]{} a} \int_x^c f + \lim_{x \xrightarrow[<]{} b} \int_c^x f for any c[a,b]c \in [a, b] (the values are the same, by Chasles' identity). Now, since acf=limx>axcf\int_a^c f = \lim_{x \xrightarrow[>]{} a} \int_x^c f, by definition of limit, we have that for any given ε>0\varepsilon > 0 there exists δ>0\delta > 0 such that for any x]a,a+δ[x \in ]a, a+\delta[, (xcf)(acf)<ε\left|\left(\int_x^c f\right) - \left(\int_a^c f\right)\right| < \varepsilon. But (xcf)(acf)=axf\left|\left(\int_x^c f\right) - \left(\int_a^c f\right)\right| = \left|\int_a^x f \right|, so we can pick δa=δ2\delta_a = \frac{\delta}{2} so that aa+δaf<ε\left|\int_a^{a+\delta_a} f \right| < \varepsilon. Same holds for the case of bb.

Now there is also the infinite case, suppose aRa \in \mathbb{R} and f ⁣:]a,+[Rf \colon ]a, +\infty[ \to \mathbb{R} such that a+f(x)dx\int_a^{+\infty} f(x) \mathrm{d}x converges, then for all ε>0\varepsilon > 0 there exists M0[a,+[M_0 \in [a, +\infty[ such that M0+f(x)dx<ε\int_{M_0}^{+\infty} f(x) \mathrm{d}x < \varepsilon.

This is a bit different with notation, but it's the same, as we can expand the definition of limit at infinity as the same, i.e. limx<+axf=a+f\lim_{x \xrightarrow[<]{} +\infty} \int_a^x f = \int_a^{+\infty} f means that for any given ε>0\varepsilon > 0 there exists M>0M > 0 such that for all xMx \geq M, axfa+f<ε\left|\int_a^x f - \int_a^{+\infty} f\right| < \varepsilon. This is the same as xM,xf<ε\forall x \geq M, \left|\int_x^\infty f \right| < \varepsilon. Take M0MM_0 \gets M, then it is done. \square

Problem 4. (Encountered on 25 Feb) Let a<ba < b be two real numbers. Let fC0([a,b])f \in \mathcal{C}^0([a,b]). Prove that

limnk=1nf(a+bank)ban \lim_{n \to \infty} \sum_{k=1}^n f\left(a + \frac{b-a}{n}k\right) \frac{b-a}{n} exists.

Note. (I wrote this after I wrote the below comments so it might look out of place, but I think it's best to state about the origin of this problem) I thought about this problem when I read the book A Garden of Integrals by Frank E. Burk. on Chapter 2 about Cauchy integrals. This integral defined as above is kinda weaker than Cauchy integrals, in the sense that if a function is Cauchy-integrable, then clearly it must be integrable by the definition above. This follows directly from the definition of Cauchy integral (which will be stated later).

Well, I thought this should be very easy. Since the function is continuous, the result is clearly the same as the Riemann integral, and so this must be very easy. It turns out that there are unexpectedly many issues in my head!

Ok, to be precise, let us recall the definition here:

Definition. (Darboux integral) Let f ⁣:[a,b]Rf \colon [a, b] \to \mathbb{R} be a function on a bounded segment (i.e. a<ba < b are real numbers, not the infinities). Consider the notion of I+(f):=inf{abϕ ⁣:ϕf is a step function } I^+(f) := \inf \left\{ \int_a^b \phi \colon \phi \geq f \text{ is a step function }\right\} and I(f):=sup{abϕ ⁣:ϕf is a step function } I^-(f) := \sup \left\{ \int_a^b \phi \colon \phi \leq f \text{ is a step function }\right\} then ff is integrable on [a,b][a, b] if and only if I(f)=I+(f)I^-(f) = I^+(f) and we call this quantity the integral of ff on [a,b][a, b], denoting it by abf\int_a^b f or abf(x)dx\int_a^b f(x) \mathrm{d}x. Oh yes, by the way, I forgot to define the step functions and their integrals. (But that's kinda obvious right?)

Definition. (Step function) For c<dc < d fixed real numbers, f ⁣:[c,d]Rf \colon [c, d] \to \mathbb{R} is a step function if and only if there exists a finite subidivision, i.e. there exists nNn \in \mathbb{N}^* and (x0,x1,,xn)Rn+1(x_0, x_1, \dots, x_n) \in \mathbb{R}^{n+1} such that c=x0<x1<x2<<xn=dc = x_0 < x_1 < x_2 < \dots < x_n = d, and there exists (c1,c2,,cn)Rn(c_1, c_2, \dots, c_n) \in \mathbb{R}^n such that ff is constant (and equal to ck+1c_{k+1}) in ]xk,xk+1[]x_k, x_{k+1}[, for all k{0,,n1}k \in \{0, \dots, n-1\}. In other words, for all k{1,,n}k \in \{1, \dots, n\}, for all x]xk1,xk[,f(x)=ckx \in ]x_{k-1}, x_k[, f(x) = c_k . We define the integral cdf\int_c^d f as k=1nck(xkxk1)\sum_{k=1}^n c_k (x_k - x_{k-1}). Note that the subdivisions are not unique, but the integral is unique (which should also be proven, but I didn't care to listen to the proof). Let us prove here.

Proof. (I read from the lecture notes, then try to process the information, and then rewrite it here) Suppose there are two subdivisions (x0,x1,,xn)(x_0, x_1, \dots, x_n) and (y0,y1,,ym)(y_0, y_1, \dots, y_m) with c=x0<x1<<xn=dc = x_0 < x_1 < \dots < x_n = d and c=y0<y1<<ym=dc = y_0 < y_1 < \dots < y_m = d. Furthermore, by the previous definition, let ck=f(xk1+xk2)c_k = f\left(\frac{x_{k-1} + x_k}{2}\right) (for k{1,,n}k \in \{1, \dots, n\}) be the constants obtained as the image of ff on ]xk1,xk[]x_{k-1}, x_k[. Also let dk=f(yk1+yk2)d_k = f\left(\frac{y_{k-1}+y_k}{2}\right) (for k{1,,m}k \in \{1, \dots, m\}) be the constants obtained from ff on ]xk1,xk[]x_{k-1}, x_k[. Now, we will prove that k=1nck(xkxk1)=k=1mdk(ykyk1)\sum_{k=1}^n c_k (x_k - x_{k-1}) = \sum_{k=1}^m d_k (y_k - y_{k-1}) by proving that they are both k=1pek(zkzk1)\sum_{k=1}^p e_k (z_k - z_{k-1}) where we try to construct a new subdivision c=z0<z1<<zp=dc = z_0 < z_1 < \dots < z_p = d such that {zi}={xi}{yi}\{z_i\} = \{x_i\} \cup \{y_i\} (i.e. ziz_i are reconstructed from the union of the set of values of endpoints in the first subdivision and the second subdivision, then sorted once again, as this removes the duplicates automatically) and, in the same fashion, define ek=f(zk1+zk2)e_k = f\left(\frac{z_{k-1}+z_k}{2}\right). Now, we claim that eke_k is the constant image of ff in ]zk1,zk[]z_{k-1}, z_k[. Why? Because by construction, ]zk1,zk[]z_{k-1}, z_k[ must lie inside some ]yk1,yk[]y_{k'-1}, y_{k'}[ or ]xk1,xk[]x_{k'-1}, x_{k'}[, and these are intervals that admit a constant image of ff. Then, observe that k=1nck(xkxk1)\sum_{k=1}^n c_k (x_k - x_{k-1}) is the sum of ck(xkxk1c_k (x_k - x_{k-1}, for each k{1,,n}k \in \{1, \dots, n\}. Now, let us take a look at the new subdivision (z0,,zp)(z_0, \dots, z_p). Clearly, x0=z0x_0 = z_0, and x1=zix_1 = z_i for some ii, and... blah blah... So we can define ϕ ⁣:{0,,n}{0,,p}\phi \colon \{0, \dots, n\} \to \{0, \dots, p\} an increasing function such that xk=zϕ(k)x_k = z_{\phi(k)}. Now, consider the term ck(xkxk1)c_k (x_k - x_{k-1}) of the summation. Observe that ek=cke_{k'} = c_k for all k{ϕ(k1)+1,,ϕ(k)}k' \in \{\phi(k-1)+1, \dots, \phi(k)\}. Why? Because eke_{k'} is the value f(zk1+zk2)f\left(\frac{z_{k'-1}+z_{k'}}{2}\right), but xk1zk1<zk1+zk2<zkxkx_{k-1} \leq z_{k'-1} < \frac{z_{k'-1}+z_{k'}}{2} < z_{k'} \leq x_k. Also, since k=ϕ(k1)+1ϕ(k)zkzk1=zϕ(k)zϕ(k1)\sum_{k'=\phi(k-1)+1}^{\phi(k)} z_{k'} - z_{k'-1} = z_{\phi(k)} - z_{\phi(k-1)} (basically telescoping sum). This establishes a connection:

ck(xkxk1)=k=ϕ(k1)+1ϕ(k)ck(zkzk1)=k=ϕ(k1)+1ϕ(k)ek(zkzk1) c_k (x_k - x_{k-1}) = \sum_{k'=\phi(k-1)+1}^{\phi(k)} c_k (z_{k'} - z_{k'-1})\\= \sum_{k'=\phi(k-1)+1}^{\phi(k)} e_{k'} (z_{k'} - z_{k'-1})

So the full sum k=1nck(xkxk1)\sum_{k=1}^n c_k (x_k - x_{k-1}) is essentially

k=1nk=ϕ(k1)+1ϕ(k)ek(zkzk1) \sum_{k=1}^n \sum_{k' = \phi(k-1)+1}^{\phi(k)} e_{k'} (z_{k'} - z_{k'-1})

which is exactly

k=1pek(zkzk1) \sum_{k' = 1}^{p} e_{k'} (z_{k'} - z_{k'-1})

since the index kk' continues from ϕ(0)+1\phi(0)+1 to ϕ(1)\phi(1) then ϕ(1)+1\phi(1)+1 to ϕ(2)\phi(2) and so on, till ϕ(n1)+1\phi(n-1)+1 to ϕ(n)\phi(n), which is exactly the set {1,,p}\{1, \dots, p\} because ϕ(0)=0\phi(0) = 0 and ϕ(n)=p\phi(n) = p, by construction of ϕ\phi. This proves that the step function integral using subdivision x0<x1<<xnx_0 < x_1 < \dots < x_n is equal to the step function integral using subdivision z0<z1<<zpz_0 < z_1 < \dots < z_p. We can play the same game on y0<y1<<ymy_0 < y_1 < \dots < y_m and we can obtain that the integral using subdivision y0<<ymy_0 < \dots < y_m has the same value as integral using z0<<zpz_0 < \dots < z_p, so the two values

k=1nck(xkxk1)andk=1mdk(ykyk1) \sum_{k=1}^n c_k (x_k - x_{k-1}) \qquad \text{and} \qquad \sum_{k=1}^m d_k (y_k - y_{k-1})

are the same. Hence, the step function integral is uniquely defined. \square

Ok. I mean, you got the idea, but I think what I wrote up there is a bit too complicated and hence too much bullshit and hence a waste of time. The lecture notes gave a better wording: for any subdivision, we can add any finite number of points to the subdivision, and the results are still the same.

Proof. Adding one point at a time (let's call this yy) to the subdivision c=x0<x1<<xn=dc = x_0 < x_1 < \dots < x_n = d, such that y{x0,,xn}y \notin \{x_0, \dots, x_n\}, means yy must lie between ]xk1,xk[]x_{k-1}, x_k[ for some k{1,,n}k \in \{1, \dots, n\}. Then consider the term ck(xkxk1)c_k (x_k - x_{k-1}) in the summation defining the integral. We have ck(xkxk1)=ck(xky+yxk1)=ck(xky)+ck(yxk1)c_k (x_k - x_{k-1}) = c_k (x_k - y + y - x_{k-1}) = c_k (x_k - y) + c_k (y - x_{k-1}). And the new corresponding image of the subintervals ]xk1,y[]x_{k-1}, y[ and ]y,xk[]y, x_k[ are exactly ckc_k since they lie in ]xk1,xk[]x_{k-1}, x_k[, which has ckc_k as the image, by definition. Since we can add one point, we can add any finite number of points. \square

So yes, add the points y0,,ymy_0, \dots, y_m one by one, if it doesn't exist in {x0,,xn}\{x_0, \dots, x_n\}. The result is the same as with only the x's, let's call this XX. And now start everything again from {y0,,ym}\{y_0, \dots, y_m\} and add x0,,xnx_0, \dots, x_n one by one to the set. The result is the same as with the only y's. Let's call this YY. Since the two sets are the same, namely, {x0,,xn}{y0,,ym}\{x_0, \dots, x_n\} \cup \{y_0, \dots, y_m\}, then X=YX = Y.

Now, getting back to the main problem. (Yes, it took quite a long detour on just the Darboux integral definition, but anyway...). As I thought up of this problem when I read the book A garden of integrals, it would be a good place to define the Cauchy integral.

Definition. (Cauchy integral) Let f ⁣:[a,b]Rf \colon [a, b] \to \mathbb{R} be a bounded function, then we say that ff is Cauchy-integrable if, for any given ε>0\varepsilon > 0, there exists δ>0\delta > 0 and R\ell \in \mathbb{R} such that for any subdivision a=x0<x1<<xn=ba = x_0 < x_1 < \dots < x_n = b such that sup{xkxk1 ⁣:k{1,,n}}<δ\sup \{x_k - x_{k-1} \colon k \in \{1, \dots, n\}\} < \delta,

k=1nf(xk1)(xkxk1)<ε \left| \sum_{k=1}^n f(x_{k-1})(x_k - x_{k-1}) - \ell \right| < \varepsilon

and we call the quantity \ell the Cauchy integral of ff on [a,b][a, b].

Ok, well, why am I saying this? Because I'm going to prove that my integral is weaker than Cauchy integral.

Proof. Let a<ba < b be real numbers. Suppose f ⁣:[a,b]Rf \colon [a, b] \to \mathbb{R} is Cauchy-integrable, then there exists R\ell \in \mathbb{R} such that for any given ε>0\varepsilon > 0, there exists δ>0\delta > 0 such that for all subdivision (x0,,xp)(x_0, \dots, x_p) with all segment sizes smaller than δ\delta (i.e. sup{xkxk1 ⁣:k{1,,p}}<δ\sup \{x_k - x_{k-1} \colon k \in \{1, \dots, p\}\} < \delta), we have

k=1pf(xk1)(xkxk1)<ε \left|\sum_{k=1}^p f(x_{k-1}) (x_k - x_{k-1}) - \ell\right| < \varepsilon

_For the sake of aesthetic, we (foresee the future and take ε/3\varepsilon/3 instead, ok let me admit that I'm the future self, coming back here, to redefine this to simplify things), so that there exists δ\delta such that for all subdivision with segments smaller than δ\delta,_

k=1pf(xk1)(xkxk1)<ε3 \left|\sum_{k=1}^p f(x_{k-1}) (x_k - x_{k-1}) - \ell\right| < \frac{\varepsilon}{3}

Then, for any nn, define the _nnth subdivision_ (x0(n),x1(n),,xn(n))(x_0^{(n)}, x_1^{(n)}, \dots, x_n^{(n)}) as xk(n)=a+bankx_k^{(n)} = a + \frac{b-a}{n}k for k{0,,n}k \in \{0, \dots, n\}. Let us show that

limnk=1nf(xk(n))(xk(n)xk1(n))= \lim_{n \to \infty} \sum_{k=1}^n f(x_k^{(n)}) (x_k^{(n)} - x_{k-1}^{(n)}) = \ell

by showing that for any ε>0\varepsilon > 0 there exists NNN \in \mathbb{N}^* such that for all nNn \in \mathbb{N}^* with nNn \geq N, k=1n(f(xk(n))(xk(n)xk1(n)))<ε\left| \sum_{k=1}^n \left(f(x_k^{(n)}) (x_k^{(n)} - x_{k-1}^{(n)})\right) - \ell \right| < \varepsilon. Well, obviously, by the theorem of Cauchy integral, we can just pick N>bamin(δ,ε3supf)N > \frac{b-a}{\min(\delta, \frac{\varepsilon}{3 \sup |f|})} so that δ>baNban\delta > \frac{b-a}{N} \geq \frac{b-a}{n} for all integers nNn \geq N, and also ε3>banf(x)\frac{\varepsilon}{3} > \frac{b-a}{n}|f(x)| for all x[a,b]x \in [a, b]. (Note that this only works on supf0\sup |f| \ne 0, i.e. ff is not everywhere zero, but for ff everywhere zero, it is obvious that whatever sum, whatever subdivision we take, no matter how small or how big, everything sums to exactly zero, so the proof is automatically completed for f0f \equiv 0.) So, by that result, we have

k=1nf(xk1(n))(xk(n)xk1(n))<ε3 \left| \sum_{k=1}^n f(x_{k-1}^{(n)})(x_k^{(n)} - x_{k-1}^{(n)}) - \ell \right| < \frac{\varepsilon}{3}

Now we're left with stupid manipulation... bruhhh... Let dd be the subsegment sizes (which are the same since we define the subdivision to be regular, i.e., have equal length). So xkxk1=dx_k - x_{k-1} = d for all k{1,,n}k \in \{1, \dots, n\}. We have

k=1nf(xk1(n))(xk(n)xk1(n))=dk=1nf(xk1(n))=dk=2nf(xk1(n))+f(x0(n))d=dk=1n1f(xk(n))+f(x0(n))d=dk=1nf(xk(n))+f(x0(n))df(xn(n))d=k=1nf(xk(n))(xk(n)xk1(n))+f(x0(n))df(xn(n))d \sum_{k=1}^n f(x_{k-1}^{(n)})(x_k^{(n)} - x_{k-1}^{(n)}) \\= d\sum_{k=1}^n f(x_{k-1}^{(n)}) \\= d\sum_{k=2}^n f(x_{k-1}^{(n)}) + f(x_0^{(n)})d \\= d\sum_{k=1}^{n-1} f(x_k^{(n)}) + f(x_0^{(n)})d \\= d\sum_{k=1}^n f(x_k^{(n)}) + f(x_0^{(n)})d - f(x_n^{(n)})d \\= \sum_{k=1}^n f(x_k^{(n)}) (x_k^{(n)} - x_{k-1}^{(n)}) + f(x_0^{(n)})d - f(x_n^{(n)})d

Then,

k=1nf(xk(n))(xk(n)xk1(n))=k=1nf(xk1(n))(xk(n)xk1(n))f(x0(n))d+f(xn(n))dk=1nf(xk1(n))(xk(n)xk1(n))+f(x0(n))d+f(xn(n))d<ε3+ε3+ε3=ε \left|\sum_{k=1}^n f(x_k^{(n)}) (x_k^{(n)} - x_{k-1}^{(n)}) - \ell\right| \\=\left|\sum_{k=1}^n f(x_{k-1}^{(n)}) (x_k^{(n)} - x_{k-1}^{(n)}) - f(x_0^{(n)})d + f(x_n^{(n)})d - \ell\right| \\\leq \left|\sum_{k=1}^n f(x_{k-1}^{(n)}) (x_k^{(n)} - x_{k-1}^{(n)}) - \ell\right| + |f(x_0^{(n)})|d + |f(x_n^{(n)})|d \\< \frac{\varepsilon}{3} + \frac{\varepsilon}{3} + \frac{\varepsilon}{3} = \varepsilon

This completes the proof. \square

Ok. This is ridiculously long, and highly detailed. Yet it must be, since I'm trying to fix the trauma of claiming something false to be true due to lack of rigor and due to trying not to care stupid (yet necessary) steps. What interesting, is, how can I improve my proofs? How can I write shorter, simpler, yet rigorous proofs? And this is a hard thing to do.

Now, we see that my integral is weaker than Cauchy integral, which is weaker than Riemann integral, which is equivalent to Darboux integral.

Ok, the part from Cauchy to Riemann to Darboux, is not so obvious, and so I'll just simply start with the definition of Riemann integral.

Definition. (Riemann integral) Let f ⁣:[a,b]Rf \colon [a, b] \to \mathbb{R} be a bounded function, then we say that ff is Riemann-integrable if, for any given ε>0\varepsilon > 0, there exists δ>0\delta > 0 and R\ell \in \mathbb{R} such that for any subdivision a=x0<x1<<xn=ba = x_0 < x_1 < \dots < x_n = b such that sup{xkxk1 ⁣:k{1,,n}}<δ\sup \{x_k - x_{k-1} \colon k \in \{1, \dots, n\}\} < \delta, for any t0[x0,x1],t1[x1,x2],,tn1[xn1,xn]t_0 \in [x_0, x_1], t_1 \in [x_1, x_2], \dots, t_{n-1} \in [x_{n-1}, x_n],

k=1nf(tk1)(xkxk1)<ε \left| \sum_{k=1}^n f(t_{k-1})(x_k - x_{k-1}) - \ell \right| < \varepsilon

and we call the quantity \ell the Riemann integral of ff on [a,b][a, b].

I'll stop here for today by just recalling the Riemann integral. If there's no problem, I'll probably be reading A Garden of Integrals this week and continue the proof from Cauchy to Riemann to Darboux. The discussion that Cauchy integrability implies Riemann integrability is given there. (I'll try to think about it first, then maybe read it in detail later) The argument that Riemann integrability doesn't imply Cauchy integrability is given here

Before leaving today, I'd like to say why I rethink about rigor in (introductory to intermediate) analysis recently. This references to a review on the book. It goes with the following question:

Question. For real a<ba < b. Given a bounded, differentiable function f ⁣:[a,b]Rf \colon [a, b] \to \mathbb{R}. Is it true that abf=f(b)f(a)\int_a^b f' = f(b) - f(a)? (In the context of this question, we use Riemann integral)

Oh, right. This looks like the fundamental theorem of calculus, right? It asks if the integral is the inverse operation of differentiation, right? So, it's obviously true by the fundamental theorem of calculus, right? It turns out that the function

f(x)={x2sin(1x3) if x00 otherwise f(x) = \begin{cases} x^2 \sin\left(\frac{1}{x^3}\right) & \text{ if } x \ne 0\\ 0 & \text{ otherwise} \end{cases}

defined on [1,1][-1, 1], is differentiable. WolframAlpha gave the derivative as

2xsin(1x3)3cos(1x3)x2 2 x \sin\left(\frac{1}{x^3}\right) -3 \frac{\cos\left(\frac{1}{x^3}\right)}{x^2} when x0x \ne 0, and 00 otherwise. Now what if we integrate? Let's try

11(2xsin(1x3)3cos(1x3)x2)dx \int_{-1}^{1} \left(2 x \sin\left(\frac{1}{x^3}\right) -3 \frac{\cos\left(\frac{1}{x^3}\right)}{x^2} \right)\mathrm{d}x

Oooh... It does not converge. (WolframAlpha told me that)

Let's look at the graph of ff, given by Desmos here Graph of f

It looks not so bad. The function is odd (i.e. f(x)=f(x)f(x) = -f(-x)), and bounded, inside [1,1][-1, 1], so the integral should be 00, no? Yes, it is not Riemann-integrable. What's more interesting is that it's not even Lebesgue-integrable (as stated in the review paper)

This is where rigor becomes more important than intuition. A bounded differentiable (hence continuous) odd function looks like its derivative should be integrable, but well it's not. I remembered the fundamental theorem of calculus in a simple (not much different from what they taught me when I was in high school) way: "The integral is the inverse operation of the derivative". Well it's kinda true, but, if taken without care, this above result would be confusing. What the (first) fundamental theorem says is that, take ff integrable in [a,b][a, b] and define F(x)=axfF(x) = \int_a^x f, then F(x)=f(x)F'(x) = f(x) for all x]a,b[x \in ]a, b[. (Well, the actual result is a bit stronger, but this gives an overview that it does not say that a derivative is integrable!)

I'll leave it here, and if I have something more (and I have enough time), I'll update this piece of text.

Update. Let us continue the Problem 4. Well, consider the sum k=1nf(a+bank)ban\sum_{k=1}^n f(a + \frac{b-a}{n}k) \frac{b-a}{n} and define this value to be SnS_n so that we have a sequence (Sn)n(S_n)_n. Let us prove that the sequence converges, by proving that the sequence is Cauchy.

Proof. Consider SnSm=SnSnm+SnmSmSnSnm+SmSnm|S_n - S_m| = |S_n - S_{nm} + S_{nm} - S_m| \leq |S_n - S_{nm}| + |S_m - S_{nm}|. Since ff is continuous in a compact segment, it is also uniformly continuous (applying Heine-Cantor theorem) in that segment. For a given ε2(ba)\frac{\varepsilon}{2(b-a)}, there exists δ>0\delta > 0 such that f(x)f(x)<ε2(ba)|f(x) - f(x')| < \frac{\varepsilon}{2(b-a)} whenever xx<δ|x-x'| < \delta. Now, let us look at the sum difference SnSnm|S_n - S_{nm}|. We have

SnSnm=k=1nf(a+bank)bank=1nmf(a+banmk)banm=k=1nbanml=0m1(f(a+banmkm)f(a+banm(km+l))k=1nbanml=0m1f(a+banmkm)f(a+banm(km+l)|S_n - S_{nm}| \\= \left|\sum_{k=1}^n f(a + \frac{b-a}{n}k) \frac{b-a}{n} - \sum_{k=1}^{nm} f(a + \frac{b-a}{nm}k) \frac{b-a}{nm}\right| \\= \left|\sum_{k=1}^n \frac{b-a}{nm} \sum_{l=0}^{m-1} \left(f(a+\frac{b-a}{nm}km) - f(a+\frac{b-a}{nm}(km+l)\right)\right| \\\leq \sum_{k=1}^n \frac{b-a}{nm} \sum_{l=0}^{m-1} \left|f(a+\frac{b-a}{nm}km) - f(a+\frac{b-a}{nm}(km+l)\right|

The term a+banmkma+ \frac{b-a}{nm}km and a+banm(km+l)a + \frac{b-a}{nm}(km+l) differs by only l(ba)nmban\frac{l(b-a)}{nm} \leq \frac{b-a}{n}. This means, if we take N>baδN > \frac{b-a}{\delta}, then δ>baNban\delta > \frac{b-a}{N} \geq \frac{b-a}{n}, which means the difference f(a+banmkm)f(a+banm(km+l)\left|f(a+\frac{b-a}{nm}km) - f(a+\frac{b-a}{nm}(km+l)\right| is always bounded by (strictly less than) ε2(ba)\frac{\varepsilon}{2(b-a)}. Hence,

SnSnm<k=1nbanml=0m1ε2(ba)=nbanmmε2(ba)=ε2 |S_n - S_{nm}| < \sum_{k=1}^n \frac{b-a}{nm} \sum_{l=0}^{m-1} \frac{\varepsilon}{2(b-a)} \\= n\frac{b-a}{nm} m\frac{\varepsilon}{2(b-a)} \\= \frac{\varepsilon}{2}

The same argument holds for SmSnm<ε2|S_m - S_{nm}| < \frac{\varepsilon}{2}. Hence, SnSm<ε2+ε2=ε|S_n - S_m| < \frac{\varepsilon}{2} + \frac{\varepsilon}{2} = \varepsilon, for n,mn, m large enough (n,mN>baδn, m \geq N > \frac{b-a}{\delta} for δ\delta given by ε\varepsilon in the continuity criteria of ff). This means (Sn)n(S_n)_n is Cauchy, and since it's R\mathbb{R} is complete, the sequence converges. Therefore, the integral makes sense for continuous functions, and by the previous results, the sum is the same as in the Cauchy/Riemann/Darboux integral. This completes the proof. \square