Study Guides / Calculus I / Exercise session 10
EXERCISE SESSION 10 · ETH ZURICH · FS20 · calculus

Derivatives, Extrema and Convex Functions

Differentiable, derivative, monotonicity and derivative, convex functions, Jensen

SB
Steven Battilana Quant · ex-ETH

Derivatives and Differentiation Rules (Reminder)

Throughout this chapter, let Ω⊂R\Omega \subset \mathbb{R} be open, f:Ω→R,  x0∈Ωf: \Omega \to \mathbb{R}, \; x_0 \in \Omega, unless defined otherwise.

Definition 1.1 (Struwe 5.1.1)
  1. ff is called differentiable at the point x0x_0 if the limit

    lim⁡x→x0,    x≠x0f(x)−f(x0)x−x0=:f′(x0)=:dfdx(x0)\lim_{x \to x_0, \;\; x \neq x_0} \frac{ f(x) - f(x_0) }{x - x_0} =: f'(x_0) =: \frac{\text{d}f}{\text{dx}} (x_0)

    exists. In this case f′(x0)f'(x_0) is called the derivative (the differential) of ff at the point x0x_0.

  2. Analogously, f=(f1,...,fn):Ω→Rnf = (f_1, ..., f_n): \Omega \to \mathbb{R}^n is called differentiable at the point x0x_0 if each of the component functions fif_i is differentiable at the point x0x_0, and f′(x0)=(f1′(x0),...,fn′(x0))f'(x_0) = (f_1'(x_0), ..., f_n'(x_0)).

Definition 1.2 (Struwe 5.1.2)

f:Ω→Rnf: \Omega \to \mathbb{R}^n is called differentiable on Ω\Omega if ff is differentiable at every point x0∈Ωx_0 \in \Omega.

Satz 1 (Struwe 5.1.1)

If f:Ω→Rf: \Omega \to \mathbb{R} is differentiable at the point x0∈Ωx_0 \in \Omega, then ff is also continuous at the point x0x_0.

Satz 2 (Struwe 5.1.2)

Let f,g:Ω→Rf,g: \Omega \to \mathbb{R} be differentiable at the point x0∈Ωx_0 \in \Omega. Then the functions f+gf+g, f⋅gf \cdot g and, if g(x0)≠0g(x_0) \neq 0, also the function f/gf/g are differentiable at the point x0x_0, and

  1. Linearity:

    (f+g)′(x0)=f′(x0)+g′(x0)(f+g)'(x_0) = f'(x_0) + g'(x_0)
  2. Product rule:

    (fg)′(x0)=f′(x0)g(x0)+f(x0)g′(x0)(fg)'(x_0) = f'(x_0)g(x_0) + f(x_0)g'(x_0)
  3. Quotient rule:

    (f/g)′(x0)=f′(x0)g(x0)−f(x0)g′(x0)g2(x0).(f/g)'(x_0) = \frac{ f'(x_0)g(x_0) - f(x_0)g'(x_0) }{g^2(x_0)}.
Satz 3 (chain rule; Struwe 5.1.3)

Let f:Ω→Rf: \Omega \to \mathbb{R} be differentiable at the point x0∈Ωx_0 \in \Omega and let g:R→Rg: \mathbb{R} \to \mathbb{R} be differentiable at the point y0=f(x0)y_0 = f(x_0). Then the function g∘f:Ω→Rg \circ f: \Omega \to \mathbb{R} is differentiable at the point x0x_0, and

(g∘f)′(x0)=g′(f(x0))f′(x0).(g \circ f)'(x_0) = g'(f(x_0)) f'(x_0).
Example 1.1

Compute the derivative of ∣sin⁡(x)∣cos⁡(x)|\sin(x)|^{\cos(x)}.

Show solutionHide solution

We rewrite the expression:

∣sin⁡(x)∣cos⁡(x)=elog⁡(∣sin⁡(x)∣cos⁡(x))=ecos⁡(x)log⁡∣sin⁡(x)∣\begin{aligned} |\sin(x)|^{\cos(x)} &= e^{\log (|\sin(x)|^{\cos(x)}) }\\ &= e^{\cos(x) \log |\sin(x)|} \end{aligned}

Now use the chain rule and the product rule:

ddx∣sin⁡(x)∣cos⁡(x)=ddxecos⁡(x)log⁡∣sin⁡(x)∣=ecos⁡(x)log⁡∣sin⁡(x)∣ddx(cos⁡(x)log⁡∣sin⁡(x)∣)=ecos⁡(x)log⁡∣sin⁡(x)∣(−sin⁡(x)log⁡∣sin⁡(x)∣+cos⁡(x)⋅ddxlog⁡∣sin⁡(x)∣)\begin{aligned} \frac{d}{dx} |\sin(x)|^{\cos(x)} &= \frac{d}{dx} e^{\cos(x) \log |\sin(x)|}\\ &= e^{\cos(x) \log |\sin(x)|} \frac{d}{dx} (\cos(x) \log |\sin(x)|)\\ &= e^{\cos(x) \log |\sin(x)|} \left( -\sin(x) \log |\sin(x)| + \cos(x) \cdot \frac{d}{dx} \log |\sin(x)| \right) \end{aligned}

Let us look at the derivative of the logarithm a little more closely:

ddxlog⁡(f(x))={ddxlog⁡(f(x))=1f(x)⋅f′(x)=f′(x)f(x),f(x)>0ddxlog⁡(−f(x))=1−f(x)⋅(−f′(x))=f′(x)f(x),f(x)<0⟺ddxlog⁡(f(x))=f′(x)f(x).\begin{aligned} \frac{d}{dx} \log(f(x)) &= \begin{cases} \frac{d}{dx} \log(f(x)) = \frac{1}{f(x)} \cdot f'(x) = \frac{f'(x)}{f(x)}, &f(x) > 0\\ \frac{d}{dx} \log(-f(x)) = \frac{1}{-f(x)} \cdot (-f'(x)) = \frac{f'(x)}{f(x)}, &f(x) < 0 \end{cases}\\ \Longleftrightarrow \qquad \frac{d}{dx} \log(f(x)) &= \frac{f'(x)}{f(x)}. \end{aligned}

So the following is our solution:

ddx∣sin⁡(x)∣cos⁡(x)=ecos⁡(x)log⁡∣sin⁡(x)∣(−sin⁡(x)log⁡∣sin⁡(x)∣+cos⁡(x)⋅cos⁡(x)sin⁡(x))=∣sin⁡(x)∣cos⁡(x)(−sin⁡(x)log⁡∣sin⁡(x)∣+cos⁡2(x)sin⁡(x)).\begin{aligned} \frac{d}{dx} |\sin(x)|^{\cos(x)} &= e^{\cos(x) \log |\sin(x)|} \left( -\sin(x) \log |\sin(x)| + \cos(x) \cdot \frac{\cos(x)}{\sin(x)} \right)\\ &= |\sin(x)|^{\cos(x)} \left( -\sin(x) \log |\sin(x)| + \frac{\cos^2(x)}{\sin(x)} \right). \end{aligned}
Satz 4 (Königsberger differentiability theorem, p. 165)

Let f:Ω→Cf: \Omega \to \mathbb{C} be continuous and differentiable on Ω∖{x0}\Omega \setminus \{x_0\}. Suppose the derivative f′f' (which exists on Ω∖{x0}\Omega \setminus \{x_0\}) has a continuous extension at a point x0∈Ωx_0 \in \Omega. Then ff is differentiable at x0x_0, and f′(x0)=lim⁡x→x0f′(x)f'(x_0) = \lim_{x \to x_0} f'(x).

Remark
arctan⁡′(x)=1x2+1.\arctan'(x) = \frac{1}{x^2 + 1}.
Remark

To show monotonicity, you can proceed as follows: replace nn by the continuous variable xx and compute the derivative with respect to xx. If a′(x)≥0a'(x) \geq 0 or a′(x)≤0a'(x) \leq 0 respectively, then the sequence is monotonically increasing or monotonically decreasing respectively.

Extrema

Throughout this chapter, let Ω⊂R\Omega \subset \mathbb{R} be open, f:Ω→Rf: \Omega \to \mathbb{R}, unless defined otherwise.

Definition 2.1 (Struwe 5.4.2)
  1. ff is called mm times differentiable on Ω\Omega if ff is (m−1)(m-1) times differentiable with differentiable (m−1)(m-1)-th derivative f(m−1)f^{(m-1)}.
    In this case

    f(m)=df(m−1)dx=dmfdxm:Ω→Rf^{(m)} = \frac{\text{d}f^{(m-1)}}{\text{dx}} = \frac{\text{d}^m f}{\text{dx}^m}: \Omega \to \mathbb{R}

    is called the mm-th derivative of ff.

  2. ff is of class Cm(Ω)C^m(\Omega) if ff is mm times differentiable and the functions f=f(0),  f′=f(1),...,f(m)f = f^{(0)}, \; f' = f^{(1)}, ..., f^{(m)} are continuous.

Corollary 2.1 (Struwe 5.5.1)

A point x0∈Ωx_0 \in \Omega is called a (strict) local minimum point of ff if, in a neighbourhood UU of x0x_0,

f(x)≥f(x0),    ∀x∈U(or f(x)>f(x0),    ∀x∈U∖{x0}).f(x) \geq f(x_0), \;\; \forall x \in U \quad (\text{or } f(x) > f(x_0), \;\; \forall x \in U \setminus \{x_0\}).
Corollary 2.2 (Struwe 5.5.1)

Let f∈Cm(Ω),  x0∈Ωf \in C^m(\Omega), \; x_0 \in \Omega with f′(x0)=...=f(m−1)(x0)=0.f'(x_0) = ... = f^{(m-1)}(x_0) = 0.

  1. If m=2k+1m=2k+1 and x0x_0 is a local minimum point, then f(m)(x0)=0f^{(m)}(x_0) = 0.
  2. If m=2km=2k and f(m)(x0)>0f^{(m)}(x_0) > 0, then x0x_0 is a strict local minimum point.
Satz 5 (Struwe 5.5.4)

Every polynomial p:C→Cp: \mathbb{C} \to \mathbb{C} of degree ≥1\geq 1 has (at least) one root.

Convex Functions and Jensen

Definition 3.1

A function f:Ω⊂R→Rf: \Omega \subset \mathbb{R} \to \mathbb{R} is called convex if

f(λx1+(1−λ)x2)≤λf(x1)+(1−λ)f(x2)f(\lambda x_1 + (1-\lambda) x_2) \leq \lambda f(x_1) + (1-\lambda) f(x_2)

holds for all x1,x2∈Ωx_1,x_2 \in \Omega and all λ∈[0,1]\lambda \in [0,1].
ff is called concave if −f-f is convex, i.e. if

f(λx1+(1−λ)x2)≥λf(x1)+(1−λ)f(x2)f(\lambda x_1 + (1-\lambda) x_2) \geq \lambda f(x_1) + (1-\lambda) f(x_2)

holds for all x1,x2∈Ωx_1,x_2 \in \Omega and all λ∈[0,1]\lambda \in [0,1].

Remark

The function ff is called convex (concave) if its graph lies below the corresponding secant on every subinterval, i.e. if for all points x0<x<x1x_0 < x < x_1 in the interval [x0,x1][x_0, x_1]

f(x)≤f(x0)+f(x1)−f(x0)x1−x0(x−x0)⏟secant.f(x) \leq \underbrace{f(x_0) + \frac{f(x_1) - f(x_0)}{x_1 - x_0} (x-x_0)}_{\text{secant}}.
Concave and convex function with a secant between P1 and P2
Satz 6

Let f∈C2(Ω)f \in C^2(\Omega). Then ff is convex (concave) if and only if f′′(x)≥0    (≤0)f''(x) \geq 0 \;\; (\leq 0) for all x∈Ωx \in \Omega.

Satz 7 (Jensen; Struwe Satz 5.5.3)

Let f:(a,b)→Rf:(a,b) \to \mathbb{R} be convex. Then for arbitrary points x1,...,xN∈(a,b)x_1, ..., x_N \in (a,b) and numbers 0≤t1,...,tN≤10 \leq t_1, ..., t_N \leq 1 with ∑i=1Nti=1\sum\limits_{i=1}^N t_i = 1 the following inequality holds:

f(∑i=1Ntixi)≤∑i=1Ntif(xi).f \left( \sum_{i=1}^N t_i x_i \right) \leq \sum_{i=1}^N t_i f(x_i).
Example 3.1 Struwe example 5.5.4

[Comparison of arithmetic and geometric mean]
For all 0<x1,...,xn<∞,    0≤α1,...,αn≤10 < x_1, ..., x_n < \infty, \;\; 0 \leq \alpha_1, ..., \alpha_n \leq 1 with ∑i=1nαi=1\sum\limits_{i=1}^n \alpha_i = 1 we have:

∏i=1nxiαi≤∑i=1nαixi\prod_{i=1}^n x_i^{\alpha_i} \leq \sum_{i=1}^n \alpha_i x_i
Show solutionHide solution

Proof:
The statement follows from Satz 5.5.3 (Jensen).
Since exp⁡′′=exp⁡>0\exp'' = \exp > 0 \quad ⟹Satz 6\stackrel{\text{Satz 6}}{\Longrightarrow} \quad the function exp⁡\exp is convex. We will use this property below:

∏i=1nxiαi=∏i=1nexp⁡(αilog⁡(xi))=exp⁡(∑i=1nαilog⁡(xi))≤Satz 5.5.3 Jensen∑i=1nαiexp⁡(log⁡(xi))=∑i=1nαixi\begin{aligned} \prod_{i=1}^n x_i^{\alpha_i} &= \prod_{i=1}^n \exp( \alpha_i \log(x_i))\\ &= \exp\left( \sum_{i=1}^n \alpha_i \log(x_i) \right)\\ &\stackrel{\text{Satz 5.5.3 Jensen}}{\leq} \sum_{i=1}^n \alpha_i \exp(\log(x_i))\\ &= \sum_{i=1}^n \alpha_i x_i \end{aligned}□\square
Remark

For αi=1n,    1≤i≤n\alpha_i = \frac{1}{n}, \;\; 1 \leq i \leq n, Jensen gives the following:

∏i=1nxin≤1n∑i=1nxi.\sqrt[n]{ \prod_{i=1}^n x_i } \leq \frac{1}{n} \sum_{i=1}^n x_i.