Proof is wrong, but I don't understand why. I recently got this question wrong on a homework and after looking at my professors explanation I'm still failing to understand what's wrong with my proof. Any help would be much appreciated.
Suppose that the function
$$f: [ 0, 1]  \rightarrow \mathbb{R}$$
is continuous and that
$$f( x) \geq 0,\; \forall x \in [ 0, 1]$$
Prove that
$$\int ^{1}_{0}  f >0$$
if and only if there is a point $x_{0} \in [ 0, 1]$  at which $f( x_{0})   > 0.$
\begin{array}{l}
Proof\ by\ contradictin:Suppose\ that\ the\ function\ f:\ [ 0,\ 1] \ \rightarrow \mathbb{R} .\ is\ continuous\ and\ that\ \\
f( x) \geq 0\ \ for\ all\ x\ in\ [ 0,\ 1] .\ prove\ that\ \int ^{1}_{0} \ f >0\ iff\ \forall x_{0} \ in\ [ 0,\ 1] \ f( x_{0}) \leq 0\\
\\
\forall x_{0} \ in\ [ 0,\ 1] \ f( x_{0}) \leq 0\ \Longrightarrow \ \int ^{1}_{0} \ f >0\\
We\ know\ that\ the\ function\ is\ always\ greater\ than\ or\ equal\ to\ zero,\ so\ for\ f( x_{0}) \ to\ be\ less\ than\ \\
or\ equal\ to\ 0,\ \forall x_{0} \ in\ [ 0,\ 1] \ \ f( x) \ must\ be\ 0\ on\ [ 0,1] \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ( 0\leq f( x_{0}) \leq 0)\\
\\
this\ means\ f\ is\ a\ constant\ ( c=0) \ on\ [ 0,1] .\\
\\
\int ^{1}_{0} \ f=0( b-a) =0\ \ \ \ \ \ \ \ \ ( example\ 6.5)\\
\\
This\ contradicts\ the\ above\ statement.\ \\
\\
\\
\int ^{1}_{0} \ f >0\ \Longrightarrow \forall x_{0} \ in\ [ 0,\ 1] \ f( x_{0}) \leq 0\\
\\
0< \int ^{1}_{0} \ f\leq U( f,\ P) =\sum ^{n}_{i=1} M_{i}( x_{i} -x_{i-1}) .\\
\\
0< \sum ^{n}_{i=1} M_{i}( x_{i} -x_{i-1}) \ \\
\therefore \ becuase\ ( x_{i} -x_{i-1}) \ is\ positive\ there\ must\ exist\ some\ M_{i}  >0\ \ \ \\
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ( the\ sum\ of\ all\ negative\ or\ zero\ numbers\ is\ \leq 0)\\
\ \ \ \ \ \ \ \ \ \ \ \\
\therefore \ \exists x_{0} \ in\ [ 0,\ 1] \ s.t.f( x_{0}) \  >\ 0\ \ \ \ \ \ \ \ \ \ \ [ M_{i} \ =\ sup\{f( x) \ |\ x\ in\ [ x_{i-1} ,\ x_{i}]\}]\\
\\
This\ contradicts\ the\ above\ statement.
\end{array}
 A: When you have an if and only if (iff) statement, you must prove it both ways.
If $\int_0^1 f(x) > 0$ then there is an $x_0\in [0,1]$ such that $f(x_{0})>0$
This direction you can prove with proof by contradiction:
Suppose $g(x) = 0$ and $f(x)\le g(x)$ for all $x\in[0,1]$ and $\int_0^1 f(x)\ dx > 0$
If $f(x) \le g(x)$ for all $x\in [a,b],$ with $f(x), g(x)$ integrable and $a<b,$  then $\int_a^b f(x)\ dx \leq \int_a^b g(x)\ dx$
$\int_0^1 f(x)\ dx \le \int_0^1 g(x)\ dx = 0$
Contradiction
However, you still must prove the other direction.
If there is an $x_{0}\in[0,1]$ such that $f(x_{0})>0,$ and $f$ is continuous on $[0,1]$, then $\int_0^1 f(x) > 0$
Since $f$ is continuous, there must be some neighborhood around $x_0$ such that $f(x) > 0$ for all $x$ in this neighborhood.
This creates a sub-interval where the integral is strictly positive.
For the remaining sub-intervals
$f(x)\ge 0$ for all $x \in [0,1]$ implies the integral is greater than or equal to zero for all sub intervals.
This makes the integral strictly positive.
