Top Banner
Section 4 Differentiable Functions If you are travelling at a constant speed, then it is easy to find this speed by measuring a distance Δx and how long it takes for you to travel that distance Δt: speed = Δx Δt . If you graph the distance x covered against time t, you just get a straight line, and the speed is the slope of this line.
26
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Differention nMaths

Section 4Differentiable Functions

If you are travelling at a constant speed, then

it is easy to find this speed by measuring a

distance ∆x and how long it takes for you to

travel that distance ∆t:

speed =∆x

∆t.

If you graph the distance x covered against

time t, you just get a straight line, and the

speed is the slope of this line.

Page 2: Differention nMaths

If your speed is varying, then the graph of

x(t) is more complicated. The speed at time

t0 is given by the slope of the graph at t0.

Finding this slope is a now much more

complicated problem geometrically.

Page 3: Differention nMaths

For a general graph of y = f(x), deciding

whether it even makes sense to talk about

the slope at a point can be difficult.

Examples:

Page 4: Differention nMaths

As you will know from high school, we say

that a graph y = f(x) has a well defined slope

at a point x0 if, as you magnify the part of

the graph around x0 larger and larger, what

you see looks more and more like a straight

line. The straight line that it looks like will

have a well-defined slope and that is what we

shall define to be the slope of the graph at x0.

Page 5: Differention nMaths

‘Looks more and more like’ is a bit vague,

but you can make sense of it — and indeed

will do in 2nd year.

Our actual definition involves taking secants

to the curve, and asking that the slopes of

these converge to some number.

Definition. Suppose that f : (a, b) → R and

that x ∈ (a, b). We shall say that f has slope

s at x if

limh→0

f(x + h)− f(x)

h

exists and equals s.

If f has a slope s at x then we shall

• say that f is differentiable at x.

• say that the derivative of f at x is s.

• write f ′(x) = s.

Page 6: Differention nMaths

Historical note:

This much was understood (without the

formal definition of limit) to the Greeks. The

real breakthrough of calculus is not the

definition of the derivative, but the fact that

we will be able to calculate it without actually

doing the hard work of taking limits!

Easy example. Let f(x) = x3. Find (using

the definition of derivative) f ′(2).

Suppose that h 6= 0. Then

f(2 + h) = (2 + h)3 = 8 + 12h + 6h2 + h3

and so

f(2 + h)− f(2)

h=

8 + 12h + 6h2 + h3 − 8

h= 12 + 6h + h2

→ 12

as h → 0.

Thus f ′(2) = 12.

Page 7: Differention nMaths

Harder example. Let f(x) = sin(x3). Find

(using the definition of derivative) f ′(2).

Suppose that h 6= 0. Then

f(2+h) = sin((2+h)3

)= sin(8+12h+6h2+h3)

and so

f(2 + h)− f(2)

h=

sin(8 + 12h + 6h2 + h3)− sin(8)

h→???

Ughhh! That limit looks hard!

What calculus provides us with are a set of

simple rules for

• Recognising which functions are

differentiable.

• Finding the derivatives ‘symbolically’

As before you use the definition to prove that

a few very simple functions are differentiable,

and then use the differentiation rules to

extend this to more complicated functions.

Page 8: Differention nMaths

Exercise 1. If f(x) = C (constant), then, for

all x ∈ R, f ′(x) = 0.

Exercise 2. If f(x) = x, then, for all x ∈ R,

f ′(x) = 1.

Page 9: Differention nMaths

Example. Let f(x) = sinx. Show that

f ′(x) = cosx.

To do this you need the identity

sin(A + B) = sinA cosB + cosA sinB.

Using this we see that if h 6= 0 then

sin(x + h)− sin(x)

h

=sin(x) cos(h) + cos(x) sin(h)− sin(x)

h

= sin(x)cos(h)− 1

h+ cos(x)

sin(h)

h.

Now you need (see the purple notes):

limh→0

cos(h)− 1

h= 0,

limh→0

sin(h)

h= 1.

Using these we see that

sin(x + h)− sin(x)

h→ cosx

as h → 0. [Hard work!]

Page 10: Differention nMaths

In fact, the previous calculation is about as

hard as it gets. You can do all the other

standard functions using the differentiation

(and other) theorems:

Theorem. Suppose that f and g are

differentiable at x. Then so are f + g, f − g

and fg. If g(x) 6= 0, then f/g is also

differentiable at x. Indeed:

• (f + g)′(x) = f ′(x) + g′(x),

• (Product rule)

(fg)′(x) = f ′(x)g(x) + f(x)g′(x),

• (Quotient rule)

(f/g)′(x) =f ′(x)g(x)− f(x)g′(x)

g(x)2.

The proof for (f + g)′ is very easy. The proof

for (fg)′ just requires a clever algebraic

manipulation (see the purple notes).

Page 11: Differention nMaths

We also need to deal with composition.

Chain Rule. Suppose that g is differentiable

at x and f is differentiable at g(x). Then f ◦ g

is differentiable at x with

(f ◦ g)′(x) = f ′(g(x)) g′(x).

The proof of this is NOT completely

straightforward! (See Spivak)

In any case, with these rules we can now

differentiate more or less any combination of

rational and trigonometric functions.

Notation. The prime notation f ′ leads to

less confusion that the Leibniz notationdy

dx.

Nonetheless, it is often convenient to write

something like

d

dx(cosx) = − sinx

rather than,

if f(x) = cosx, then f ′(x) = − sinx.

Page 12: Differention nMaths

Exercise. Use the product rule and induction

on n to prove that

d

dxxn = nxn−1

for n = 1,2, . . . .

Exercise. Prove thatd

dxtanx = sec2 x.

Most of you should by now have these rules

hard-wired into you. We expect that if asked

to differentiate

f(x) =cos(sin(x2 + 1)) + x3

sin4 x + cos2 x

you wouldn’t panic.

We haven’t yet dealt with functions like ex

and lnx which will have to wait until we

define them properly. We also haven’t

differentiated√

x.

Page 13: Differention nMaths

Implicit differentiation

Recall that something like

x4 − x2y2 + y4 = 13 (*)

determines y (locally) as a function of x.

To find the tangent line to this curve at say

(2,1), we need to find the derivative of y —

but we don’t have a formula for y(x). If we

write (∗) as

x4 − x2y(x)2 + y(x)4 = 13

then both sides are just functions of x. If we

differentiate both sides we get

4x3−2xy(x)2−x2 2y(x)y′(x)+4y(x)3y′(x) = 0

using both the product rule and the chain

rule.

Page 14: Differention nMaths

At (2,1) (ie x = 2, y(2) = 1) this says that

32− 4− 8y′(2) + 4y′(2) = 0

and hence

y′(2) = 7.

Thus, the tangent line to (∗) at (2,1) has

equation

y − 1 = 7(x− 2)

or

y = 7x− 13.

Page 15: Differention nMaths

To differentiate y(x) =√

x, we turn this into

an implicit polynomial formula

x− y(x)2 = 0.

If we differentiate this we get

1− 2y(x)y′(x) = 0

so (for x > 0)

y′(x) =1

2y(x)=

1

2√

x.

You can similarly show that for any rational

number αd

dxxα = αxα−1

thus extending the previous result for integer

powers. We will later extend this to all α ∈ R.

Page 16: Differention nMaths

Example. Define f : R → R by

f(x) =

−x2, x < 0,

x, x = 0,

x2, x > 0.

At x = 0, f(x) = x and hence f ′(0) = 1.

Page 17: Differention nMaths

For ‘split functions’ like this, you need to be

rather careful about what happens at the

join. This usually involves taking right and

left limits separately at the joint.

Here

limh→0+

f(0 + h)− f(0)

h= lim

h→0+

h2 − 0

h

= limh→0+

h = 0

and similarly

limh→0−

f(0 + h)− f(0)

h= lim

h→0−

−h2 − 0

h= 0.

Thus f ′(0) = limh→0

f(0 + h)− f(0)

hexists and

equals 0.

At a point like 1, we can just use the usual

method of finding f ′(x) as at and near this

point f(x) is given by the a single polynomial

formula.

Page 18: Differention nMaths

Some housekeeping . . .

If at a small scale, the graph of f looks like a

line, then surely it f must be continuous at

the point??? But does the definition force

this?

Theorem. Suppose that f is differentiable at

x. Then f is continuous at x.

Proof.

Page 19: Differention nMaths

Example. Define f : R → R by

f(x) =

x2, x ∈ Q,

−x2, x 6∈ Q.

If x 6= 0 then f is not continuous at x and

hence f is not differentiable there either.

Exercise: Use the pinching theorem to prove

that

limh→0

f(0 + h)− f(0)

h= 0

and hence f is differentiable at 0 with

f ′(0) = 0.

Again, for any x, as f is not given by a simple

formula on any interval containing x, you

can’t use the simple differentiation rules. You

have to go back to the definition.

Page 20: Differention nMaths

Higher derivatives

If f is nice, then f is differentiable at every x

(at least in some interval (a, b). Thus f ′ is

itself a function. You can ask therefore

whether f ′ is differentiable.

The derivative of f ′ is called the second

derivative of f , written f ′′.

You can then differentiate this to get f ′′′;after this point we usually write f(4), f(5) etc

for the higher derivatives.

So: why would you want to find f ′′(x)?

Remember, f ′(x) can be interpreted as the

rate of change in f at the point x. Thus f ′′(x)is the rate of change of the rate of change???

Better: f ′′ tells you the rate of change in the

slope of f . Thus, if f ′′(x) < 0, then the slope

is decreasing. Thus f ′′ tells you about

whether the graph is concave up or concave

down.

Page 21: Differention nMaths

In concrete applications, the different

derivatives often have specific meanings.

Displacement. If x(t) is the displacement of

a particle at time t, then

x′(t) = velocity at time t,

x′′(t) = acceleration at time t.

Prices. If P (t) is the price index at time t,

then

P ′(t) = inflation rate at time t

Politicians are often concerned about not just

P ′(t), but also P ′′(t) (or even . . . ).

In the fall of 1972 President Nixon

announced that the rate of increase of

inflation was decreasing. This was the

first time a sitting president used the

third derivative to advance his case for

reelection.

Page 22: Differention nMaths

Related rates

In real life problems, one often has many

quantities with complicated interrelations.

Keeping track of how some quantities change

as you change others usually requires careful

use of the chain rule.

Example.

Page 23: Differention nMaths

Approximating functions

Problem. Solve

f(x) = x4 + cosx + 2sinx = 1.1.

To do this you would like to rearrange

y = f(x)

to get a formula that tells you that

x = g(y)

for some ‘inverse’ function g.

You can’t do this here! You could hope to

find approximate solutionby replacing f with

a simpler function f̃ which is close to f .

For small h, f ′(x0) ≈f(x0 + h)− f(x0)

hso,

rearranging this:

f(x0 + h) ≈ f(x0) + hf ′(x0).

Sometimes we write this as

f(x) ≈ f(x0) + f ′(x0)(x− x0).

Page 24: Differention nMaths

[This of course just approximating f by the

tangent line at x0!]

In our example, take x0 = 0. Then

f(x0) = and

f ′(x) = 4x3 − sinx + 2cosx so f ′(x0) = .

Thus

f(x) ≈ 1 + 2x = f̃(x).

Now solving 1 + 2x = 1.1 is easy: x = .

This (hopefully) gives a reasonable

approximation to f(x) = 1.1.

Page 25: Differention nMaths

Maxima and minima

Suppose that f : (a, b) → R. We say that f

has a local maximum at a point c ∈ (a, b) if

there is a small interval I = (c− δ, c + δ) on

which

f(c) ≥ f(x), for all x ∈ I.

We say that c is a local maximum point.

Local minimum is defined similarly. A local

extreme point is one which is either a local

max or a local min.

Page 26: Differention nMaths

From school you know:

Theorem. If f : (a, b) → R has a local

maximum or a local minimum at c ∈ (a, b) and

f is differentiable at c, then f ′(c) = 0.

Of course the converse is false! That is, you

can easily have f ′(c) = 0 with f having

neither a local max nor a local min at c.

And of course it is easy to give examples of

functions where the local extreme points

occur at points of nondifferentiability.

Nonetheless, our method for hunting down

local extreme points will involve reducing the

possible points to consider from the infinite

set (a, b) to a finite set.