Calculus I· Note 03

Differentiability and Derivatives

Year 1 · Semester IILast updated

May 8 Lecture. Links to the board and the recording.
What does this stuff do?
If you have a function y=f(x)y=f(x), we want to be able to calculate the slope of a line that is tangent to a point on the graph.
We seek a derivative function f′(x)f^\prime(x) such that
f′(x0)=f^\prime(x_0)= slope of line tangent to graph (y=f(x))(y=f(x)) at the point (x0,f(x0))(x_0,f(x_0)).

Why are we interested, and how do we find this?
Background:
What is a tangent line to a graph?
Let’s take the following example:

Let x=timex=time.
Let f(x)=f(x) = distance traveled by time xx.
Speed = distancetime\frac{distance}{time}.
If f(2)=1f(2)=1, f(3)=4f(3)=4, then my speed over time interval [2,3][2,3] is f(3)−f(2)3−2\frac{f(3)-f(2)}{3-2}.
I.E. ΔyΔx=3⇒ slope of line connecting (2,f(2)) and (3,f(3)).\frac{\Delta y}{\Delta x} = 3 \Rightarrow \text{ slope of line connecting } (2, f(2)) \text{ and } (3, f(3)).
Slope represents the rate of change as in this example.


What would the speedometer show at x=3x=3?
Idea: let’s take shorter and shorter intervals around x=3x=3 and see what the slope for that line is. Each slope is a rate of change (ROC) of ff over a smaller and smaller interval [x,3][x,3]. Define the Instantaneous Rate of Change (IRoC) at x=3x=3 to be the limit of these slopes.

lim⁡x→x0ΔyΔx=lim⁡x→x0f(x0)−f(x)x0−x\lim_{x\to x_0}{\frac{\Delta y}{\Delta x} = \lim_{x\to x_0}{\frac{f(x_0)-f(x)}{x_0 - x}}}

Or, if we express x=x0+hx=x_0 + h, IRoC at x0=lim⁡h→0f(h0+h)−f(x0)hx_0 = \lim_{h\to 0}{\frac{f(h_0+h)-f(x_0)}{h}}
The tangent line to y=f(x)y=f(x) at x=x0x=x_0 is defined as the line through (x0,f(x0))(x_0, f(x_0)) with this slope.

Definitions:
  1. f(x)f(x) is differentiable at the point x=x0x=x_0 if the limit lim⁡h→0f(x0+h)−f(x0)h\lim_{h\to 0}{\frac{f(x_0+h)-f(x_0)}{h}} exists.

  2. f(x)f(x) is differentiable from the left if lim⁡h→0−f(x0+h)−f(x0)h\lim_{h\to 0^-}{\frac{f(x_0+h)-f(x_0)}{h}} exists.

  3. f(x)f(x) is differentiable from the right if lim⁡h→0+f(h0+h)−f(x0)h\lim_{h\to 0^+}{\frac{f(h_0+h)-f(x_0)}{h}} exists.

    • ff is differentiable at x0x_0   ⟺  \iff ff is differentiable from left and from right at x0x_0 and these limits are equivalent.

    • Example: Graph y=∣x∣y=|x|. Is x differentiable at x=0x=0?
      From the left: lim⁡h→0−f(h)−f(0)h\lim_{h\to 0^-}{\frac{f(h)-f(0)}{h}} = lim⁡h→0−hh=−1\lim_{h\to 0}{\frac{-h}{h}}=-1. Note, h<0h<0, so ∣h∣=−h|h|=-h
      From the right: lim⁡h→0+f(h)−f(0)h=1\lim_{h\to 0^+}{\frac{f(h)-f(0)}{h}}=1
      Hence, f(x)=∣x∣f(x)=|x| is differentiable from each side at x0=0x_0=0, but is not differentiable there.

  4. ff is differentiable in open interval (a,b)(a,b) if f is differentiable at each pt. in that interval

  5. If ff is differentiable in (a,b)(a,b) then the derivative of ff on (a,b)(a,b) is defined as (for x0∈(a,b)x_0\in(a,b)): f′(x0)=lim⁡h→0f(x0+h)−f(x0)hf^\prime(x_0)=\lim_{h\to 0}{\frac{f(x_0+h)-f(x_0)}{h}}

One sided derivatives are defined similarly to definitions 2 & 3.

The derivative function f′f^\prime is defined for any x0x_0 in this manner:

f′(x)=lim⁡h→0f(x+h)−f(x)hf^\prime(x)=\lim_{h\to 0}{\frac{f(x+h)-f(x)}{h}}
Theorem 31:
Theorem

If x is differentiable at x0x_0, then x is continuous at x0x_0. The reverse is not true.
Intuitively, f′(x)=ΔyΔxf^\prime (x)=\frac{\Delta y}{\Delta x} as Δx→0\Delta x \to 0 Since denominator is going to zero, this fraction has a limit only if Δy→0\Delta y\to 0 too, i.e. ff is continuous at x0x_0.

Linear Approximation using derivatives:

If one would want to calulate (1.0123)2(1.0123)^2

f′(x)=lim⁡h→0f(x+h)−f(x)hf^\prime(x)=\lim_{h\to 0}{\frac{f(x+h)-f(x)}{h}}.

I.e., for small hh: f′(x)≈f(x+h)−f(x)hf^\prime (x) \approx \frac{f(x+h)-f(x)}{h}

For smaller h, the approximation is more exact.

f(x+h)≈f(x)+h⋅f′(x)f(x+h)\approx f(x)+h\cdot f^\prime (x).

In our example: (1.0123)2≈12+(0.0123)⋅2=1.0246Real Answer: (1.0123)2=1.02457\begin{aligned}\text{In our example: }(1.0123)^2 \approx 1^2 + (0.0123)\cdot 2 &= 1.0246\\\text{Real Answer: }(1.0123)^2 &= 1.02457\end{aligned}

(We multiply by 2, because the derivative of ff is 2x2x)

Differentiation Rules
  1. Derivative of a constant function f(x)=cf(x)=c is zero.
    • f(x)=cf(x)=c is differentiable everywhere, and f′(x)=0f^\prime(x)=0
  2. If ff and gg are differentiable at x0x_0, so is the function f+gf+g, and (f+g)′(x0)(f+g)\prime(x_0) = f′(x0)+g′(x0)f^\prime(x_0) + g\prime(x_0).
    • The derivative of a sum of functions at a point is the sum of the derivatives of functions at a point.
  3. if f is differentiable at x=x0x=x_0 and c is any real number, then cf is diff. at x0x_0, and (c⋅f)′=c⋅f′{(c\cdot f)}^\prime = c\cdot f^\prime.

May 8 Tirgul. Links to the board and the recording.

Some Derivative Functions

f(x)=x3f(x)=x^3 (in general, f(x)=xnf(x) = x^n for n∈Nn\in\N)
f′(x)=lim⁡h→0(x+h)3−x3hf^\prime(x)=\lim_{h\to0}{\frac{ {(x+h)}^3-x^3}h}
=lim⁡h→0x3+3x2h+3xh2+h3−x3h=\lim_{h\to0}{\frac{x^3+3x^2h+3xh^2+h^3-x^3}{h}}
=lim⁡h→03x2h+3xh2+h3h=\lim_{h\to0}{\frac{3x^2h+3xh^2+h^3}{h}}
=lim⁡h→0h⋅(3x2+3xh+h2)h=\lim_{h\to0}{\frac{h\cdot(3x^2+3xh+h^2)}{h}}
=lim⁡h→03x2+3xh+h2=\lim_{h\to0}{3x^2+3xh+h^2}
=3x2⇒f′(x)=3x2=3x^2 \Rightarrow f^\prime(x)=3x^2

In general
if f(x)=xnf(x) = x^n for n∈Nn\in\N,

f′(x)=lim⁡h→0(x+h)n−xnh=lim⁡h→0nxn−1+terms where power of h ≥ 2h=lim⁡h→0nxn−1+h⋅[terms where power of h ≥ 2]h=lim⁡h→0nxn−1+[terms where power of h ≥ 1]=lim⁡h→0nxn−1+[terms → 0 as h→0]=nxn−1\begin{align} f^\prime(x)&=\lim_{h\to0}{\frac{{(x+h)}^n-x^n}{h}} \\&=\lim_{h\to0}{\frac{nx^{n-1} + \text{terms where power of h ≥ 2}}{h}} \\&=\lim_{h\to0}{\frac{nx^{n-1} + h\cdot[\text{terms where power of h $\ge$ 2}]}{h}} \\&=\lim_{h\to0}{nx^{n-1} + [\text{terms where power of h $\ge$ 1}]} \\&=\lim_{h\to0}{nx^{n-1} + [\text{terms $\to$ 0 as }h\to0]} \\&=nx^{n-1} \end{align}

E.g. f(x)=x5⇒f′(x)=5x4f(x) = x^5\Rightarrow f^\prime(x)=5x^4


May 10 Lecture. Links to the board and the recording.

Rules of Differentiation:
  1. f(x)=c⇒f′(x)=0f(x)=c\Rightarrow f^\prime(x)=0
  2. (c⋅f)′(x)=c⋅f′(x){(c\cdot f)}^\prime(x)=c\cdot f^\prime(x)
  3. (f±g)′(x)=f′(x)±g′(x){(f\pm g)}^\prime(x)=f^\prime(x)\pm g^\prime(x)
  4. (f⋅g)′(x)=f(x)⋅g′(x)+f′(x)⋅g(x){(f\cdot g)}^\prime(x)=f(x)\cdot g^\prime(x)+f^\prime(x)\cdot g(x)
    Product Rule
  5. (fg)′(x)=f′(x)⋅g(x)−f(x)⋅g′(x)[g(x)]2{(\frac fg)}^\prime(x)=\frac{f^\prime(x)\cdot g(x)-f(x)\cdot g^\prime(x)}{{\left[g(x)\right]}^2}
    Quotient Rule
Chain Rule

Used to differentiate composed function f(g(x))f(g(x))
Definition:

(f∘g)′=f′(g(x))⋅g′(x){(f\of g)}^\prime=f^\prime(g(x))\cdot g^\prime(x)
Examples

(sin⁡x)′=12sin⁡x⋅cos⁡x=cos⁡x2sin⁡x{(\sqrt{\sin x})}^\prime=\frac{1}{2\sqrt{\sin x}}\cdot\cos x=\frac{\cos x}{2\sqrt{\sin x}}

((5x2−3x+2)5)′=5(5x2−3x+2)4⋅(10x−3){({(5x^2-3x+2)}^5)}^\prime=5{(5x^2-3x+2)}^4\cdot(10x-3)

Applications of the Chain Rule:
  1. (xpq)′=pqxpq−1{(x^{\frac pq})}^\prime=\frac pq x^{\frac pq -1}

  2. Given f(x)f(x), (who’s derivative f′f^\prime we know), what is derivative of f−1f^{-1}?

    • We find formula here, this is known as the Inverse Function Rule:
    [f−1(x)]′=1f′(f−1(x)){\left[f^{-1}(x)\right]}^\prime=\frac1{f^\prime(f^{-1}(x))}
    • Ex. f(x)=ln⁡x⇒f′(x)=1xWhat’s derivative of f−1(x)=exf(x)=\ln x\Rightarrow f^\prime(x)=\frac1x\qquad \text{What's derivative of }f^{-1}(x)=e^x?
      • (ex)′=11ex=ex{(e^x)}^\prime=\frac1{\frac1{e^x}}=e^x
    • f(x)=tan⁡x⇒f′(x)=1cos⁡2xWhat’s derivative of f−1(x)=arctan⁡xf(x)=\tan x\Rightarrow f^\prime(x)=\frac1{\cos^2x}\qquad \text{What's derivative of }f^{-1}(x)=\arctan x?
      • (arctan⁡x)′=11cos⁡2(arctan⁡x)=cos⁡2(arctan⁡x)⇒{(\arctan x)}^\prime=\frac1{\frac1{\cos^2(\arctan x)}}=\cos^2(\arctan x)\Rightarrowlots of math⇒1x2+1\Rightarrow\frac1{x^2+1}
    • f(x)=x2⇒f′(x)=2xWhat’s derivative of f−1(x)=xf(x)=x^2\Rightarrow f^\prime(x)=2x\qquad \text{What's derivative of }f^{-1}(x)=\sqrt x?
      • (x)′=12x{(\sqrt x)}^\prime=\frac1{2\sqrt x}

May 15 Lecture. Links to the board and the recording.

Other useful derivatives:

f(x)=2xf(x)=2^x (in general: f(x)=ax∣(a>0)f(x)=a^x\mid (a>0))
Recall: 2=eln⁡2⇒2x=(eln⁡2)x=exln⁡22=e^{\ln2}\Rightarrow2^x={(e^{\ln2})}^x=e^{x\ln2}
This is a composed function (g∘h)(x)(g\of h)(x) where h(x)=x⋅ln⁡2h(x)=x\cdot\ln2 and g(x)=exg(x)=e^x.
So, we apply the Chain Rule to get ex⋅ln⁡2⋅ln⁡2⇒ln⁡2⋅2xe^{x\cdot\ln2}\cdot\ln2\Rightarrow\ln2\cdot 2^x

In general:

f(x)=ax⇒f′(x)=(ln⁡a)⋅axf(x)=a^x\Rightarrow f^\prime(x)=(\ln a)\cdot a^x
f(x)=log⁡2(x)f(x)=\log_2(x) (in general: f(x)=log⁡a(x)∣(a>0,a≠1)f(x)=\log_a(x)\mid(a>0,a\not=1))
Use the Inverse Function Rule:
Let f(x)=axf(x)=a^x, so that f−1(x)=log⁡axf^{-1}(x)=\log_ax.
(log⁡ax)′=1f′(f−1(x))=1ln⁡a⋅alog⁡ax=1ln⁡a⋅x{(\log_ax)}^\prime=\frac1{f^\prime(f^{-1}(x))}=\frac1{\ln a\cdot a^{\log_ax}}=\frac1{\ln a\cdot x}
f(x)=∣g(x)∣f(x)=|g(x)|
f′(x)=g(x)∣g(x)∣⋅g′(x)f^\prime(x)=\frac {g(x)}{|g(x)|}\cdot g^\prime(x)
f(x)=ln⁡(g(x))f(x)=\ln(g(x))
f′(x)=1g(x)⋅g′(x)=g′(x)g(x)f^\prime(x)=\frac{1}{g(x)}\cdot g^\prime(x)=\frac{g^\prime(x)}{g(x)}

Trigonometric derivatives:
Trigonometric derivatives – Wikipedia
  • sin⁡x→cos⁡x\sin x\rightarrow\cos x
  • cos⁡x→−sin⁡x\cos x\rightarrow-\sin x
  • tan⁡x→sec⁡2x\tan x\rightarrow\sec^2x
  • sec⁡x→sec⁡x⋅tan⁡x\sec x\rightarrow\sec x\cdot\tan x
  • csc⁡x→−csc⁡x⋅cot⁡x\csc x\rightarrow-\csc x\cdot\cot x
  • cot⁡x→−csc⁡2x\cot x\rightarrow-\csc^2x
  • arcsin⁡x→11−x2\arcsin x\rightarrow\frac1{\sqrt{1-x^2}}
  • arccos⁡x→−11−x2\arccos x\rightarrow-\frac1{\sqrt{1-x^2}}
  • arctan⁡x→11+x2\arctan x\rightarrow\frac1{\sqrt{1+x^2}}
Second Derivative

Definition: The second derivative of ff at x=ax=a is the derivative of f′(a)f^\prime(a), evaluated at x=ax=a.
We’ll learn later the graphical significance of f′′(x)f^{\prime\prime}(x).

Example

f(x)=5x3f(x)=5x^3. Find f′′(x),f′′(3)f^{\prime\prime}(x),f^{\prime\prime}(3):
f′(x)=15x2f^{\prime}(x)=15x^2
f′′(x)=30x⇒f′′(3)=90f^{\prime\prime}(x)=30x\Rightarrow f^{\prime\prime}(3)=90
In “physical” terms, if f(x)f(x) denotes distance, then f′(x)f^\prime(x) denotes velocity (change of distance over time), and f′′(x)f^{\prime\prime}(x) denotes acceleration (change of velocity over time)


May 15 Tirgul. Links to the board and the recording.
[Incomplete]


May 17 Lecture. Links to the board and the recording.
[Incomplete]