calculus review

16
Calculus Review

Upload: kareem-noble

Post on 31-Dec-2015

26 views

Category:

Documents


2 download

DESCRIPTION

Calculus Review. Slope. Slope = rise/run = D y/ D x = (y2 – y1)/(x2 – x1) Order of points 1 and 2 not critical Points may lie in any quadrant: slope will work out Leibniz notation for derivative based on D y/ D x; the derivative is written dy/dx. Exponents. x 0 = 1. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Calculus Review

Calculus Review

Page 2: Calculus Review

Slope

• Slope = rise/run • = y/x • = (y2 – y1)/(x2 – x1)

• Order of points 1 and 2 not critical

• Points may lie in any quadrant: slope will work out

• Leibniz notation for derivative based on y/x; the derivative is written dy/dx

Page 3: Calculus Review

Exponents

• x0 = 1

Page 4: Calculus Review

Derivative of a line

• y = mx + b• slope m and y axis intercept b• derivative of y = axn + b with respect to x:• dy/dx = a n x(n-1) • Because b is a constant -- think of it as bx0 -- its

derivative is 0b-1 = 0 • For a straight line, a = m and n = 1 so• dy/dx = m 1 x(0), or because x0 = 1, • dy/dx = m

Page 5: Calculus Review

Derivative of a polynomial

• In differential Calculus, we consider the slopes of curves rather than straight lines

• For polynomial y = axn + bxp + cxq + …

• derivative with respect to x is

• dy/dx = a n x(n-1) + b p x(p-1) + c q x(q-1) + …

Page 6: Calculus Review

Example

a 3 n 3 b 5 p 2 c 5 q 0

0

2

4

6

8

10

12

14

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

x

y

y = axn + bxp + cxq + …

-5

0

5

10

15

20

25

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

x

y

dy/dx = a n x(n-1) + b p x(p-1) + c q x(q-1) + …

Page 7: Calculus Review

Numerical Derivatives

• slope between points

Page 8: Calculus Review

Derivative of Sine and Cosine

• sin(0) = 0 • period of both sine and cosine is 2• d(sin(x))/dx = cos(x) • d(cos(x))/dx = -sin(x)

-1.5

-1

-0.5

0

0.5

1

1.5

0 1 2 3 4 5 6 7

Sin(x)

Cos(x)

Page 9: Calculus Review

Partial Derivatives

• Functions of more than one variable• Example: h(x,y) = x4 + y3 + xy

1 4 7

10 13 16 19S1

S7

S13

S19

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5

3

X

Y

2.5-3

2-2.5

1.5-2

1-1.5

0.5-1

0-0.5

-0.5-0

-1--0.5

-1.5--1

Page 10: Calculus Review

Partial Derivatives

• Partial derivative of h with respect to x at a y location y0

• Notation h/x|y=y0

• Treat ys as constants• If these constants stand alone, they drop

out of the result• If they are in multiplicative terms involving

x, they are retained as constants

Page 11: Calculus Review

Partial Derivatives

• Example: • h(x,y) = x4 + y3 + xy

• h/x|y=y0 = 4x3 + y0

1 4 7

10 13 16 19S1

S7

S13

S19

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5

3

X

Y

2.5-3

2-2.5

1.5-2

1-1.5

0.5-1

0-0.5

-0.5-0

-1--0.5

-1.5--1

Page 12: Calculus Review

WHY?

Page 13: Calculus Review

Gradients

• del C (or grad C)

• Diffusion (Fick’s 1st Law):

y

C

x

CC

ji

CDJ

Page 14: Calculus Review

Numerical Derivatives

• slope between points

• MATLAB – c=[];– [dcdx,dcdy]=gradient(c)– contour([1:20],[1:20],c)– hold– quiver([1:20],[1:20],-dcdx,-dcdy)

Page 15: Calculus Review

Mathematica

Page 16: Calculus Review

Mathematica