$\int_a^b |f(t)|\ dt = 0 \implies$ $f(c)=0$ for some point and $\int_a^bf(x)\ dx = \int_a^b g(x) \ dx \implies f(c) = g(c)$ for some point I have two theorems to prove. I think the first implies the second. Here are they:

Let $f:[a,b]\to \mathbb{R}$ be an integrable function. Show that if
  $\int_a^b |f(t)|\ dt = 0$ and $f$ is continuous in $c\in [a,b]$ then
  $f(c) = 0$

My attempt of proof:
$$\sum \inf (|f(t_i)|) (x_{i+1} - x_i) \le \int_a^b |f(x)| dx \le \sum \sup (|f(t_i)|) (x_{i+1} - x_i)$$
then since $\int_a^b |f(x)| \ dx = 0$ and by the squeeze theorem, we should have $\sum \inf (|f(t_i)|) (x_{i+1} - x_i) = 0$ which implies $\inf(|f(t_i)|\ge 0 \implies |f(t_i)|\ge 0\implies -f(t_i)\le 0\le f(t_i)$ . I think there's a way to argue that $f(c)=0$ for some $c\in [a,b]$ but I can't think about it.
The second theorem asks me to prove that:

$f,g:[a,b]\to \mathbb{R}$ continuous funcitons such that $\int_a^b
 f(x) \ dx = \int_a^b g(x) \ dx$. Show that there exists $c\in [a,b]$
  such that $f(c) = g(c)$

My intuition is that I should see that $\int_a^b
 f(x) \ dx = \int_a^b g(x) \ dx\implies \int_a^b f(x)-g(x) \ dx = 0$. I know somehow that I need to use the theorem above and call $h(x) = f(x) - g(x)$, then we have that $h(c) = 0$ for some $c\in [a,b]$ which implies that $f(c) = g(c)$ for some $c\in [a,b]$. Is it true that $\int_a^b f(x)-g(x) \ dx = 0\implies \int_a^b |f(x)-g(x)| \ dx = 0$?
 A: *

*For the first part, if $a \le x \le b$,
$$
    0 \le \int_{a}^{x}|f(t)|dt \le \int_{a}^{x}|f(t)|dt+\int_{x}^{b}|f(t)|dt=\int_{a}^{b}|f(t)|dt =0.
$$
Therefore $\int_{a}^{x}|f(t)|dt=0$ for all $a \le x \le b$. If $f(t)$ is continuous at some $c \in [a,b]$, then $|f(t)|$ is also continuous at $c$; then by the Fundamental Theorem of Calculus,
$$
         0=\left.\frac{d}{dx}\int_{a}^{x}|f(t)|dt\right|_{x=c} = |f(c)|.
$$

*For the second part, let
$$
         F(x)=\int_{a}^{x}(f(t)-g(t))dt.
$$
Then $F(a)=0$ and $F(b)=0$. And $F$ is differentiable on $[a,b]$ by the Fundamental Theorem of Caculus. By Rolle's Theorem, there exists $c \in (a,b)$ such that $F'(c)=0$, which gives $f(c)=g(c)$.

A: What I think you are trying to show for the first part is that if $f$ is continuous and $\int_a^b|f(t)|\;dt=0$, then $f(x)=0$ for all $x\in[a,b]$. To show this, assume that $f$ is non-zero at some point $c$, and then use the fact that $f$ is continuous to argue that there is a small neighborhood of $c$ on which $|f(x)|\geq \delta$ for some $\delta>0$. This will imply that $\int_a^b|f(t)|\;dt\neq0$, contrary to the hypothesis.
You have the right idea for the second part in looking at $h(x)=f(x)-g(x)$. If $h$ changes signs, then it must have a zero by the intermediate value theorem. So you can assume that $h$ is positive on $[a,b]$ (replacing $h$ with $-h$ if necessary), and then apply the first part.
A: Second theorem can easily be proved using mean value theorem, i.e. $h(x)=f(x)-g(x)$ continuous and $\int_{a}^{b}h(x)dx=0$ then $\exists c \in (a,b)$ such that $\int_{a}^{b}h(x)dx=h(c)\cdot(b-a)=0$ which means $h(c)=0$ or $f(c)=g(c)$.
Generally, $\int_{a}^{b} \left( f(x)-g(x) \right) dx =0 \Rightarrow \int_{a}^{b} \left| f(x)-g(x) \right| dx =0$ is not true, e.g. function $h(x)=f(x)-g(x)$ defined on $[-1,1]$ as $h(x)=\left\{\begin{matrix}
-1, x<0\\ 
1, x\geq 0
\end{matrix}\right.$
For the first one the definition of continuity will be used, i.e. $f(x)$ is continuous in $c \in [a,b]$ then $\forall \epsilon>0, \exists \delta >0$ such that for all $x$ satisfying $ |x-c|<\delta \Rightarrow |f(x) - f(c)| < \epsilon$. Now, let's assume $f(c)>0$ (assumption that $f(c)<0$ can be addressed similarly) then we can adjust $\epsilon$ and $\delta$ such that $0<f(c)-\epsilon < f(x)$ or $$0=\int_{a}^{b}\left | f(x) \right|dx=\int_{a}^{c-\delta}\left | f(x) \right|dx + \int_{c-\delta}^{c+\delta}\left | f(x) \right|dx + \int_{c+\delta}^{b}\left | f(x) \right|dx$$
$$=\int_{a}^{c-\delta}\left | f(x) \right|dx + \int_{c-\delta}^{c+\delta} f(x)dx + \int_{c+\delta}^{b}\left | f(x) \right|dx > \int_{c-\delta}^{c+\delta} \left( f(c) - \epsilon \right) dx =$$
$$=\left( f(c) - \epsilon \right) \cdot 2\delta>0$$
which is a contradiction, so $f(c)>0$ is not true. In fact, I assumed here that $c \in (a,b)$, corner cases like $c=a$ or $c=b$ can be addressed similarly.
A: For the first question: I think some contributors are missing the fact that we are only given continuity of $f$ at $c.$
Suppose $f(c)\ne 0.$ Then $|f(c)|>0.$ Now $f$ is continuous at $c, $ hence $|f|$ is continuous at $c.$ Thus there will be an interval $I$ of positive length containing $c$ such that $|f|>|f(c)|/2$ in $I.$ This implies $\int_I|f| \ge \int_I(|f(c)|/2) = (|f(c)|/2)\cdot \text { length }(I) >0.$ That's a contradiction.
