derivatives (1a) - wikimedia...2016/01/01  · derivatives (1a) 17 young won lim 1/1/16 the...

39
Young Won Lim 1/1/16 Derivatives (1A)

Upload: others

Post on 25-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Young Won Lim1/1/16

Derivatives (1A)

Page 2: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Young Won Lim1/1/16

Copyright (c) 2011 - 2016 Young W. Lim.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

Please send corrections (or suggestions) to [email protected].

This document was produced by using LibreOffice and Octave.

Page 3: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 3 Young Won Lim1/1/16

Differentials

Page 4: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 4 Young Won Lim1/1/16

A triangle and its slope

y = f x

f x1 h − f x1

h

x1, f x1

x1 h , f x1 h

x1, f x1

http://en.wikipedia.org/wiki/Derivative

x1 x1+h

f (x1+h)

f (x1)

Page 5: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 5 Young Won Lim1/1/16

Many smaller triangles and their slopes

f ( x1)

(x1, f (x1))

f ( x1+h2)

f ( x1+h1)

f ( x1+h)

f (x1 + h) − f ( x1)

h

f (x1 + h1) − f (x1)

h1

f (x1 + h2) − f (x1)

h2

limh→ 0

f (x1 + h) − f (x1)

h

x1 x1+h2 x1+h1 x1+h

(x1+h , f (x1+h))

h2

h1h

(x1, f (x1))

(x1+h , f (x1+h))

http://en.wikipedia.org/wiki/Derivative

Page 6: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 6 Young Won Lim1/1/16

The limit of triangles and their slopes

y = f x

f ' (x1) = limh→0

f (x1 + h) − f (x1)

h

The derivative of the function f at x1

http://en.wiktionary.org/

f ' (x) = limh→0

f (x + h) − f (x)h

=dfdx

=ddx

f (x)

The derivative function of the function f

y ' = f ' (x)

Page 7: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 7 Young Won Lim1/1/16

The derivative as a function

y = f x x1

x2

x3

f x1

f x2

f x3

f x

x1

x2

x3

f ' x 1

f ' x 2

f ' x 3

f ' x

= limh→0

f (x + h) − f (x)h

y ' = f ' (x)

Derivative Function

Page 8: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 8 Young Won Lim1/1/16

The notations of derivative functions

x1

x2

x3

f ' x 1

f ' x 2

f ' x 3

f ' (x)

limh→0

f (x + h) − f (x )

h

y ' = f ' x

Largrange's Notation

dydx

=ddx

f (x)

Leibniz's Notation

y = f x

Newton's Notation

D x y = D x f x

Euler's Notation

not a ratio.

● derivative with respect to x● x is an independent variable

slope of a tangent line

Page 9: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 9 Young Won Lim1/1/16

Another kind of triangles and their slope

y = f x

f

y ' = f ' x

given x1

the slope of a tangent line

http://en.wikipedia.org/wiki/Derivative

Page 10: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 10 Young Won Lim1/1/16

Differential in calculus

x1 x1 dx

f x1

f x1 dx

dx

dy

Differential: dx, dy, … ● infinitesimals● a change in the linearization of a function● of, or relating to differentiation

the linearization of a function

function

http://en.wikipedia.org/wiki/Derivative

f x1

f x1 dx

Page 11: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 11 Young Won Lim1/1/16

Approximation

x1 x1 dx

f x1

f x1 dx

dx

dy

Differential: dx, dy, …

the linearization of a function

function

http://en.wikipedia.org/wiki/Derivative

f x1

f x1 dx

f (x1 + dx ) ≈ f (x1) + dy

= f (x1) + f ' (x1)dx

f ' (x1) = limh→0

f (x1 + h) − f (x1)

h

Page 12: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 12 Young Won Lim1/1/16

Differential as a function

x1

f (x1)

Line equation in the new coordinate.

dx

dydy = f ' (x1) dx

slope = f ' (x1)

http://en.wikipedia.org/wiki/Derivative

dx1 dx2 dx3

dy1 dy2 dy3

=dy1

dx1

=dy2

dx2

=dy3

dx3

Page 13: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 13 Young Won Lim1/1/16

dy = f ' (x) dx

dydx

= f ' (x)

ratio not a ratio

dy =dfdx

dx

Differentials and Derivatives (1)

differentials derivativex1

f (x1)

dx

dydy = f ' (x1) dx

slope = f ' (x1)

http://en.wikipedia.org/wiki/Derivative

dx1 dx2 dx3

dy1 dy2 dy3

=dy1

dx1

=dy2

dx2

=dy3

dx3

Page 14: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 14 Young Won Lim1/1/16

Differentials and Derivatives (2)

for small enough dx

f (x1 + dx ) ≈ f (x1) + dy

= f (x1) + f ' (x1)dx

f (x1 + dx ) = f (x1) + dy

= f (x1) + f ' (x1)dx

limdx→0

f (x1 + dx ) − f (x1)

dx= f ' (x1)

limdx→0

x1

f (x1)

dx

dydy = f ' (x1) dx

slope = f ' (x1)

http://en.wikipedia.org/wiki/Derivative

dx1 dx2 dx3

dy1 dy2 dy3

=dy1

dx1

=dy2

dx2

=dy3

dx3

Page 15: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 15 Young Won Lim1/1/16

dy = f ' (x) dx

dy =dfdx

dx

Differentials and Derivatives (3)

dy = f dx

dy = Dx f dx

∫ dy = ∫ dfdx

dx

∫ dy = ∫ f ' (x) dx

∫ dy =∫ 1dy = y

y = f (x)

Page 16: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 16 Young Won Lim1/1/16

Integration Constant C

∫ dy = ∫ dfdx

dx

∫ dy = ∫ f ' (x) dx

y + C1 = f (x) + C2

y = f (x) + C

place a constant

place another constant

∫ dy = ∫ dfdx

dx + C

differs by a constant

∫ dy = ∫ f ' (x) dx + C

y = f (x) + C

place only one constant from the beginning

Page 17: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 17 Young Won Lim1/1/16

The differential of a function ƒ(x) of a single real variable x is the function of two independent real variables x and dx given by

(x , dx ) dy

Differential as a function

x1

f x1

Line equation in the new coordinate.

dx

dydy = f ' x1 dx

slope = f ' x1

http://en.wikipedia.org/wiki/Derivative

dy = f ' (x) dx

Page 18: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 18 Young Won Lim1/1/16

Applications of Differentials (1)

∫ f ( g(x ) )⋅g ' (x) dx ∫ f ( u ) du=

Substitution Rule

u = g( x) du = g ' (x )dx

∫ f (g)dgdx

dx ∫ f ( g ) dg=

du =dgdx

dx(I)

(II)

Page 19: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 19 Young Won Lim1/1/16

Applications of Differentials (2)

∫ f (x )g ' (x) dx f (x )g(x ) − ∫ f ' (x )g(x ) dx=

Integration by parts

u = f (x)

v = g(x )

du = f ' (x ) dx

dv = g ' ( x)dx

∫ f (x )g ' (x) dx f (x )g(x ) − ∫ f ' (x )g(x ) dx=

∫udv u v − ∫ v du=

du =dfdx

dx

dv =dgdx

dx

Page 20: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 20 Young Won Lim1/1/16

Derivatives and Differentials (large dx)

dx = 0.6;

f (x ) = sin(x )

tangent at x1

m = f ' (x1) f (x1) + f ' ( x1)dx

f ' (x1)dx

f (x1) = sin(x1)

dx

f (x2) + f ' (x2)dx

x1 x2

Page 21: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 21 Young Won Lim1/1/16

Euler Method of Approximation (large dx)

dx = 0.6;

f (x ) = sin(x )

tangent at x1

m = f ' (x1) f (x2) ≈ f (x1) + f ' (x1)dx

f (x1) = sin(x1)

dx

f (x3) ≈ f (x2) + f ' (x2)dx≈ (f (x2) + f ' (x2)dx ) + f ' (x2)dx

x1 x2 x3

Euler Method

Initial Value

Page 22: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 22 Young Won Lim1/1/16

Derivatives and Differentials (large dx = 0.6)

dx = 0.6;

dy = f ' (x) dx

dy =dfdx

dx ∫ dy = ∫ dfdx

dx

∫ dy = ∫ f ' (x) dx

y = f (x)

Page 23: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 23 Young Won Lim1/1/16

Derivatives and Differentials (small dx = 0.2)

dx = 0.2;

dy = f ' (x) dx

dy =dfdx

dx ∫ dy = ∫ dfdx

dx

∫ dy = ∫ f ' (x) dx

y = f (x)

Page 24: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 24 Young Won Lim1/1/16

Euler's Method of Approximation

Page 25: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 25 Young Won Lim1/1/16

Octave Code

clf; hold off;dx = 0.2;

x = 0 : dx : 8;y = sin(x);plot(x, y);t = sin(x) + cos(x)*dx ;y1 = [y(1), t(1:length(y)-1)];

y2 = [0];y2(1) = y(1);for i=1:length(y)-1 y2(i+1) = y2(i) + cos((i)*dx)*dx;endfor

hold ont = 0:0.01:8;plot(t, sin(t), "color", "blue");plot(x, y, "color", 'blue', "marker", 'o');plot(x, y1, "color", 'red', "marker", '+');plot(x, y2, "color", 'green', "marker", '*');

Page 26: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 26 Young Won Lim1/1/16

Prerequisite to First Order ODEs

Page 27: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 27 Young Won Lim1/1/16

Partial Derivatives

Function of one variable y = f (x)

d ydx

= limΔ x→0

f (x+Δ x )− f (x)

Δ x

Function of two variable

∂ z∂ x

= limΔ x→0

f (x+Δ x , y)− f (x , y)

Δ x

z = f (x , y )

∂ z∂ y

= limΔ y→0

f (x , y+Δ y )− f (x , y )

Δ y

treating as a constant

treating as a constant

y

x

Page 28: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 28 Young Won Lim1/1/16

Partial Derivatives Notations

Function of one variable y = f (x)

d ydx

= limΔ x→0

f (x+Δ x )− f (x)

Δ x

Function of two variables

∂ z∂ x

= limΔ x→0

f (x+Δ x , y)− f (x , y)

Δ x

z = f (x , y )

∂ z∂ y

= limΔ y→0

f (x , y+Δ y )− f (x , y )

Δ y

treating as a constant

treating as a constant

y

x

∂ z∂ x

=∂ f∂ x

= zx = f x

∂ z∂ y

=∂ f∂ y

= zy = f y

Page 29: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 29 Young Won Lim1/1/16

Higher-Order & Mixed Partial Derivatives

Second-order Partial Derivatives

∂2 z

∂ x2 = ∂∂x (∂ z∂ x ) ∂

2 z∂ y2 = ∂

∂ y ( ∂ z∂ y )Third-order Partial Derivatives

∂3 z

∂ x3= ∂

∂x (∂2z

∂ x2 )∂3 z

∂ y3= ∂

∂ y ( ∂2z

∂ y2 )Mixed Partial Derivatives

∂2z

∂ x∂ y= ∂

∂ x ( ∂ z∂ y ) ∂2z

∂ y ∂ x= ∂

∂ y (∂ z∂x )=?

∂2 z

∂ x∂ y=

∂2z

∂ y∂ x∂ z∂ x

,∂ z∂ y

,∂2z

∂ x∂ y,

∂2 z

∂ y∂ xall defined and continuous

Page 30: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 30 Young Won Lim1/1/16

Partial Derivative Examples (1)

http://en.wikipedia.org/wiki/Partial_derivative

(1,1,3) ∂∂x

z (1,1) = 3

z (x , 1) = x2 + x + 1

z(x,y) when y=1

tangent at x=1 of the function z(x,1)z = x2

+ x y + y2

∂ z∂ y

= x + 2 y

∂ z∂ x

= 2x + y

z = x2+ x y + y2

Page 31: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 31 Young Won Lim1/1/16

Partial Derivative Examples (2)

http://en.wikipedia.org/wiki/Partial_derivative

z (−1, y )

z (x ,1)

(1,1,3)

z = x2+ x y + y2

∂ z∂ y

= x + 2 y

∂ z∂ x

= 2x + y

z = x2+ x y + y2

z(x,y) when y=1

z(x,y) when x=-1

y

x

Page 32: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 32 Young Won Lim1/1/16

Partial Derivative Examples (3)

∂ z∂ y

= −1 + 2 y

z(x,y) when x=-1

y

z(x,y) when y=1

x

y

x

2x + 1

z (−1, y )z (x ,1)

x + 2y∂ z∂ x

= 2x + y

Page 33: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 33 Young Won Lim1/1/16

Chain Rule

x yy= f (x)

dydx

=dydu

dudx

x yy=g (x)

x uu=g(x )

yy= f (u)

Page 34: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 34 Young Won Lim1/1/16

Chain Rule and Partial Differentiation

(x , y) yz= f (x , y )

t xx=g (t)

(x , y)t

x=g (t)y

z= f (x , y )

t yy=h(t)

y=h(t)

dzdt

=∂ z∂x

dxdt

+∂ z∂ y

d ydt

Page 35: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 35 Young Won Lim1/1/16

Chain Rule and Total Differentials

z = f (x , y )

x (t)

y (t)

dzdt

=∂ z∂x

dxdt

+∂ z∂ y

d ydt

dx =dxdt

dt

d y =d ydt

dt

dzdt

dt =∂ z∂ x

dxdt

dt +∂ z∂ y

d ydt

dt

dz =∂ z∂ x

dx +∂ z∂ y

dy

Page 36: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 36 Young Won Lim1/1/16

Parameterized Function of Two Variables

z = x2+ x y + y2

∂ z∂ y

= x + 2 y

∂ z∂ x

= 2x + y

z = x2+ x y + y2

(1,1,3)

(x , y ) zf (x , y ) ∂ f

∂x(x, y ) =

∂ f∂x

=∂z∂x

∂ f∂y

(x , y ) =∂ f∂ y

=∂ z∂ y

(x , y )z

f (x , y )

t

x(t)

y (t )

dwd t

(t)

http://en.wikipedia.org/wiki/Partial_derivative

zt

w(t)

z=dzdt

=∂ f∂x

dxdt

+∂ f∂ y

dydt

dz =∂ f∂x

dx +∂ f∂ y

dy

Page 37: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 37 Young Won Lim1/1/16

Total Differential

http://de.wikipedia.org/wiki/Totales_DifferentialMuhammet Cakir

Page 38: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Derivatives (1A) 38 Young Won Lim1/1/16

Total Differential

dy

dy

∂z∂y

⋅dy

dx

dx

∂z∂x

⋅dx

dx

∂ z∂y

⋅dy

∂ z∂x

⋅dx

dz

dz =∂ z∂ x

⋅dx +∂ z∂ y

⋅dy

z = f (x, y)

dxdy

(x0, y0, f )

(x0+dx , y0+dy , f )

differential, ortotal differential

(x0, y0, 0)

(x0, y0, f )

Page 39: Derivatives (1A) - Wikimedia...2016/01/01  · Derivatives (1A) 17 Young Won Lim 1/1/16 The differential of a function ƒ(x) of a single real variable x is the function of two independent

Young Won Lim1/1/16

References

[1] http://en.wikipedia.org/[2] M.L. Boas, “Mathematical Methods in the Physical Sciences”[3] E. Kreyszig, “Advanced Engineering Mathematics”[4] D. G. Zill, W. S. Wright, “Advanced Engineering Mathematics”