Newton-Leibniz theorem

Let $$F(x)$$ be such function that the (continuous) function $$f(x)$$ is its derivative i.e $$f(x)=dF(x)/dx$$ or $$F(x)$$ is the primitive function of $$f$$ then the definite integral $$\int\limits_a^b f(x) \mathrm dx$$ is the area under the curve drawn by (positive) $$f$$ and

$$\int\limits_a^b f(x) \mathrm dx = F(b) - F(a)$$.

Proof
We will limit ourselves to the positive function in the interval $$\scriptstyle [a, b]$$.

Let us estimate the area under the graph of the function $$f$$ by dividing densely the interval $$\scriptstyle [a, b]$$ into sub-intervals with the ending points $$x_i$$ and with the length $$dx$$ and such that $$x_0 = a$$ and $$x_n=b$$. If the $$dx$$ is small then between the two consecutive nodes $$x_i$$ and $$x_{i+1}$$, we can assume that $$f(x_i)$$ approximate $$f(x_{i+1})$$, and the function $$f$$ is approximately linear and therefore the area under it can be approximated by the rectangle area with the width $$dx$$ and height $$f(x_i)$$


 * $$P_i = f(x_i){dx}$$

Then the total area under the graph of the function will be estimated as


 * $$P = \sum P_i $$

Let $$F$$ be the primitive function of the function $$f$$. Then we can also estimate its derivative as


 * $$f(x_i) = [F(x_{i+1}) - F(x_i)]/ dx $$

Now in the formula for $$P$$ we can re-express each value of $$f(x_i)$$ by values of $$F(x_i)$$ and $$F(x_{i+1})$$ (the same $$dx$$ in nominator and denominator cancels out)
 * $$P = F(x_{1}) - F(x_0) + F(x_2) - F(x_1) + F(x_3) - F(x_2 ) + ... + F(x_{n}) - F(x_{n-1})+ \Theta(dx)$$

Because the majority of the sum contributions show up it the sum twice but with the opposite sign and therefore cancels out we get the expression for the total area with the accuracy up the the small term in $$dx$$, $$\Theta(dx)$$ which contains the endpoints terms, as
 * $$P = F(x_{n})- F(x_{0}) + \Theta(dx) = F(b) - F(a) + \Theta(dx)$$.

This proves the theorem. Note that the prove readily extends to the function $$f$$ that is nether continuous or positive everywhere when the above arguing is used piecewise in intervals between the sign change (when the function $$f$$ is negative the area between the x-axis and the function graph is than taken negative or with the negative sign) or between the discontinuity (the primitive function $$F$$ stays continuous but its curve may have sharp edges and $$f$$  may have a sudden jump in value).