Top Banner
Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck, Sebastian Blohm
21

Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Dec 25, 2015

Download

Documents

Aleesha Lester
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: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

Differentiable Functions

Seminar „Hands-On Math for Computer Scientists“Saarbrücken, Feb. 2nd 2005

Daniel Beck, Sebastian Blohm

Page 2: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

Outline

• Solving exercises intuitively• Difficulties when solving the exercises• General rules for differentiability• Applying the rules

Page 3: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

The exercise

Determine which of the following functions are differentiable:– f(x)=x² – f(x)=1/x – f(x)=|x-1| – f(x)= √x with x≤4 and f(x)=x/4 + 1 with x>4

Page 4: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

When is a function f differentiable?

• A function f is differentiable at a point x0 if:

– It is continuous at – There exists a limit one limit of the difference

quotient:

• A function “f” is called differentiable (in I ) if it is diffenrentiable at every x0 ∈ I.

• When ist a function differentiable (over his domain I) ?

0

0

0

( ( ) ( ))lim

( )x x

f x f x

x x

Page 5: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

How do I check for differentiability at x0 ?

• If I have a plot of the function:

– Check if x0 has exactly one tangent.

• In the general case:– Check if f is continuous (in particular: no

jump)

– Check if

and both exist.

0 0 0 0

0 0

, ,0 0

( ( ) ( )) ( ( ) ( ))lim lim

( ) ( )

x x x x x x x x

f x f x f x f x

x x x x

Page 6: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

f(x)=x²

• Differentiable over R

Page 7: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

f(x) = 1/x

• Differentiable over \{0}

Page 8: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

f(x)=|x-1|

• Differentiable over \{1}

Page 9: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

f(x)= √x with x≤4 and f(x)=x/4 + 1 with x>4

Depending on the visualization, non-differentiable point might not be visible at all.

Page 10: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

Applying the definition

• Example : f(x)=x²

• So, the limes exists for all

• This was very easy!– But what about sin(x²) ?– This is clearly the wrong way!

0 0 0

2 20 0 0 0

00 0 0

( ( ) ( )) ( ) ( )( )lim lim lim 2

( ) ( ) ( )

x x x x x x

f x f x x x x x x xx

x x x x x x

0x

Page 11: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

Difficulties

Does anyone dare to calculate ?

PLUS: We cannot possibly calculate the limit of the difference quotient for all elements of the domain.

• How do I determine which points are crucial?• How do I prove that I did not miss a non-

differentiable point?

• Solution : apply some „cooking recipe”

0

2 20

0

(sin sin )lim

( )

x x

x x

x x

Page 12: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

General rules for checking differentiability

• Notation : – Predicates

• f is differentiable at• f is differentiable over I

– Functions:• Range of the function f on

interval I• : for

• : for

0

0

0

( ( ) ( ))lim

( )

x x

f x f x

x x

( ) :IRange g

:Id0

:xd

0x x

0x

0( )

xd f

0( )

xd f0x x

0x

0

0

0

( ( ) ( ))lim

( )

x x

f x f x

x x

Page 13: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

General rules for checking differentiability

Addition:

Substraction :

Multiplication:

Division:

( )I I

I

d f d g

d f g

( )I I

I

d f d g

d f g

( )I I

I

d f d g

d f g

( )

I I

I

d f d gf

dg

Page 14: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

General rules for checking differentiability

( )Id x x( )

( )I

I

d f

d f (cos )Id x(sin )Id x

( ) where

( )J

I

d fJ I

d f

Some special cases

Page 15: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

General rules (continued)

• Chain rule:

• Case splits:

( ) ( ) ( )

( )I J

I

Range g J d g d f

d g f

( ) ( ) ( ) ( ) lim( ( )) lim( ( ))

(if x k then else )

J L k k

x k x k

I

d g d f d f d f f x g x

d f g

Page 16: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

Example sin x²

2

2

( ) ( )

( ) ( sin( ))

(sin( ))

d x x d x xd x x d x x

d x

komp

sinmulIdId

Page 17: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

Example 1/x

\{0} \{0}

\{0}

(1) ( )

1

d d xDIV

dx

Page 18: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

Example √x with x≤4 and f(x)=x/4 + 1 with x>4

4 4

44

4 44 4

0 44

( ) ( 4)(1)( )

4 ( 1) ( ) lim( ) lim( 1) 4 4( ) ( 1)

4

4 14

x x

xx

x xx

x

d x dx dd x x

d d x xxd x d

xd if x then x else

Page 19: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

Example |x-1|

1 1

1 1 11 1

1 11 1

( ) (1)( 1) ( ) (1)

( 1) ( ( 1)) lim( 1) lim( ( 1))( ( 1)) ( 1)

(if x 1 then else )

1

x x

x x x

x xx x

I

d x dd x d x d

d x d x x xd x d x

d f gd x

( ( ) 0 ) I

I

d if f x then f else fABS

d f

FAILS!

Page 20: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

How to explain these rule in Active Math?

• With well explained sentances!• Example :

– f+g is differentiable if f an g are differentiable on I

– g(f) is differentiable if g is differentiable over the range of f and f is differentiable on I

– “If x<=k then f else g” is differentiable if f and g are differentiable, and if they have the same value and the same derivation then aproching k

– The calculations are a good visualization of the reasoning.

Page 21: Intuition|Difficulties | Rules | Examples Differentiable Functions Seminar „Hands-On Math for Computer Scientists“ Saarbrücken, Feb. 2nd 2005 Daniel Beck,

Intuition|Difficulties | Rules | Examples

Discussion

• Limits of the rule approach:– Counter example:

• is differentiable over !

– Do we want to stop when the first non-differentiable point is found? (Or do we want to modify the rules respectively.)

– One rule needed for each operation to be covered.

sin(| |)x