Let $S_n:= \frac{b-a}{n}\sum_{i=1}^{n}f(t_{i,n})$. Prove: $\lim_{n\to\infty}S_n = \int_a^bf(x)\ dx$. I will post the assignment and then my attempt at solving it.

Let $a,b \in \mathbb{R}$ with $a<b$ and let $f: [a,b] \rightarrow \mathbb{R}$ be a continous function. We'll now define a sequence of Rieman Sums with an equidistant partition.
For $n \in \mathbb{N}$$$S_n:= \frac{b-a}{n}\sum_{i=1}^{n}f(t_{i,n})$$
and while $1≤i≤n$ $$t_{i,n}\in \left[a+ \frac{b-a}{n}(i-1),a+\frac{b-a}{n}i\right].$$
Show that the following integral equals the limit of the sequence $(S_n)\_{n≥1}$:
$$\lim_{n\to\infty}S_n = \int_a^bf(x)\ dx$$

Now my attempt:

For $I \in \mathbb{R}$ and $f: [a,b] \rightarrow \mathbb{R}$ the following assertions are equivalent:
(i) $\int_a^bf(x)\ dx = I $
(ii) $\forall\epsilon>0 \ $ there are stepfunctions such that $I - \int_a^b\phi(x)\ dx ≤ \epsilon$ and $\int_a^b\psi(x)\ dx - I≤\epsilon$. $\phi ≤ f ≤ \psi$
I'll show the second inequality the first should be proven similarly. I know that for a partition $x_i$ such that $\psi_{|(x_{i-1},x_i)} = c_i$ and stepfunctions that: $$\int_a^b\psi(x)dx = \sum_{i=1}^nc_i(x_i-x_{i-1})$$ I define the partition $(x_i)_{0≤i≤n}: a=x_0<x_1<...<x_{n-1}<x_n=b$ such that $\forall n\in\mathbb{N}: x_n-x_{n-1} = \frac{b-a}{n}$ Furthermore I define my step function $\psi$ such that $\psi_{|(x_{i-1},x_i)} = \sup (f(x)$, $ x\in (x_{i-1},x_i))$ so that obviously $\psi ≥ f$. Plugging my newly defined partition and stepfunction into the formula above yields
  $$\int_a^b\psi(x)dx = \frac{b-a}{n}\sum_{i=1}^n\max (f(x),  x\in (x_{i-1},x_i))$$
  Substituting $\int_a^b\psi(x)dx$ and $I$ with $S_n$ in the inequality to prove gives
  $$\frac{b-a}{n}\sum_{i=1}^n\sup (f(x),  x\in (x_{i-1},x_i)) - \frac{b-a}{n}\sum_{i=1}^{n}f(t_{i,n}) $$
$$= \frac{b-a}{n}\sum_{i=1}^n(\sup (f(x),  x\in (x_{i-1},x_i)) - f(t_{i,n}))  $$.
As we're now taking the limit of $n \to \infty$ we observe that our partition gets infintely refined such that the distance of two function values of $\max (f(x),  x\in (x_{i-1},x_i)) - f(t_{i,n})$  gets infinitely small such that the above $\sum < \infty$. And since $\frac{b-a}{n}$ converges to $0$ we have $\forall \epsilon > 0$ that
$$\lim_{n \to \infty} \frac{b-a}{n}\sum_{i=1}^n(\sup (f(x),  x\in (x_{i-1},x_i)) - f(t_{i,n})) = 0 ≤ \epsilon$$

I would really, really appreciate it if someone could read through my proof and point out any mistakes. If my proof is completely wrong I'd appreciate hints and help in order to get the correct solution.
 A: 
For $I \in \mathbb{R}$ and $f: [a,b] \rightarrow \mathbb{R}$ the following assertions are equivalent:
(i) $\int_a^bf(x)\ dx = I $
(ii) $\forall\epsilon>0 \ $ there are stepfunctions such that $I - \int_a^b\phi(x)\ dx ≤ \epsilon$ and $\int_a^b\psi(x)\ dx - I≤\epsilon$. $\phi ≤ f ≤ \psi$

I assume this is your definition of integral.

I'll show the second inequality the first should be proven similarly. I know that for a partition $x_i$ such that $\psi_{|(x_{i-1},x_i)} = c_i$ and stepfunctions that: $$\int_a^b\psi(x)dx = \sum_{i=1}^nc_i(x_i-x_{i-1})$$ I define the partition $(x_i)_{0≤i≤n}: a=x_0<x_1<...<x_{n-1}<x_n=b$ such that $\forall n\in\mathbb{N}: x_n-x_{n-1} = \frac{b-a}{n}$ Furthermore I define my step function $\psi$ such that $\psi_{|(x_{i-1},x_i)} = \max (f(x)$, $ x\in (x_{i-1},x_i))$ so that obviously $\psi ≥ f$. Plugging my newly defined partition and stepfunction into the formula above yields

Max of a continuous function over an open interval isn't defined, either change to sup or the closed interval. You also need to define the step function on the endpoints of the intervals (a minor point) - I'd just define $\psi(a)=f(a)$ then each time define it on $(x_i,x_{i+1}]$
Also you used $n$ both as a fixed number to define the number of points in the partition, and in the line describing each element of the partition (as well as it not being described completely clearly) - I'd replace "  I define the partition $(x_i)_{0≤i≤n}: a=x_0<x_1<...<x_{n-1}<x_n=b$ such that $\forall n\in\mathbb{N}: x_n-x_{n-1} = \frac{b-a}{n}$  " with " Define a partition $(x_i)_{0\leq i \leq n}$ by $x_i = a + i \frac{b-a}{n}$ for $0\leq i \leq n$; so in particular, $x_{i+1}-x_i = \frac{b-a}{n}$ for each $i$".

$$\int_a^b\psi(x)dx = \frac{b-a}{n}\sum_{i=1}^n\max (f(x),  x\in (x_{i-1},x_i))$$
  Substituting $\int_a^b\psi(x)dx$ and $I$ with $S_n$ in the inequality to prove gives
  $$\frac{b-a}{n}\sum_{i=1}^n\max (f(x),  x\in (x_{i-1},x_i)) - \frac{b-a}{n}\sum_{i=1}^{n}f(t_{i,n}) $$
$$= \frac{b-a}{n}\sum_{i=1}^n(\max (f(x),  x\in (x_{i-1},x_i)) - f(t_{i,n}))  $$.
As we're now taking the limit of $n \to \infty$ we observe that our partition gets infintely defined such that the distance of two function values of $\max (f(x),  x\in (x_{i-1},x_i)) - f(t_{i,n})$  gets infinitely small such that the above $\sum < \infty$. And since $\frac{b-a}{n}$ converges to $0$ we have $\forall \epsilon > 0$ that
$$\lim_{n \to \infty} \frac{b-a}{n}\sum_{i=1}^n(\max (f(x),  x\in (x_{i-1},x_i)) - f(t_{i,n})) = 0 ≤ \epsilon$$

My main issue is here; what do you mean by "infinitely defined"?
What you want to do is use the uniform continuity of $f$ to find $n$ that makes the step functions uniformly close. Let $\epsilon>0$; as $f$ is uniformly continuous, there exists $\delta > 0$ such that whenever $x,y\in [a,b]$ and $|x-y|<\delta$, $|f(x)-f(y)|<\epsilon/(b-a)$. 
Now, take $n$ sufficiently large such that $\frac{b-a}{n}<\delta$. For each $0\leq i \leq n-1$, take $y_i \in [x_i,x_{i+1}]$ with $f(y_i)=\sup_{[x_i,x_i+1]}f(x)$. Hence for each $x\in (x_i,x_{i+1}]$, because $|y_i-x|<\delta$ and $f(y_i)=\psi(x)$, we have $|\psi(x)-f(x)|<\frac{\epsilon}{b-a}$. It then follows from monotonicity of the integral that $\int_a^b\psi(x)dx-I\leq\epsilon$.
