# If functions agree at all but finitely many points then the integrals are the same

Exercise 3-2 from Calculus on Manifolds by Spivak:

Let $A\subset R^n,\ f:A\rightarrow R$ an integrable (in the sense of Darboux) function. Let $g=f$ except at finitely many points. Prove that $g$ is also integrable and $\int_Af=\int_A g$.

Note that there is a similar question show that $g$ is integrable, with $f=g$ except in finite set and $f$ integrable but the answers assume the knowledge of measure theory whereas Spivak doesn't.

I guess I need to use the criterion saying that $f$ is integrable iff there is a partition $P$ of $A$ such that $U(f,P)-L(f,P)< \epsilon$ for any $\epsilon < 0$. But I don't know how to apply it to both functions. I thought about considering $f-g$ (which should be integrable except finitely many points), but Spivak doesn't even state that the sum of two integrable functions is integrable, so perhaps I'm not supposed to use this. (Even if I consider $f-g$, I don't know how to proceed).

• I'd try to prove that $\int_{[a,b]} f(x) dx = \int_{[a,c)\cup(c,b]} f(x) dx$, where $a<c<b$. – Dog_69 Feb 21 '18 at 22:34

Your idea of considering the difference is a good one, since your problem is then seen to be equivalent to proving that a function which is $0$ except at finitely many points is integrable and must have integral equal to $0$ (try to understand why if this isn't clear)

In order to prove this statement, taking partitions with small diameter will show that you can let your upper and lower sums be as near zero as you want (they will be bounded by $\pm N \cdot\mathrm{diam}(P)^n\cdot\max |f|$, where $N$ is the number of points where the function is not zero).

Now, to see why $g$ is integrable, notice that $g=(g-f)+f$.

Therefore, $\int g=\int(g-f)+\int f=\int f$.

You mention in the question that the book does not say that sum of integrable functions is integrable before this point. If you are uncomfortable with using this fact, try to adapt the proof above to avoid using it. The core idea is in the second paragraph of this answer.

• I'm not sure I understand how the upper and lower sums can be made as near to zero as I want. I guess we need to take a partition such that every point at which the function is nonzero lies in some subrectangle of partition. Then both lower and upper sums have $N$ terms in them. But that's all what I can see. – user531232 Feb 22 '18 at 3:34
• I would say if every point at which $f-g$ is not zero lies in a rectangle of partition, then the upper sum is bounded above by $N\cdot V \cdot \max_A |f-g|$ where $V$ is the volume of the largest rectangle of partition. So I don't understand why you have $\max |f|$ and $diam(P)^n$ in your inequality. Modulo these facts, I see that the upper sums approach $0$ as the partition gets finer. Also I don't see why the lower sums approach $0$. – user531232 Feb 22 '18 at 23:14
• @user531299 Sorry if I was not explicit enough: My $f$ on that bound is after I've effectively changed the problem. I am now considering $f$ to be a function which is non-zero only at finitely many points (that is, $f"="g-f$). For the second part of your comment, both the upper sum and lower sum are bounded by above by that value, and by below by minus that value. – Aloizio Macedo Feb 22 '18 at 23:20
• Thanks, that makes sense. And what about $diam(P)^n$ in your inequality? I thought each summand in the upper sum is a product of a maximum of $f$ on a rectangle and the volume of the rectangle. So I thought we could bound the second multiplier of each summand by the the volume of the largest rectangle (since the sum consists of $N$ terms). So I don't understand where $diam(P)^n$ comes from. – user531232 Feb 22 '18 at 23:42
• @user531299 $\mathrm{diam}(P)^n$ is a bound for the volume of the largest rectangle. I am calling the diameter of the partition the biggest diameter (in the traditional metric sense) among the rectangles of the partition. So the diameter is bigger than the sides of any of the rectangles, and thus (its $n$-th power) is bigger than the volume of the biggest one. – Aloizio Macedo Feb 22 '18 at 23:49