Top Banner
06/21/22 http:// numericalmethods.eng.usf.edu 1 Differentiation- Discrete Functions Major: All Engineering Majors Authors: Autar Kaw, Sri Harsha Garapati http://numericalmethods.eng.u sf.edu Transforming Numerical Methods Education for STEM Undergraduates
21

Differentiation-Discrete Functions

Feb 25, 2016

Download

Documents

jadyn

Differentiation-Discrete Functions. Major: All 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
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: Differentiation-Discrete Functions

04/22/23http://

numericalmethods.eng.usf.edu 1

Differentiation-Discrete Functions

Major: All 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

xfxxfx

xfΔ

Δ0Δ

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 1The upward velocity of a rocket is given as a function of time in Table 1.

Using forward divided difference, find the acceleration of the rocket at .

t v(t)s m/s0 0

10 227.0415 362.7820 517.35

22.5 602.9730 901.67

Table 1 Velocity as a function of time

s 16t

Page 6: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu6

Example 1 Cont.

tttta ii

i

1

15it

51520

1

ii ttt

To find the acceleration at , we need to choose the two values closest to , that also bracket to evaluate it. The two points are and .

s16ts16t

s20ts15t

201 it

s16t

Solution

Page 7: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu7

Example 1 Cont.

2m/s 914.305

78.36235.5175

152016

a

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)(

nn

nn

nn xnaxanxaa

dxxdPxP

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 upward velocity of a rocket is given as a function of time in Table 2.

Using the third order polynomial interpolant for velocity, find the acceleration of the rocket at .

t v(t)s m/s0 0

10 227.0415 362.7820 517.35

22.5 602.9730 901.67

Table 2 Velocity as a function of time

s 16t

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 velocity given by

33

2210 tatataatv

Since we want to find the velocity 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

04.227,10 oo tvt

78.362,15 11 tvt

35.517,20 22 tvt

97.602,5.22 33 tvt

Solution

s 16ts 16t s 16t

.5.22 and ,20 ,15 ,10 321 tttto

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

33

2210 10101004.22710 aaaav

33

2210 15151578.36215 aaaav

33

2210 20202035.51720 aaaav

33

2210 5.225.225.2297.6025.22 aaaav

97.60235.51778.36204.227

1139125.5065.221800040020133752251511000100101

3

2

1

0

aaaa

Page 12: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu12

Example 2-Direct Fit Polynomials cont.

Solving the above four equations gives

3810.40 a

289.211 a

13065.02 a0054606.03 a

Hence

5.2210,0054606.013065.0289.213810.4 32

33

2210

tttt

tatataatv

Page 13: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu13

Example 2-Direct Fit Polynomials cont.

Figure 1 Graph of upward velocity of the rocket vs. time.

Page 14: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu14

Example 2-Direct Fit Polynomials cont.

,

The acceleration at t=16 is given by

16

16

t

tvdtda

Given that 5.2210,0054606.013065.0289.213810.4 32 ttttt

tvdtdta

32 0054606.013065.0289.213810.4 tttdtd

5.2210,016382.026130.0289.21 2 ttt

216016382.01626130.0289.2116 a2m/s664.29

Page 15: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu15

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 16: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu16

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

xxxxxxxxxf

xxxxxxxxxf

xxxxxxxxxf

Differentiating equation (2) gives

once, and so on

Lagrange Polynomial Cont.

Page 17: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu17

21202

12101

02010

2222 xf

xxxxxf

xxxxxf

xxxxxf

2

1202

101

2101

200

2010

212

222 xfxxxxxxxxf

xxxxxxxxf

xxxxxxxxf

Differentiating again would give the second derivative as

Lagrange Polynomial Cont.

Page 18: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu18

Example 3

Determine the value of the acceleration at using the second order Lagrangian polynomial interpolation for velocity.

t v(t)s m/s0 0

10 227.0415 362.7820 517.35

22.5 602.9730 901.67

Table 3 Velocity as a function of time

s 16t

The upward velocity of a rocket is given as a function of time in Table 3.

Page 19: Differentiation-Discrete Functions

http://numericalmethods.eng.usf.edu19

Solution

Example 3 Cont.

)()()()( 212

1

02

01

21

2

01

00

20

2

10

1 tvtttt

tttt

tvtttt

tttt

tvtttt

tttt

tv

0

2010

212t

ttttttt

ta

1

2101

202t

ttttttt

21202

102tν

ttttttt

04.227

20101510201516216

a 78.362

201510152010162

35.517

152010201510162

35.51714.078.36208.004.22706.0

2m/s784.29

Page 20: 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 21: Differentiation-Discrete Functions

THE END

http://numericalmethods.eng.usf.edu