# Real Analysis/Differentiation

In this chapter, we will introduce the concept of differentiation. Differentiation is a staple tool in calculus, which should be a fact somewhat familiar to you from studying earlier mathematics. However, the reasons as to why this is true have not always been so clearly proven. This chapter prove a simple consequence of differentiation you will be most familiar with - that is, we will focus on proving each differentiation "operations" that provides us a simple way to find the derivative for common functions.

## Definition

Let us define the derivative of a function

Given a function ${\displaystyle f:\mathbb {R} \to \mathbb {R} }$

Let ${\displaystyle a\in \mathbb {R} }$

We say that ƒ(x) is differentiable at x=a if and only if

${\displaystyle \lim _{h\rightarrow 0}{f(a+h)-f(a) \over h}}$

exists.

The derivative of ƒ at a is denoted by ${\displaystyle f'(a)}$

A function is said to be differentiable on a set A if the derivative exists for each a in A. A function is differentiable if it is differentiable on its entire domain.

## Definition-Derived Theorems (Differentiability Implies Continuity)

Given our definition of a derivative, it should be noted that it utilizes limits and functions. This theorem relates derivation with continuity, which is useful for justifying many of the latter theorems that will be discussed in this chapter. The proof for this theorem is simple; it requires a valid limit converging to zero to mimic the continuity definition.

 Theorem Given a function ƒ which is differentiable at a, it is also continuous at a

The proof for this is as follows

 Differentiable definition: {\displaystyle {\begin{aligned}f'(a)&=\lim _{h\rightarrow 0}{f(a+h)-f(a) \over h}\\f'(a)\cdot \lim _{h\rightarrow 0}{h}&=\lim _{h\rightarrow 0}{f(a+h)-f(a) \over h}\cdot \lim _{h\rightarrow 0}{h}\\f'(a)\cdot 0&=\lim _{h\rightarrow 0}{{\dfrac {f(a+h)-f(a)}{h}}\cdot h}\\0&=\lim _{h\rightarrow 0}{f(a+h)}-\lim _{h\rightarrow 0}{f(a)}\\\lim _{h\rightarrow 0}{f(a)}&=\lim _{h\rightarrow 0}{f(a+h)}\\\lim _{h\rightarrow 0}{f(a+h)}&=f(a)\end{aligned}}} Suppose we multiply both sides by 0 Algebraic manipulations The continuity definition ${\displaystyle \blacksquare }$

However, the converse is not true in this case. Analyzing the proof, it is apparent that a continuous function at a does not necessarily mean that it is differentiable at a simply because it would involve removing the multiplication by 0, which is impossible given our algebraic axioms.

## Properties of Differentiation

From this definition, we will create new properties of derivation. People familiar with Calculus should note that we are proving that the derivation of certain functions and operations are valid. These first theorems follow immediately from the definition.

### Basic Properties

Below are the list of properties which are mentioned only for completeness, and a demonstration of how the derivation formula works.

 Constant Function Given ${\displaystyle f(x)=c,\quad f'(a)=0}$ Identity Function Given ${\displaystyle f(x)=x,\quad f'(a)=1}$

Constant Function

Suppose a constant function ƒ such that ${\displaystyle f(x)=c\quad \forall x\in \mathbb {R} }$. This function will always have a derivative of 0 for any real number.

Given the derivation definition, we have

${\displaystyle f'=\lim _{h\rightarrow 0}{f(a+h)-f(a) \over h}}$

Applying the definition of the function, we can substitute the function for c, as such

{\displaystyle {\begin{aligned}f'&=\lim _{h\rightarrow 0}{c-c \over h}\\&=\lim _{h\rightarrow 0}{0 \over h}\\&=0\\&\blacksquare \end{aligned}}}

Identity Function

Suppose an identity function ƒ such that ${\displaystyle f(x)=x\quad \forall x\in \mathbb {R} }$. This function will always have a derivative of 1 for any real number.

Given the derivation definition, we have

${\displaystyle f'=\lim _{h\rightarrow 0}{f(a+h)-f(a) \over h}}$

Applying the definition of the function, we can substitute the function for its input, as such

{\displaystyle {\begin{aligned}f'&=\lim _{h\rightarrow 0}{a+h-a \over h}\\&=\lim _{h\rightarrow 0}{h \over h}\\&=\lim _{h\rightarrow 0}{1}\\&=1\\&\blacksquare \end{aligned}}}

### Algebraic Properties

Suppose two functions f and g that are differentiable at a, these following properties apply

 Addition ${\displaystyle (f+g)'(a)=f'(a)+g'(a)}$ Subtraction ${\displaystyle (f-g)'(a)=f'(a)-g'(a)}$ Product ${\displaystyle (fg)'(a)=f'(a)g(a)+f(a)g'(a)}$ Multiple of a Function ${\displaystyle (\lambda f)'(a)=\lambda \cdot f'(a)}$ Reciprocal ${\displaystyle \left({\dfrac {1}{f}}\right)'(a)=-{\dfrac {f'(a)}{f^{2}}}}$ Division ${\displaystyle \left({\dfrac {f}{g}}\right)'(a)={\dfrac {f'(a)g(a)-f(a)g'(a)}{g^{2}}}}$

We will individually prove each one below

This proof essentially creates the definition of differentiation from the two functions that make up the overall function.

{\displaystyle {\begin{aligned}(f+g)'(a)&=\lim _{h\rightarrow 0}{(f+g)(a+h)-(f+g)(a) \over h}\\&=\lim _{h\rightarrow 0}{(f(a+h)+g(a+h))-(f(a)+g(a)) \over h}\\&=\lim _{h\rightarrow 0}\left({f(a+h)-f(a) \over h}+{g(a+h)-g(a) \over h}\right)\\&=\lim _{h\rightarrow 0}{f(a+h)-f(a) \over h}+\lim _{h\rightarrow 0}{g(a+h)-g(a) \over h}\\&=f'(a)+g'(a)\\&\blacksquare \end{aligned}}}

Subtraction

We will not write out a rigorous proof for subtraction, given that it can be done mentally by imagining a negated ${\displaystyle g(a)}$ function or retracing the addition proof with subtraction instead.

Product

This proof works similarly to the previous proof, except that this proof requires the addition of extra terms which zero out when added together. This is a normal algebraic trick in order to derive theorems, which will be further used in the latter theorems in this chapter.

{\displaystyle {\begin{aligned}(fg)'(x)&=\lim _{h\rightarrow 0}{f(a+h)g(a+h)-f(a)g(a) \over h}\\&{\text{next, we introduce the }}f(a)g(a+h){\text{ term into the statement}}\\&=\lim _{h\rightarrow 0}{f(a+h)g(a+h)-f(a)g(a+h)+f(a)g(a+h)-f(a)g(a) \over h}\\&=\lim _{h\rightarrow 0}{g(a+h)(f(a+h)-f(a))+f(a)(g(a+h)-g(a)) \over h}\\&=\lim _{h\rightarrow 0}{f(a+h)-f(a) \over h}\lim _{h\rightarrow 0}{g(a+h)}+\lim _{h\rightarrow 0}{f(a)}\lim _{h\rightarrow 0}{g(a+h)-g(a) \over h}\\&=\lim _{h\rightarrow 0}{f(a+h)-f(a) \over h}g(a+h)+f(a)\lim _{h\rightarrow 0}{g(a+h)-g(a) \over h}\\&=f'(x)g(x)+f(x)g'(x)\\&\blacksquare \end{aligned}}}

Product of a Constant

For this proof, we will present it using two different methods.

The first method requires only the limit theorem that a constant multiple is equivalent to the limit being multiplied by the constant.

{\displaystyle {\begin{aligned}(\lambda f)'(a)&=\lim _{h\rightarrow 0}{\lambda f(a+h)-\lambda f(a) \over h}\\&=\lim _{h\rightarrow 0}{\lambda \left({\dfrac {f(a+h)-f(a)}{h}}\right)}\\&=\lambda \lim _{h\rightarrow 0}{f(a+h)-f(a) \over h}\\&=\lambda f'(x)\\&\blacksquare \end{aligned}}}

The second proof requires applying the product rule and constant function for differentiation.

{\displaystyle {\begin{aligned}(\lambda f)'(a)&=g'(x)f(x)+g(x)f'(x)\\&=0\cdot f(x)+\lambda f'(x)\\&=\lambda f'(x)\\&\blacksquare \end{aligned}}}

Reciprocal

Like the other proofs before, this one will also invoke the definition at a certain point to simplify the statement into a concise, memorizable format.

{\displaystyle {\begin{aligned}\left({\dfrac {1}{f}}\right)'(a)&=\lim _{h\rightarrow 0}{{\dfrac {1}{f(a+h)}}-{\dfrac {1}{f(a)}} \over h}\\&=\lim _{h\rightarrow 0}{\dfrac {f(a)-f(a+h)}{h\cdot f(a+h)f(a)}}\\&=\lim _{h\rightarrow 0}{{\dfrac {f(a)-f(a+h)}{h}}\cdot {\dfrac {1}{f(a+h)f(a)}}}\\&=\lim _{h\rightarrow 0}{-{\dfrac {f(a+h)-f(a)}{h}}}\cdot \lim _{h\rightarrow 0}{\dfrac {1}{f(a+h)f(a)}}\\&=-f'(a)\cdot {\dfrac {1}{f(a)f(a)}}\\&=-{\dfrac {f'(a)}{[f(a)]^{2}}}\\&\blacksquare \end{aligned}}}

Division

This proof borrows the reciprocal proof and the multiplication proof to form an easy to follow rationale.

{\displaystyle {\begin{aligned}\left({\dfrac {f}{g}}\right)'(a)&=\left(f\cdot {\dfrac {1}{g}}\right)'(a)\\&=f'(a)\left({\dfrac {1}{g(a)}}\right)+{f(a) \over g'(a)}\\&=f'(a)\left({\dfrac {1}{g(a)}}\right)+f(a)\left(-{\dfrac {g'(a)}{[g(a)]^{2}}}\right)\\&={\dfrac {f'(a)}{g(a)}}-{\dfrac {f(a)g'(a)}{[g(a)]^{2}}}\\&={\dfrac {f'(a)g(a)}{[g(a)]^{2}}}-{\dfrac {f(a)g'(a)}{[g(a)]^{2}}}\\&={\dfrac {f'(a)g(a)-f(a)g'(a)}{[g(a)]^{2}}}\\&\blacksquare \end{aligned}}}

### Chain Rule (Function Composition Theorem)

Given two functions f and g such that f is differentiable at ${\displaystyle g(a)}$ and g is differentiable at a, then ${\displaystyle (f\circ g)'(a)=f'\circ g(a)\cdot g'(a)}$

Proof Part 1

Unlike the previous properties, the chain rule will quickly become problematic and will definitely require an external theorem outside of algebraic manipulations to solve. To illustrate why a new theorem is required, we will begin to prove the Chain Rule though algebraic manipulations, point out the road block, then create a lemma to guide us around the issue, and thus figure out a proof. We begin with the following statements:

${\displaystyle (f\circ g)'(x)=\lim _{y\rightarrow x}{f(g(y))-f(g(x)) \over y-x}}$ ${\displaystyle =\lim _{y\rightarrow x}{f(g(y))-f(g(x)) \over g(y)-g(x)}{g(y)-g(x) \over y-x}}$${\displaystyle =\lim _{y\rightarrow x}{f(g(y))-f(g(x)) \over g(y)-g(x)}\lim _{y\rightarrow x}{g(y)-g(x) \over y-x}}$${\displaystyle =f'(g(x))g'(x)}$

The problem is that ${\displaystyle g(y)-g(x)}$ may be zero at points arbitrarily close to x, and therefore ${\displaystyle {f(g(y))-f(g(x)) \over g(y)-g(x)}}$ would not be continuous at these points. Thus we apply a clever lemma as follows:

#### Caratheodory's Lemma

Let ${\displaystyle f:\mathbb {R} \to \mathbb {R} }$

We say that ${\displaystyle f(x)}$ is differentiable at ${\displaystyle x=c}$ if and only if there exists a continuous function ${\displaystyle \phi :\mathbb {R} \to \mathbb {R} }$ that satisfies

${\displaystyle (x-c)\phi (x)=f(x)-f(c)\forall x\in \mathbb {R} }$

Proof

(${\displaystyle \Rightarrow }$)Let ${\displaystyle f(x)}$ be differentiable at ${\displaystyle x=c}$ and define function ${\displaystyle \phi :\mathbb {R} \to \mathbb {R} }$ such that

${\displaystyle \phi (x)={\frac {f(x)-f(c)}{x-c}}}$ for ${\displaystyle x\neq c}$ and

${\displaystyle \phi (c)=f'(c)}$

It is easy to see that ${\displaystyle \phi (x)}$ is continuous and that it satisfies the required condition.

(${\displaystyle \Leftarrow }$) Let ${\displaystyle \phi (x)}$ be a continuous function satisfying ${\displaystyle (x-c)\phi (x)=f(x)-f(c)\forall x\in \mathbb {R} }$

For all ${\displaystyle x\neq c}$, we have that ${\displaystyle \phi (x)={\tfrac {f(x)-f(c)}{x-c}}}$

As ${\displaystyle \phi }$ is continuous, ${\displaystyle \phi (c)=\lim _{x\to c}\phi (x)}$, that is,

${\displaystyle \phi (c)=\lim _{x\to c}{\frac {f(x)-f(c)}{x-c}}}$ which implies that ${\displaystyle f(x)}$ is differentiable at ${\displaystyle x=c}$

Proof Part 2

Let ${\displaystyle g:\mathbb {R} \to \mathbb {R} }$ be differentiable at ${\displaystyle c\in \mathbb {R} }$

Let ${\displaystyle f:\mathbb {R} \to \mathbb {R} }$ be differentiable at ${\displaystyle d=g(c)}$

Let the domain of f be a subset of the image of g.

Then,

1. ${\displaystyle (f\circ g)(x)}$ is differentiable at ${\displaystyle x=c}$
2. ${\displaystyle (f\circ g)'(c)=f'(g(c))g'(c)}$

Caratheodory's Lemma implies that there exist continuous functions ${\displaystyle \phi ,\gamma :\mathbb {R} \to \mathbb {R} }$ such that ${\displaystyle (x-c)\gamma (x)=g(x)-g(c)}$ and ${\displaystyle (g(x)-g(c))\phi (g(x))=f(g(x))-f(g(c))}$

Now, consider the function ${\displaystyle \eta (x)=\phi (g(x))\gamma (x)}$. Obviously, ${\displaystyle \eta (x)}$ is continuous.

Also, it satisfies ${\displaystyle (x-c)\eta (x)=(f\circ g)(x)-(f\circ g)(c)}$. Hence, by Caratheodory's Lemma, ${\displaystyle (f\circ g)(x)}$ is differentiable at ${\displaystyle x=c}$ and that ${\displaystyle (f\circ g)'(c)=\eta (c)=f'(g(c))g'(c)}$

## Exercises

Here are some exercises to expand and train your understanding of the material.

1. Find the derivatives of the following functions:
1. A function of the form ƒ(x) = xn
2. Polynomial
3. Trigonometric
4. Exponential
5. Logarithmic
2. In this chapter you have learned that being able to take the derivative implies that the function is continuous at that point. Given this, please read Higher Order Derivatives before solving these problems
1. Prove whether that the second derivative at a is also continuous at a
2. Prove whether that the nth derivative at a is also continuous at a
3. Some of the most popular counter examples to illustrate properties of continuity and differentiability are functions involving ${\displaystyle f(x)=\sin({\tfrac {1}{x}})}$
1. Prove that ${\displaystyle f(x)=\sin({\tfrac {1}{x}})\forall x\neq 0,f(0)=0}$ is not continuous at ${\displaystyle x=0}$
2. Prove that the function ${\displaystyle f(x)=x\sin({\tfrac {1}{x}})\forall x\neq 0,f(0)=0}$ is continuous but not differentiable at ${\displaystyle x=0}$
3. Prove that ${\displaystyle f(x)=x^{2}\sin({\tfrac {1}{x}})\forall x\neq 0,f(0)=0}$ is differentiable at ${\displaystyle x=0}$