# Thread: Integral proof

1. ## Integral proof

Suppose that g: [2,8] --> R is continuous in [2,8] and g(x) greater than or equal to 0 for all x in [2,8].
Prove that if the integral from 2 to 8 of g dx =0, then g(x) =0 for all x in [2,8]

2. Originally Posted by Coda202
Suppose that g: [2,8] --> R is continuous in [2,8] and g(x) greater than or equal to 0 for all x in [2,8].
Prove that if the integral from 2 to 8 of g dx =0, then g(x) =0 for all x in [2,8]
This is a special case of a more general theorem.

Theorem: Let $f:[a,b]\to \mathbb{R}$ be a continous function with $f\geq 0$ and $\smallint_a^b f =0$ then $f=0$.

Proof: Assume by contradiction that there is a point $x_0 \in (a,b)$ so that $f(x_0) = 0$. The reason why we can ignore the endpoints is because if it was the case that $f(x) = 0$ on $(a,b)$ and $f(a),f(b)\not = 0$ then that would make $f$ non-continous at either $a$ or $b$. Now if $f(x_0)\not = 0$ then there is a $\delta > 0$ so that on $[x_0 - \delta,x_0+\delta]\subseteq [a,b]$ we have $f\not = 0$ i.e. $f > 0$. Since $f$ is continous on this closed subinterval it means it attains a mimimum $m>0$. Now define the function $g:[a,b]\to \mathbb{R}$ in the following way: if $x\in [x_0-\delta,x_0+\delta]$ then $g(x) = m$ otherwise $g(x) = 0$. Note $g$ is integrable. It follows that $\smallint_a^b g \leq \smallint_a^b f \implies 2m\delta \leq \smallint_a^b f$.
But $2m\delta > 0$ would would mean $\smallint_a^b f > 0$ a contradiction.