3

An interesting question occurred to me as I was reading some Physics: Is it true in general that $$\left|\int_a^b f(x) \, dx\right| = \int_a^b |f(x)| \, dx\, ?$$ If not, what properties must $f(x)$ satisfy for the above equality to be true?

I'm not a mathematician, but my hunch is that the equality holds only for $f$ such that $f(x) > 0$ for every $x \in [a,b].$ This seems to work out with some simple examples I've tried, but I haven't been able to prove it rigorously so far. I suspect the Cauchy-Schwartz inequality might come in handy, but I do not know how to use it here, unless perhaps if I interpret the definite integral as a Riemann Sum.

Yejus
  • 133
  • 1
    you can use $f=f^+-f^-$ decomposition here. You'll get either $f^+=0$ or $f^-=0$ a.e. – zwim Jul 30 '20 at 18:55
  • Equality holds precisely when one has a complex number $z$ so that $|f(x)|=zf(x), \forall x \in [a,b]$. And proof of this should follow from a careful observation of the proof of the inequality $|\int f| \le \int|f|$ – Brozovic Jul 30 '20 at 18:57
  • Your case $f>0$ you can extend to every $x \in [a,b]$, except some subset with zero measure. – zkutch Jul 30 '20 at 18:59
  • 1
    It can also be $f \lt 0$ except a set of zero measure. – Ross Millikan Jul 30 '20 at 19:08
  • 1
    @Ross&zkutch you give impression that $f=0$ is excluded, but $f$ can annulate on a set of positive measure. – zwim Jul 30 '20 at 19:13

3 Answers3

2

Let $A\subset \operatorname{supp}f$ such that $\operatorname{arg} f$ is constant on $\operatorname{supp}f\backslash A$. If there exists some $A$ satisfying this property with measure zero, then $$\left|\int_a^b f(x) \, dx\right| = \int_a^b |f(x)| \, dx$$ Proof: $$\left|\int_a^b f(x) \, dx\right| = \left| \int_{[a,b]\backslash\operatorname{supp}f} f(x) \, dx \, + \int_{\operatorname{supp}f\backslash A} f(x) \, dx \, + \int_A f(x) \, dx\right| = \left| \int_{\operatorname{supp}f\backslash A} f(x) \, dx\right|$$ Because $\int_{[a,b]\backslash\operatorname{supp}f} f(x) \, dx = 0$ and, since $A$ has measure zero, $\int_A f(x) \, dx = 0$

Since $\operatorname{arg} f$ is constant on $\operatorname{supp}f\backslash A$, $\left| \int_{\operatorname{supp}f\backslash A} f(x) \, dx\right| = \int_{\operatorname{supp}f\backslash A} \left|f(x)\right| \, dx$

Therefore, because $\int_A \left|f(x)\right| \, dx = 0$, $$\left|\int_a^b f(x) \, dx\right| = \int_{\operatorname{supp}\backslash A} \left|f(x)\right| \, dx = \int_a^b |f(x)| \, dx$$

Sandejo
  • 1,366
  • 1
  • 8
  • 14
1

It is not the case in general, take $f(x)=\cos(x)$, $a=0$ and $b=\pi$ for instance. If $f$ is such that $$ \left|\int_a^b f(x)dx\right|=\int_a^b|f(x)|dx $$ We can suppose without loss of generality that $\int_a^b f\geqslant 0$ (otherwise consider $-f$). We thus have $$ \int_a^b (|f(x)|-f(x))dx=0 $$ and $|f|-f\geqslant 0$. If $f$ is continuous then $|f|-f=0$, in the general case where $f$ is measurable, this means that $|f|-f=0$ almost everywhere. Thus the sign of $f$ is constant in the Riemann integral if $f$ is continuous (or the same almost everywhere in the Lebesgue integral).

Tuvasbien
  • 8,907
1

Let's define the positive and negative part of the function $f$

$f^+:\begin{cases} f(x) & \forall x\mid f(x)> 0\\0 & \text{elsewhere}\end{cases}\ $ and $\ \displaystyle I^+=\int_a^b f^+(x)\mathop{dx}$

$f^-:\begin{cases} -f(x) & \forall x\mid f(x)< 0\\0 & \text{elsewhere}\end{cases}\ $ and $\ \displaystyle I^-=\int_a^b f^-(x)\mathop{dx}$

We have that $f^+,f^-$ are positive functions (in loose sense) and $\begin{cases} f=f^+-f^-\\|f|=f^++f^-\end{cases}$

Thus $\displaystyle \int_a^b |f(x)|\mathop{dx}=I^++I^-\ $ and $\ \displaystyle \left|\int_a^b f(x)\mathop{dx}\right|=|I^+-I^-|=\pm(I^+-I^-)$

Equalling both gives either $2I^+=0$ or $2I^-=0$ which is equivalent in saying $f^+=0\text{ a.e}$ or $f^-=0\text{ a.e}$

This means that $f$ is of constant sign (in loose sense, can be zero) except maybe on a set of measure zero.

Note 1: for Riemann integral we would say except maybe on a countable set of points.

Note 2: if you impose $f$ continuous then you restrict to constant sign only.

zwim
  • 28,563