Presentation is loading. Please wait.

Presentation is loading. Please wait.

10/11/2015 1 Differentiation-Discrete Functions Chemical Engineering Majors Authors: Autar Kaw, Sri Harsha Garapati.

Similar presentations


Presentation on theme: "10/11/2015 1 Differentiation-Discrete Functions Chemical Engineering Majors Authors: Autar Kaw, Sri Harsha Garapati."— Presentation transcript:

1 10/11/2015 http://numericalmethods.eng.usf.edu 1 Differentiation-Discrete Functions Chemical Engineering Majors Authors: Autar Kaw, Sri Harsha Garapati http://numericalmethods.eng.usf.edu Transforming Numerical Methods Education for STEM Undergraduates

2 Differentiation –Discrete Functions http://numericalmethods.eng.usf.edu http://numericalmethods.eng.usf.edu

3 3 Forward Difference Approximation For a finite

4 http://numericalmethods.eng.usf.edu4 Figure 1 Graphical Representation of forward difference approximation of first derivative. Graphical Representation Of Forward Difference Approximation

5 http://numericalmethods.eng.usf.edu5 Example 1 A new fuel for recreational boats being developed at the local university was tested at an area pond by a team of engineers. The interest is to document the environmental impact of the fuel – how quickly does the slick spread? Table 1 shows the video camera record of the radius of the wave generated by a drop of the fuel that fell into the pond. Using the data a)Compute the rate at which the radius of the drop was changing at seconds. b)Estimate the rate at which the area of the contaminant was spreading across the pond at seconds.

6 http://numericalmethods.eng.usf.edu6 Example 1 Cont. Use Forward Divided Difference approximation of the first derivative to solve the above problem. Use a time step of 0.5 sec. Time 0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 Radius 0 0.236 0.667 1.225 1.886 2.635 3.464 4.365 5.333 Table 1 Radius as a function of time.

7 http://numericalmethods.eng.usf.edu7 Example 1 Cont. Solution (a)

8 Example 1 Cont. http://numericalmethods.eng.usf.edu8 (b) Time00.51.01.52.02.53.03.54.0 Area00.174971.39774.714411.17521.81337.69759.85789.350

9 http://numericalmethods.eng.usf.edu9 Direct Fit Polynomials 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.

10 http://numericalmethods.eng.usf.edu10 Example 2-Direct Fit Polynomials A new fuel for recreational boats being developed at the local university was tested at an area pond by a team of engineers. The interest is to document the environmental impact of the fuel – how quickly does the slick spread? Table 2 shows the video camera record of the radius of the wave generated by a drop of the fuel that fell into the pond. Using the data (a)Compute the rate at which the radius of the drop was changing at seconds. (b)Estimate the rate at which the area of the contaminant was spreading across the pond at seconds. Time (s) 00.51.01.52.02.53.03.54.0 Radius (m) 00.2360.6671.2251.8862.6353.4644.3655.333 Use the third order polynomial interpolant for radius and area calculations. Table 2 Radius as a function of time.

11 http://numericalmethods.eng.usf.edu11 Example 2-Direct Fit Polynomials cont. (a) For the third order polynomial (also called cubic interpolation), we choose the radius given by Since we want to find the radius at, and we are using a third order polynomial, we need to choose the four points closest to and that also bracket to evaluate it. The four points are (Note: Choosing is equally valid.) Solution

12 http://numericalmethods.eng.usf.edu12 Example 2-Direct Fit Polynomials cont. such that Writing the four equations in matrix form, we have

13 http://numericalmethods.eng.usf.edu13 Example 2-Direct Fit Polynomials cont. Solving the above four equations gives Hence

14 http://numericalmethods.eng.usf.edu14 Example 2-Direct Fit Polynomials cont. Figure 2 Graph of radius vs. time.

15 http://numericalmethods.eng.usf.edu15 Example 2-Direct Fit Polynomials cont. Given that, The derivative of radius at t=2 is given by

16 http://numericalmethods.eng.usf.edu16 Example 2-Direct Fit Polynomials cont. Time 00.51.01.52.02.53.03.54.0 Area 00.174971.39774.714411.17521.81337.69759.85789.350 (b) For the third order polynomial (also called cubic interpolation), we choose the area given by Since we want to find the area at, and we are using a third order polynomial, we need to choose the four points closest to and that also bracket to evaluate it. The four points are (Note: Choosing is equally valid.)

17 Example 2-fit Direct Ploynomials cont. http://numericalmethods.eng.usf.edu17 such that Writing the four equations in matrix form, we have

18 Example 2- Direct Fit polynomials cont. http://numericalmethods.eng.usf.edu18 Solving the above four equations gives Hence

19 http://numericalmethods.eng.usf.edu19 Example 2-Direct Fit Polynomials cont. Figure 3 Graph of area vs. time.

20 Example 2- Direct Fit Polynomial cont http://numericalmethods.eng.usf.edu20 Given that, The derivative of radius at t=2 is given by

21 http://numericalmethods.eng.usf.edu21 Lagrange Polynomial In this method, given, one can fit a order Lagrangian polynomial given by where ‘’ in stands for the order polynomial that approximates the function given atdata points as, and a weighting function that includes a product ofterms with terms of omitted.

22 http://numericalmethods.eng.usf.edu22 Then to find the first derivative, one can differentiate for other derivatives. For example, the second order Lagrange polynomial passing through is Differentiating equation (2) gives once, and so on Lagrange Polynomial Cont.

23 http://numericalmethods.eng.usf.edu23 Differentiating again would give the second derivative as Lagrange Polynomial Cont.

24 http://numericalmethods.eng.usf.edu24 Example 3 A new fuel for recreational boats being developed at the local university was tested at an are pond by a team of engineers. The interest is to document the environmental impact of the fuel – how quickly does the slick spread? Table 3 shows the video camera record of the radius of the wave generated by a drop of the fuel that fell into the pond. Using the data (a)Compute the rate at which the radius of the drop was changing at. (b)Estimate the rate at which the area of the contaminant was spreading across the pond at. Time00.51.01.52.02.53.03.54.0 Radius00.2360.6671.2251.8862.6353.4644.3655.333 Use second order Lagrangian polynomial interpolation to solve the problem. Table 3 Radius as a function of time.

25 Since we want to find the radius 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 Differentiating the above equation gives http://numericalmethods.eng.usf.edu25 Example 3 Cont. Solution: (a) For second order Lagrangian polynomial interpolation, we choose the radius given by Hence,

26 http://numericalmethods.eng.usf.edu26 Example 3 Cont. Time 00.51.01.52.02.53.03.54.0 Area 00.174971.39774.714411.17521.81337.69759.85789.350 (b) For second order Lagrangian polynomial interpolation, we choose the area given by

27 http://numericalmethods.eng.usf.edu27 Example 3 Cont. Since we want to find the area at, and we are using a second order Lagrangian polynomial, we need to choose the three points closest to that also brackets to evaluate it. The three points are Differentiating the above equation gives Hence

28 Additional Resources For 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_02 dif.html

29 THE END http://numericalmethods.eng.usf.edu


Download ppt "10/11/2015 1 Differentiation-Discrete Functions Chemical Engineering Majors Authors: Autar Kaw, Sri Harsha Garapati."

Similar presentations


Ads by Google