# Lecture 5

## Continue on differentiation

### L'Hôpital's Rule

Suppose $f$ and $g$ are real differentiable on $(a,b)$ and $g'(x)\neq 0$ for all $x\in (a,b)$.

Suppose $\frac{f'(x)}{g'(x)}\to A$ as $x\to a$,

If $f(x)\to 0$ and $g(x)\to 0$ as $x\to a$,

or $g(x)\to \infty$ as $x\to a$,

then $\frac{f(x)}{g(x)}\to A$ as $x\to a$.

Proof:

**Main step: Let $-\infty<a<b<\infty$.for any $q>A$, there exists $c\in (a,b)$ such that $\frac{f(x)}{g(x)}<q$ for all $x\in (a,c)$.**

> Topological definition of limit:
>
> $h(x)\to A$ as $x\to a$ if $\forall \epsilon>0$, $\exists \delta>0$ such that $|x-a|<\delta$ implies $|h(x)-A|<\epsilon$.
>
> In other words, if for any open neighborhood $V$ of $A$, there exists an open neighborhood $U$ of $a$ such that $h(U)\subseteq V$.

Case 1: $A=-\infty$, for any $q>A$, there exists $\delta>0$ such that $x\in (a,a+\delta)$ implies $\frac{f(x)}{g(x)}<q$.

Case 2: $A=\infty$, we change the function $F(x)=-f(x)$ and apply the case 1.

Case 3: $A\in \mathbb{R}$, Let $\epsilon>0$ and take $q=A+\epsilon$. $\exists c_1\in (a,b)$ such that $\forall x\in (a,c_1)$, $\frac{f(x)}{g(x)}<q$.

Set $F(x)=-f(x)$. and $q=-A+\epsilon>-A$. Apply main step, $\exists c_2\in (a,b)$ such that $\forall x\in (a,c_2)$, $\frac{F(x)}{g(x)}<-A+\epsilon$. so $\forall x\in (a,c_2)$, $\frac{f(x)}{g(x)}>A-\epsilon$.

We take $c=\min(c_1,c_2)$. Then $\forall x\in (a,c)$, $\frac{f(x)}{g(x)}<q$.

EOP

### Higher Order Derivatives

#### Definition 5.14

If $f$ is differentiable on $(a,b)$, then we define $f'(x)=\lim_{t\to x}\frac{f(t)-f(x)}{t-x}$.

If $f'$ is differentiable on $(a,b)$, then we define $f''(x)=(f')'(x)$.

If $f^{(k)}$ is differentiable on $(a,b)$, then we define $f^{(k+1)}(x)=(f^{(k)})'(x)$.

#### Theorem 5.15 Taylor's Theorem

Let $f:[a,b]\to \mathbb{R}$, and $n$ be a positive integer.

Let $f^{(n-1)}$ be continuous on $[a,b]$, and differentiable on $(a,b)$.

For $\alpha\in [a,b]$, define the Taylor polynomial of order $n-1$ at $\alpha$ by

$$
P(t)=\sum_{k=0}^{n-1}\frac{f^{(k)}(\alpha)}{k!}(t-\alpha)^k
$$

Example:

When $n=1$, $P(t)=f(\alpha)$.

When $n=2$, $P(t)=f(\alpha)+f'(\alpha)(t-\alpha)$.

When $n=3$, $P(t)=f(\alpha)+f'(\alpha)(t-\alpha)+\frac{f''(\alpha)}{2}(t-\alpha)^2$.

**Key property:**

$$
P^{(k)}(\alpha)=f^{(k)}(\alpha)\quad \forall k=0,1,\cdots,n-1
$$

For each $\beta\in [a,b]$, there exists $x$ between $\alpha$ and $\beta$ such that

$$
f(\beta)=P(\beta)+\frac{f^{(n)}(x)}{n!}(\alpha-\beta)^n
$$

_On rudin, it is_

$$
f(\beta)=P(\beta)+\frac{f^{(n)}(x)}{n!}(\beta-\alpha)^n
$$

Proof:

Let $M=\frac{f(\beta)-P(\beta)}{(\beta-\alpha)^n}$.

So that $f(\beta)=P(\beta)+M(\beta-\alpha)^n$.

Need to show that $n!M=f^{(n)}(x)$. for some $x\in (\alpha,\beta)$. Defined $g(t)=f(t)-P(t)-M(t-\alpha)^n$.

By our choice of $M$, $g(\alpha)=g(\beta)=0$.

$$
g(t)=f(t)-P(t)-M(n(n-1)(n-2)\cdots(n-k+1)(t-\alpha)^{n-k})
$$

for $k=1,2,\cdots,n-1$. And when $k=n$, $g^{(n)}(t)=f^{(n)}(t)-0-M(n!)$.

Need to show that $\exists x\in (\alpha,\beta)$ such that $g^{(n)}(x)=0$.

By Mean Value Theorem, $\exists x_1\in (\alpha,\beta)$ such that $g'(x_1)=0$.

By Mean Value Theorem, $\exists x_2\in (\alpha,x_1)$ such that $g''(x_2)=0$.

By Mean Value Theorem, $\exists x_3\in (\alpha,x_2)$ such that $g^{(3)}(x_3)=0$.

$\cdots$

By Mean Value Theorem, $\exists x_n\in (\alpha,x_{n-1})$ such that $g^{(n)}(x_n)=0$.

Since $g^{(n)}(\alpha)=0$ for $k=0,1,2,\cdots,n-1$, we can find $x_n\in (\alpha,x_{n-1})$ such that $g^{(n)}(x_n)=0$.

EOP

## Chapter 6: Riemann-Stieltjes Integral
