The mean value theorem states that if f is a continuous function on the closed interval [a,b] and differentiable on the open interval, then there exists a number c in (a,b) such that the tangent at c is parallel to the secant line through the endpoints, that is, $f’(c) = \frac{f(b)-f(a)}{b-a}$. Figure 1.e.

Geometrically, it states that **the slope of the secant line is the same as the slope of the tangent line at x = c**. Physically, there is a point at which the average velocity is equal to instantaneous velocity.

Be cautious. If f is not differentiable, even at a single point, the result may not hold. For example, the function f(x) = |x| - 1 is continuous over [-1, 1], f(-1) = f(1) = 0, but f’(c) ≠ 0 ∀c ∈ (-1, 1)

Proof.

We will use Rolle’s Theorem. If a real-valued function f is continuous on a proper closed interval [a, b], differentiable on the open interval (a, b), and f (a) = f (b), then there exists at least one c in the open interval (a, b) such that f’(c) = 0.

Let $g(x) = f(x) - \frac{f(b)-f(a)}{b-a}x$

$g(a) = f(a) - \frac{f(b)-f(a)}{b-a}a = f(a)(1+\frac{a}{b-a})- a\frac{f(b)}{b-a} = f(a)\frac{b}{b-a}- f(b)\frac{a}{b-a}$

$g(b) = f(b) - \frac{f(b)-f(a)}{b-a}b = f(b)(1-\frac{b}{b-a})+ b\frac{f(a)}{b-a} = f(b)\frac{-a}{b-a}+ f(a)\frac{b}{b-a} = g(a)$

Therefore, ∃c ε (a, b): g’(c) = 0

$g’(c) = 0 = f’(c) - \frac{f(b)-f(a)}{b-a}$

Let’s suppose f is continuous on the interval [a, b], and diferenciable on (a, b).

- If f’(x) > 0 ∀x ∈ (a, b), then f is increasing on (a, b).
- If f’(x) < 0 ∀x ∈ (a, b), then f is decreasing on (a, b).
- If f’(x) = 0 ∀x ∈ (a, b), then f is constant on (a, b).

Proof:
∀ x_{1}, x_{2} ∈ (a, b), x_{1} < x_{2}, then $x_2-x_1>0$ and the Mean Value Theorem guarantees that we can find a c ∈ (x_{1}, x_{2}): $\frac{f(x_2)-f(x_1)}{x_2-x_1}=f’(c)$ ⇒ $f(x_2)=f(x_1)+f’(c)(x_2-x_1)$

- If f’(x) > 0 ∀x ∈ (a, b) ⇒ f’(c) > 0 ⇒ f(x
_{2}) > f(x_{1}) ⇒ f is increasing. - If f’(x) < 0 ∀x ∈ (a, b) ⇒ f’(c) < 0 ⇒ f(x
_{2}) < f(x_{1}) ⇒ f is decreasing. - If f’(x) = 0 ∀x ∈ (a, b) ⇒ f’(c) = 0 ⇒ f(x
_{2}) = f(x_{1}) ⇒ f is constant.

Exercise 1: e^{x} > x + 1 ∀x >0. Let be f(x) = e^{x} -x -1. f(0) = 0, f’(x)>0 ⇒ f is increasing ∀x >0 ⇒ f(x) > 0 ∀x >0 ⇒ e^{x} > x + 1 ∀x >0

Exercise 2: e^{x} > x + 1 + $\frac{x^{2}}{2},$∀x >0. Let be g(x) = e^{x} -x -1 -$\frac{x^{2}}{2}$, g(0) = 0, g’(x) = e^{x} -1 -x > 0 ∀x >0 (Exercise 1) ⇒ g is increasing ⇒ g(x) > 0 ∀x >0 ⇒ e^{x} > x + 1 + $\frac{x^{2}}{2},$∀x >0

Futhermore, e^{x} > x + 1 + $\frac{x^{2}}{2} + \frac{x^{3}}{3.2} + …$, but in the infinite they are both equal.

**Fermat’s Theorem**. If a function ƒ(x) is defined on the interval (a, b), it has a local extremum (relative extrema) on the interval at x = c, and ƒ′(c) exists, then x = c is a critical point of f(x) and f'(c) = 0 (Figure 1.a.)

Proof:

Let’s assume that f(x) has a relative maximum to do the proof. The proof for a relative minimum is pretty identical.

$f’(c)=\lim_{h \to 0}=\frac{f(c+h)-f(c)}{h}=\lim_{h \to 0^{+}}\frac{f(c+h)-f(c)}{h}≤0$ because we are dividing f(c+h)-f(c)≤0 and h>0 (Figure 1.b.). Observe that f(c) ≥ f(c+h) for all h that are sufficiently close to zero (c is a relative maximum). Therefore, f’(c) ≤ 0.

$f’(c)=\lim_{h \to 0}=\frac{f(c+h)-f(c)}{h}=\lim_{h \to 0^{-}}\frac{f(c+h)-f(c)}{h}≥0$ because we are dividing f(c+h)-f(c) ≤ 0 and h<0. Therefore, f’(c) ≥ 0. We have already shown that f’(c) ≤ 0 and f’(c) ≥ 0, so f’(c) = 0.

**Rolle’s Theorem.** It states that any real-valued differentiable function that has equal values at two distinct points must have at least one stationary point somewhere between them, that is, a point where the first derivative is zero. If a real-valued function f is continuous on a proper closed interval [a, b], differentiable on the open interval (a, b), and f (a) = f (b), then there exists at least one c in the open interval (a, b) such that f'(c) = 0 (Figure 1.c, 1.d).

Proof. There are two cases.

- f(x) = k, ∀x in [a, b] where k is a constant. ⇒ f’(x) = 0 ∀x in [a, b], and we can take c to be any number in the interval.
- Since f is continuous on [a, b] by the
**Extreme Value Theorem**we know that the function must have a maximum M and a minimum on the interval m.

M ≠ m. Otherwise, if M = m, then f is constant ∀x in [a, b].

Assume M ≠ m. If f(a)=M, then f(b) = f(a) = M ⇒ m have to occur in the open interval (a, b). Therefore, there is at least one maximum or minimum in the open interval (a, b).

Without lose of generosity, let’s assume that f has a maximum in the open interval (a, b), that is, f has a maximum at some c in (a, b) ⇒ [by Fermat’s Theorem and f is differentiable on the open interval (a, b), so f’(c) exists] f’(c) = 0.

The maxima and minima of a function, known collectively as extrema are the largest and smallest value of the function, either within a given range (the local or relative extrema), or on the entire domain.

Definitions. f(x) has an **absolute or global maximum** at x = c if f(x)≤f(x) ∀x ∈ D, that is, for every x in the domain we are working on. f(x) has an **absolute or global minimum** at x = c if f(x)≥f(x) ∀x ∈ D.

f(x) has a **relative global maximum** at x = c if f(x)≤f(x) ∀x in the neighborhood of c, that is, for every x in (b-ε, b+ε). f(x) has a **relative minimum** at x = c if f(x)≥f(x) ∀x in the neighborhood of c.

**Extreme Value Theorem**. If f is a continuous function on an interval [a,b], then f has both a maximum and minimum values on [a,b]. It states that if a function is continuous on a closed interval, then **the function must have a maximum and a minimum on the interval** (Figure 1.f.)

Definition. Let S be a non-empty set of real numbers. A real number M is called an upper bound or majorant for S if M ≥ s ∀s ∈ S. A real number M is the **least upper bound or supremum** for S if M is both an upper bound for S and also M ≤ y for every upper bound y of S.

Lemma. Let S be a non-empty set of real numbers with a supremum M. Then, **there is a sequence {s _{n}} that converges to the supremum, that is, {s_{n}}→M**.

For every N consider M -^{1}⁄_{N}. It is pretty obvious that M -^{1}⁄_{N} < M. M is a supremum, so by definition there is some (aka some element in S better than M -^{1}⁄_{N}) S_{n}ε S such that M -^{1}⁄_{N} < s_{n} ≤ M. By the Squeeze theorem, M -^{1}⁄_{N}→M, M→M, then s_{n} →M.

Definition. A function is **bounded** if for all x in the domain of f there is a real M such that |f(x)| ≤ M.

**Boundedness theorem**. If f(x) is continuous on [a,b] then it is bounded on [a,b].

Be careful, f(x) = ^{1}⁄_{x} is not bounded on (0, 1) -Figure 1.g.-

Proof. Suppose the function is not bounded on [a,b] ⇒ ∃x_{n} ∈ [a,b] such that |f(x_{n})| > n.

Because [a,b] is obviously bounded, the Bolzano–Weierstrass theorem implies there exists a convergent subsequence {x_{nk}} of {x_{nk}} with {x_{nk}} → x_{0}. As [a,b] is closed, it contains x_{0}.

Since f is continuous and {x_{nk}} → x_{0}, {|f(x_{nk})|} → |f(x_{0})| and |f(x_{0})| is a real number.

However, |f(x_{n})| > n ⇒ [and every subsequence do so, too] |f(x_{nk})| > nk, which implies {f(x_{nk})} diverges. That’s a contradiction.

The **least-upper-bound property** states thatany non-empty set of real numbers that has an upper bound must have a least upper bound or supreme in real numbers.

Note: It is false for ℚ, S = {x∈ℚ: x^{2} < 2} in $(-\sqrt{2}, \sqrt{2})$. This is true because of the completeness of the real numbers. It implies that **there are no gaps or missing points" in the real number line**.

**Bolzano–Weierstrass theorem** states that each infinite bounded sequence in ℝ^{n} has a convergent subsequence.

Proof (Extreme Value Theorem).

Let’s show that the function has a maximum. To prove that the function has a minimum, use -f.

By the boundedness theorem, there is a C > 0, |f(x)| ≤ C ∀x ∈ [a,b]

Let S = {f(x) : x ∈ [a,b]}. Since f is bounded, so S is bounded. Hence (by **the least-upper-bound property**) S has a least upper bound M.

By our previous lemma, there is a sequence {y_{n}} in S such that {y_{n}} → M

{y_{n}} = {f(x_{n})} → M, x_{n} ∈ [a,b]

X_{n} is obviously bounded (between a and b), therefore by the Bolzano–Weierstrass theorem, there is a convergent subsequence, {x_{nk}} → x_{0} ∈ [a,b].

Let’s prove f(x_{0})=M.

Since {x_{nk}} → x_{0} and f is continuous ⇒ {f(x_{nk})} → f(x_{0}). We already know that {y_{n}} = {f(x_{n})} → M, so any subsequence {x_{nk}} must also convert to M, {f(x_{nk})} → M, and therefore f(x_{0})=M.

f(x_{0}) = M and M is the least upper bound or supreme of S = {f(x) : x ∈ [a,b]}, f(x_{0}) = M ≥ f(x) ∀x ∈ [a,b], so M is the maximum of f in [a,b].

The term differential is used in calculus to refer to an infinitesimal, that is, infinitely small, change in some varying quantity. It is possible to relate to infinite small changes of various variables to each other using derivatives. If y is a function of x, then the differential dy of y is related to dx by dy = f’(x)dx or equivalently $\frac{dy}{dx} = f’(x)$.

There is an interpretation of derivate as a ratio of infinitesimals. Basically, dx and dy replace $\Delta x$ and $\Delta y$.