Proof for Integral Inequality $|\int f| \le \int |f|$ - is it sufficient enough?

Claim: If f is integrable, $\left|\int_a^bf(x)dx\right|\le\int_a^b|f(x)|dx$

Proof (attempt):

We know $-|f|\le f \le|f|$,

so $\int-|f| \le \int f \le \int|f|$.*

Since, if $-b<a<b$, we say $|a|<b$,

we can say $|\int f| \le \int |f|$

*: Is this true? If so, how can I prove this?

Would this be a rigorous enough proof (well, I did neglect to write out a,b for the integrals, but besides that)? It just seems too simple for some reason.


Solution 1:

You have the right ideas, but you worry too much about $a$ and $b$. The correct way to state this proof would be to say this :

Since $$-|f(x)| \le f(x) \le |f(x)|,$$ you have $$ - \int_a^b |f(x)| \, dx = \int_a^b -|f(x)| \, dx \le \int_a^b f(x) \, dx \le \int_a^b |f(x)| \, dx$$ and therefore $$ \left| \int_a^b f(x) \, dx \right| \le \int_a^b |f(x)| \, dx. $$

P.S. : I am using the fact that $f \le |f|$ implies $\int f \le \int|f|$, and the linearity of the integral when I pull out the minus. I don't know if you are working with the Riemann or the Lebesgue integral, but it both cases it is usually proven during the course.

Hope that helps,

EDIT : I understand that your problem was to find out why if $f$ was integrable then so was $|f|$. If you use the Lebesgue integral, saying that $f$ is integrable is an exact synonym of saying that $|f|$ is since $|f| = \|f\|$. If you are working with the Riemann integral, note that $g(x) = |x|$ is a continuous function, and it is shown that the composition of a continuous function and an integrable one remains integrable in many analysis texts. Perhaps you should use this.

Solution 2:

Your proof looks OK, but a few comments...

(1) It is a fact that if $g(x) \leq f(x)$ for all $x \in [a,b]$ then $\int_a^b g(x) dx \leq \int_a^b f(x) dx$, and your inequality (*) follows from that. If you've proven that fact in class (and I'm guessing you have) then it's OK to use it in your proof.

(2) To hit the final step in your proof, you technically will want $\int - |f| = - \int |f|$. That's also true, and I'm guessing you've proven that in class too.

Solution 3:

With the Lebesgue's theory, your claim is just a comment that follows a sequence of observations after the definition of integrable function.

I recall this exercise from early courses. So, I think that the OP talks about the Riemann integral. As I said in the comments, all the reasoning with the inequalities is correct provided that we are working with Riemann integrable functions. Let me see why this is the case.

Theorem If $f$ is Riemann integrable in $[a,b]$, then $|f|$ is Riemann integrable in $[a,b]$.

Proof. Let $P=\{a=x_0,\ldots x_n=b\}$ a partition of $[a,b]$. For each $k\in \{1,\ldots,n\}$ let $M_k(f)=\sup f([x_{k-1},x_k])$ and $m_k(f)=\inf f([x_{k-1},x_k])$. Then we have $$\begin{align*} M_k(|f|)-m_k(|f|)&=\sup \{|f(x)|-|f(y)|:x,y\in [x_{k-1},x_k]\}\tag{1}\\ &\leq \sup \{|f(x)-f(y)|:x,y\in [x_{k-1},x_k]\}\\ &= M_k(f)-m_k(f), \end{align*}$$ multiplying both sides by $x_k-x_{k-1}$ and summing over $k$ we get $$0\leq U(P,|f|)-L(P,|f|)\leq U(P,f)-L(P,f).$$ Since $f$ is integrable, we can do the difference between the upper and lower sums as small as we want by taking the correct partitions. The above inequality shows that we can do the same with the upper and lower sums of $|f|$, and that implies that $|f|$ is integrable in $[a,b]$.

To see why $(1)$ holds, pick $k\in\{1,\ldots,n\}$. For each $x,\ y\in[x_{k-1},x_k]$, we know that $$M_k(|f|)\geq |f(x)|\qquad\text{and}\qquad -m_k(|f|)\geq -|f(y)|.$$ So $$M_k(|f|) - m_k(|f|)\geq |f(x)| - |f(y)|\qquad \forall x,y\in [x_{k-1},x_k],$$ $$M_k(|f|) - m_k(|f|)\geq \sup\{|f(x)| - |f(y)| : x,y\in [x_{k-1},x_k]\}.$$

In the other hand, by the properties of the sup, for each $j\in\mathbb N$, there are $x_j\ y_j\in [x_{k-1},x_k]$ such that $$\sup\{|f(x)| - |f(y)| : x,y\in [x_{k-1},x_k]\} - \frac 1j \leq |f(x_j)| - |f(y_j)|,$$ but $|f(x_j)| - |f(y_j)|\leq M_k(|f|) - m_k(|f|)$ for each $j$ as we saw above, so we get $$\sup\{|f(x)| - |f(y)| : x,y\in [x_{k-1},x_k]\} - \frac 1j \leq M_k(|f|) - m_k(|f|)\qquad \forall j\in\mathbb N,$$ thus \begin{align*} \lim_{j\to\infty} \left(\sup\{|f(x)| - |f(y)| : x,y\in [x_{k-1},x_k]\} - \frac 1j\right) &\leq M_k(|f|) - m_k(|f|)\\ \sup\{|f(x)| - |f(y)| : x,y\in [x_{k-1},x_k]\} &\leq M_k(|f|) - m_k(|f|). \end{align*} Therefore, $(1)$ holds for each $k\in\{1,\ldots,n\}$.