topics in mathematics practical session 3 - calculus · practical session 3 - calculus walheer...

21
Topics in Mathematics Practical Session 3 - Calculus Walheer Barnab´ e November 7, 2011 1/21 Walheer Barnab´ e Topics in Mathematics Practical Session 3 - Calculus

Upload: others

Post on 02-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Topics in MathematicsPractical Session 3 - Calculus

Walheer Barnabe

November 7, 2011

1/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 2: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Outline

(i) Derivatives of functions in R(ii) Derivatives of functions in Rn

(iii) Derivatives in use

2/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 3: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives of functions in R: Known derivatives

Known derivatives (c ∈ R):

(i) (c)′ = 0(ii) (x)′ = 1(iii) (xn)′ = nxn−1(n 6= 0)(iv) (ex)′ = ex

(v) (ln x)′ = 1/x(vi) (sin x)′ = cos x(vii) (cos x)′ = − sin x

Note: ( )′ = ddx (f (x)) = d

dx (y) = df (x)dx = dy

dx = fx

3/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 4: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives of functions in R: Rules

(i) [f (x) + g(x)]′ = f ′(x) + g ′(x)(ii) [f (x).g(x)]′ = f ′(x).g(x) + f (x).g ′(x)

(iii)[f (x)g(x)

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

[g(x)]2

(iv) [c.f (x)]′ = c .f ′(x) (c ∈ R)

Composed of functions: [f (g(x))]′ = f ′(g(x)).g ′(x) (Chain rule)

Useful trick: f (x) = e ln(f (x)) = ln(ef (x))

4/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 5: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives of functions in R: Exercises

Find the formula of the derivate of:

(i) ax (a ∈ R0)

(ii) 1f (x)

(iii) loga x

(iv) cot x

(v) ef (x)

(vi) sin(f (x))

(vii) f (x)g(x)

5/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 6: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives of functions in R: Interpretation of f ′ and f ′′

Interpretation of f ′:

f ′ > 0→ f is strictly increasingf ′ < 0→ f is strictly decreasingf ′ = 0→ f admit a critical point (could be a max or a min)

Interpretation of f ′′:

f ′′ > 0→ f ′ is strictly increasing → f is strictly convexf ′′ < 0→ f ′ is strictly decreasing → f is strictly concavef ′′ = 0→ f ′ admit a critical point → f could admit an inflectionpoint

Note: ( )′′ = ddx (df (x)

dx ) = ddx (dydx ) = d2f (x)

dx2 = d2ydx2 = fxx

6/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 7: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives of functions in R: Geometric interpretation

f ′(a)dx gives the change of the height of the curve f (x) (measuredfrom the x-axis) at the point a, if we move a tiny step dx alongthe x-axis.

f ′(a) is the slope of f at a.

f ′(a) is the instantaneous rate of change of f at a.

f ′(a)f (a) is the relative rate of change of f at a.

Note: f ′(x)dx is called the differential of y = f (x)

7/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 8: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives of functions in R: Exercises

Study the first- and second-order derivatives of:

(i) f (x) = x3

x2−1

(ii) g(x) = −4√5x+2

(iii) h(x) = x2|2x − 1|

(iv) i(x) = e−x2

(v) j(x) =

{e1/x , for x 6= 00, for x = 0

8/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 9: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives of functions in Rn: Partial derivatives

f admit n partial first-order derivatives:(

∂f∂x1, ∂f∂x2, . . . , ∂f

∂xn

)=gradf = ∇f.

f admit n + n(n−1)2 partial second-order derivatives: Hf

(Schwarz theorem).

Interpretation of ∇f: similar as f ′ for the critical point.Interpretation of Hf :- Hf is negative definite → f is concave- Hf is positive definite → f is convex- Hf is indefined → f could admit a saddle point

9/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 10: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

How to check the Hessian in practice?

2 ways:

(1) The minors Mi :

- |Mi | > (≥)0: (semi-)positive definite

- (−1)i |Mi | > (≥)0: (semi-)negative definite

- otherwise: indefinite

(2) the eigenvalues λi :

- λi > (≥)0: (semi-)positive definite

- λi < (≤)0: (semi-)negative definite

- otherwise: indefinite

10/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 11: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives of functions in Rn: Exercises

Study the Gradient (∇f) and the Hessian matrix (Hf ) of:

(i) f (x , y) = 2x3 + 5(x − y)2 − 6y

(ii) g(x , y) = x3 + y3 − 3xy

(iii) h(x , y) = x1+x2+y2

(iv) i(x , y) = y2 + xy ln x

(v) j(x , y , z) = ex+z + y4

11/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 12: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives of functions in Rn: Geometric interpretation

∂f∂xi

(a)dxi gives the change of the height of the curve f (x)(measured from the x1-. . . -xn-plane) at the point a, if we move atiny step dxi along the xi -axis.

∂f∂xi

(x10 , . . . , xi , . . . , xn0)dxi : we keep x1 = x10 , . . . , xn = xn0

constant and consider the surface f (x) along the xi -direction. Thepartial derivative gives the slope of this curve at xi .In other words: the partial derivative ∂f

∂xi(x1, x2, . . . , xi , . . . , xn)dxi

gives the slope of the surface at x in the xi -direction.

df (a) = ∂f∂x1

(a)dx1 + ∂f∂x2

(a)dx2 + · · ·+ ∂f∂xn

(a)dxn gives the totalchange of the height of the curve f (x) (measured from thex1-. . . -xn-plane) at the point a, if we move a tiny step dx1 alongthe x1-axis and a tiny step dx2 along the x2-axis and . . . and a tinystep dxn along the xn-axis.Note: df (a) is called the total differential of f at a 12/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 13: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives of functions in Rn: Geometric interpretation

∇f(a) is a n-dimensional vector in the x1-. . . -xn-plane attached tothat point.This defined a vector field: (x1, x2, . . . ,xn) → ∇f(x1, x2, . . . ,xn).

We had (the total change):df (a) = fx1(a)dx1 + fx2(a)dx2 + · · ·+ fxn(a)dxn =(fx1 , . . . , fxn)(a)(dx1, . . . , dxn)′ = ∇f(a)(dx1, . . . , dxn)′.

For a certain values of dx1, . . . , dxn, the vector (dx1, . . . , dxn)becomes perpendicular to the gradient ∇f(a), i.e. the scalarproduct vanishes. In this direction (dx1, . . . , dxn), the height of thesurface does not change, it determines the direction of anequipotential line. Therefore, the gradient ∇f(a) is perpendicularto the equipotential line through a; it determines the direction ofthe steepest increase of the function f .

13/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 14: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives of functions in Rn: Chain Rules

Let z = F (x , y) with x = f (t) and y = g(t), then:

dz

dt=∂F

∂x

dx

dt+∂F

∂y

dy

dt

Let z = F (x , y) with x = f (t, s) and y = g(t, s), then:

∂z

∂t=∂F

∂x

∂x

∂t+∂F

∂y

∂y

∂tand

∂z

∂s=∂F

∂x

∂x

∂s+∂F

∂y

∂y

∂s

Let z = F (x1, . . . , xn) with x1 = f1(t1, . . . , tm), . . . ,xn = fn(t1, . . . , tm), then (for j = 1, . . . ,m):

∂z

∂tj=∂F

∂x1

∂x1

∂tj+∂F

∂x2

∂x2

∂tj+ · · ·+ ∂F

∂xn

∂xn∂tj

14/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 15: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Chain Rules: Exercises

Find all the first-order derivatives of:

(i) z = f (x , y) if x = g1(p, q) and y = g2(p, q)

(ii) F (x , y) = f (g(x , y), x)

(iii) h(t) = f (m(t)) if m(t) = (m1(t),m2(t))

(iv) h(x1, x2) = f (g(x1, x2)) ifg(x1, x2) = (g1(x1), g2(x1, x2), g3(x2))

(v) w = f (x , y , z) if x = ω(t), y = π(t) and z = ε(t)

15/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 16: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives in use: Tangents

In R:Consider the tangent in a particular point a

The tangent is a straight line of equation y = f (x) = mx + p.

(i) m is the slope, that is f (a+h)−f (a)h which is f ′(a) if we let h go

to 0.

(ii) p = f (x)−mx and evaluate at the point a, we get:p = f (a)−ma = f (a)− f ′(a)a.

(i)+(ii) give: y = f ′(a)x + f (a)− f ′(a)a ory − f (a) = f ′(a)(x − a).

In Rn:f (x) = f (a) +∇f(x− a)

16/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 17: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives in use: Taylor expansions

In R:Taylor expansion of order m in a particular point a:

f (x) = f (a) + f ′(a)1! (x−a) + f ′′(a)

2! (x−a)2 + · · ·+ f (m)(a)m! (x−a)m + ε

ε since it is an approximation, we make some errors (limx→a ε = 0).If m = 1, we have the tangent.If a =0, Mac Laurin expansion.

In Rn:f (x) = f (a) + 1

1!∇f(x− a) + 12! (x− a)′Hf (x− a) + · · ·+ ε

17/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 18: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Tangents and Taylor expansions: Exercises

Find all the linear approximation of:

(i) f (x) = ln x in a = 1 (orders 1, 2 and 3)

(ii) g(x , y) = 3x2 + 4y2 in a = (0, 1) (orders 1 and 2)

(iii) h(x , y , z) = ln(1 + x) + y + 2yz in a = (0, 0, 0) (orders 1 and2)

18/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 19: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives in use: Elasticity

In R:

The elasticity of y w.r.t x is: ∆y/y∆x/x = x

y∆y∆x .

Letting y = f (x) and recall that ∆y∆x can be approximated by dy

dxwhich is the derivative of y w.r.t x , we get:

Elx f (x) = xf (x) f

′(x) [or El(f (x); x)]

In Rn:

The (partial) elasticity of z = f (x) w.r.t xi is: Elxi z = xif (x)

∂f (x)∂xi

19/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 20: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Elasticity: Exercises

Give the elasticity of:

(i) Elx f (x) in 2 if f (x) = ln x

(ii) Elxg(x) in a if g(x) = ex

(iii) Elxh(x , y) in (α, β) if h(x , y , z) = xyx2+y2 and (α, β) 6= 0

(iv) Ely i(x , y , z) in (1, 2, 3) if i(x , y , z) = exyz

20/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus

Page 21: Topics in Mathematics Practical Session 3 - Calculus · Practical Session 3 - Calculus Walheer Barnab e November 7, 2011 1/21 Walheer Barnab e Topics in Mathematics Practical Session

Derivatives in use: Link with limits

See practical session 1.

21/21

Walheer Barnabe Topics in Mathematics Practical Session 3 - Calculus