24
07/04/22 http:// numericalmethods.eng.usf.edu 1 Differentiation- Discrete Functions Industrial Engineering Majors Authors: Autar Kaw, Sri Harsha Garapati http://numericalmethods.eng.u sf.edu Transforming Numerical Methods Education for STEM Undergraduates

Differentiation-Discrete Functions

  • Upload
    kieu

  • View
    24

  • Download
    0

Embed Size (px)

DESCRIPTION

Differentiation-Discrete Functions. Industrial Engineering Majors Authors: Autar Kaw, Sri Harsha Garapati http://numericalmethods.eng.usf.edu Transforming Numerical Methods Education for STEM Undergraduates. Differentiation –Discrete Functions http://numericalmethods.eng.usf.edu. - PowerPoint PPT Presentation

Citation preview

Page 1: Differentiation-Discrete Functions

04/21/23http://

numericalmethods.eng.usf.edu 1

Differentiation-Discrete Functions

Industrial Engineering Majors

Authors: Autar Kaw, Sri Harsha Garapati

http://numericalmethods.eng.usf.eduTransforming Numerical Methods Education for STEM

Undergraduates

Page 2: Differentiation-Discrete Functions

Differentiation –Discrete Functions

http://numericalmethods.eng.usf.edu

Page 3: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu3

Forward Difference Approximation

x

xfxxf

xxf

Δ

Δ

lim

For a finite

'Δ' x

x

xfxxfxf

Page 4: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu4

x x+Δx

f(x)

Figure 1 Graphical Representation of forward difference approximation of first derivative.

Graphical Representation Of Forward Difference

Approximation

Page 5: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu5

Example 1

The failure rate of a direct methanol fuel cell (DMFC) is given by the formula

Where is the reliability at a certain time , and the values of the reliability are given in Table 1.

th

tR

tRtR

th'

t

0 1 10 100 1000 2000 3000 4000 5000

1 0.9999 0.9998 0.9980 0.9802 0.9609 0.9419 0.9233 0.9050 hrs t

Table 1 Reliability of DMFC system.

tR

Using the forward divided difference method, find the failure rate of the DMFC system at hours.50t

Page 6: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu6

Example 1 Cont.

t

tRtRtR iii

1'

10it

9010100

1

ii ttt

5100000.290

9998.09980.090

1010050'

RRR

1001 it

Solution

Page 7: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu7

Example 1 Cont.

999.0

9998.040100000.2

10105010100

1010050

5

RRR

R

5

5

100020.2

999.0

100000.2

50

50'50

R

Rh

The reliability at hours is tR 50t

The failure rate at hours is then th 50t

Page 8: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu8

Direct Fit Polynomials

'1' n nn yxyxyxyx ,,,,,,,, 221100 thn

nn

nnn xaxaxaaxP

1110

12121 12

)( n

nn

nn

n xnaxanxaadx

xdPxP

In this method, given data points

one can fit a order polynomial given by

To find the first derivative,

Similarly other derivatives can be found.

Page 9: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu9

Example 2-Direct Fit Polynomials

The failure rate of a direct methanol fuel cell (DMFC) is given by the formula

Where is the reliability at a certain time , and the values of the reliability are given in Table 2.

th

tR

tRtR

th'

t

0 1 10 100 1000 2000 3000 4000 5000

1 0.9999 0.9998 0.9980 0.9802 0.9609 0.9419 0.9233 0.9050 hrs t

Table 2 Reliability of DMFC system.

tR

Using a third order polynomial interpolant for reliability , find the failure rate of the DMFC system at hours.50t

tR

Page 10: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu10

Example 2-Direct Fit Polynomials cont.

For the third order polynomial (also called cubic interpolation), we choose the reliability given by 3

32

210 tatataatR Since we want to find the reliability at , and we are using third order polynomial, we need to choose the four points closest to and that also bracket to evaluate it.

The four points are , , and hours.

9802.0,1000

9980.0,100

9998.0,10

9999.0,1

33

22

11

tRt

tRt

tRt

tRt oo

50t50t 50t

10 t 101 t 1002 t 10003 t

Solution

Page 11: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu11

Example 2-Direct Fit Polynomials cont.

such that

Writing the four equations in matrix form, we have

3

32

210

33

2210

33

2210

33

2210

1000100010009802.01000

1001001009980.0100

1001109998.010

1119999.01

aaaaR

aaaaR

aaaaR

aaaaR

9802.0

9980.0

9998.0

9999.0

10110110001

101100001001

1000100101

1111

3

2

1

0

96

6

a

a

a

a

Page 12: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu12

Example 2-Direct Fit Polynomials cont.

Solving the above four equations gives

113

82

51

0

100101.9

109788.9

100023.1

9991.0

a

a

a

a

Hence

10001 ,100101.9109788.9100023.199991.0 311285

33

2210

tttt

tatataatR

Page 13: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu13

Example 2-Direct Fit Polynomials cont.

Figure 2 Graph of reliability as a function of time.

Page 14: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu14

Example 2-Direct Fit Polynomials cont.

The reliability at is given by,

50

50'

t

tRdt

dR

Given that

10001 ,100101.9109788.9100023.199991.0 311285 tttttR

,

10001 ,107030.2109958.1100023.1

100101.9109788.9100023.199991.0

'

21075

311285

ttt

tttdt

d

tRdt

dtR

50t

Page 15: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu15

Example 2-Direct Fit Polynomials cont.

5

21075

109326.1

50107030.250109958.1100023.150'

R

Using the same function, we can also calculate the value of at .

tR 50t

99917.0

50100101.950109788.950100023.199991.050

10001 ,100101.9109788.9100023.199991.0311285

311285

R

tttttR

The failure rate is then

5

5

109343.1

99917.0

109326.1

'

tR

tRth

Page 16: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu16

Lagrange Polynomial nn yxyx ,,,, 11 thn 1In this method, given , one can fit a order Lagrangian polynomial

given by

n

iiin xfxLxf

0

)()()(

where ‘ n ’ in )(xf n stands for the thnorder polynomial that approximates the function

)(xfy given at )1( n data points as nnnn yxyxyxyx ,,,,......,,,, 111100 , and

n

ijj ji

ji xx

xxxL

0

)(

)(xLi a weighting function that includes a product of )1( n terms with terms of

ij omitted.

Page 17: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu17

Then to find the first derivative, one can differentiate xfnfor other derivatives.

For example, the second order Lagrange polynomial passing through

221100 ,,,,, yxyxyx is

2

1202

101

2101

200

2010

212 xf

xxxx

xxxxxf

xxxx

xxxxxf

xxxx

xxxxxf

Differentiating equation (2) gives

once, and so on

Lagrange Polynomial Cont.

Page 18: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu18

21202

12101

02010

2

222xf

xxxxxf

xxxxxf

xxxxxf

2

1202

101

2101

200

2010

212

222xf

xxxx

xxxxf

xxxx

xxxxf

xxxx

xxxxf

Differentiating again would give the second derivative as

Lagrange Polynomial Cont.

Page 19: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu19

Example 3

The failure rate of a direct methanol fuel cell (DMFC) is given by the formula

Where is the reliability at a certain time , and the values of the reliability are given in Table 3.

th

tR

tRtR

th'

t

0 1 10 100 1000 2000 3000 4000 5000

1 0.9999 0.9998 0.9980 0.9802 0.9609 0.9419 0.9233 0.9050 hrs t

Table 3 Reliability of DMFC system.

tR

Determine the value of the failure rate at hours using the second order Lagrangian polynomial interpolation for reliability.

50t

Page 20: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu20

Solution

Example 3 Cont.

)()()()( 212

1

02

01

21

2

01

00

20

2

10

1 tRtt

tt

tt

tttR

tt

tt

tt

tttR

tt

tt

tt

tttR

2

1202

101

2101

200

2010

21 222' tR

tttt

ttttR

tttt

ttttR

tttt

ttttR

For second order Lagrangian polynomial interpolation, we choose the reliability given by

Since we want to find the reliability at , and we are using a second order Lagrangian polynomial, we need to choose the three points closest to that also bracket to evaluate it. The three points are , , and .

Differentiation the above equation gives.

50t

50t 50t10 t 101 t 1002 t

Page 21: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu21

Hence

Example 3 Cont.

99918.0

9980.010100

1050

1100

150

9998.010010

10050

110

1509999.0

1001

10050

101

105050

R

5109102.1

9980.0101001100

1015029998.0

10010110

10015029999.0

1001101

1001050250'

R

We must also find the value of at . tR 50t

Page 22: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu22

Example 3 Cont.

5

5

109118.1

99918.0

109102.1

'

tR

tRth

The failure rate is then

Page 23: Differentiation-Discrete Functions

Additional ResourcesFor all resources on this topic such as digital audiovisual lectures, primers, textbook chapters, multiple-choice tests, worksheets in MATLAB, MATHEMATICA, MathCad and MAPLE, blogs, related physical problems, please visit

http://numericalmethods.eng.usf.edu/topics/discrete_02dif.html

Page 24: Differentiation-Discrete Functions

THE END

http://numericalmethods.eng.usf.edu