Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW III.

Similar presentations


Presentation on theme: "ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW III."— Presentation transcript:

1 ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW III

2 Topics Regression Analysis –Linear Regression –Linearized Regression –Polynomial Regression Numerical Integration –Newton Cotes –Trapezoidal Rule –Simpson Rules –Gaussian Quadrature

3 Topics Numerical Differentiation –Finite Difference Forms ODE – Initial Value Problems –Runge Kutta Methods ODE – Boundary Value Problems –Finite Difference Method

4 Regression Often we are faced with the problem… what value of y corresponds to x=0.935?

5 Curve Fitting Question 2 : Is it possible to find a simple and convenient formula that represents data approximately ? e.g. Best Fit ? Approximation

6 Experimental Measurements Strain Stress

7 BEST FIT CRITERIA Strain y Stress Error at each Point

8 Best Fit => Minimize Error Best Strategy

9 Best Fit => Minimize Error Objective: What are the values of a o and a 1 that minimize ?

10 Least Square Approximation In our case Since x i and y i are known from given data

11 Least Square Approximation

12 2 Eqtns 2 Unknowns

13 Least Square Approximation

14 Example

15 Quantification of Error Average

16 Quantification of Error Average

17 Quantification of Error Average

18 Quantification of Error Standard Deviation Shows Spread Around mean Value

19 Quantification of Error

20 “Standard Deviation” for Linear Regression

21 Quantification of Error Better Representation Less Spread

22 Quantification of Error Coefficient of Determination Correlation Coefficient

23 Linearized Regression The Exponential Equation

24 Linearized Regression The Power Equation

25 Linearized Regression The Saturation-Growth-Rate Equation

26 Polynomial Regression A Parabola is Preferable

27 Polynomial Regression Minimize

28 Polynomial Regression

29 3 Eqtns 3 Unknowns

30 Polynomial Regression Use any of the Methods we Learned

31 Polynomial Regression With a 0, a 1, a 2 known the Total Error Standard Error Coefficient of Determination

32 Polynomial Regression For Polynomial of Order m Standard Error Coefficient of Determination

33 Numerical Integration & Differentiation

34 Motivation

35

36

37 AREA BETWEEN a AND b

38 Motivation

39

40

41 Calculate Derivative Given

42 Motivation Given Calculate

43 Think as Engineers!

44 In Summary INTERPOLATE

45 In Summary Newton-Cotes Formulas Replace a complicated function or tabulated data with an approximating function that is easy to integrate

46 In Summary Also by piecewise approximation

47 Closed/Open Forms CLOSEDOPEN

48 Trapezoidal Rule Linear Interpolation

49 Trapezoidal Rule Multiple Application

50

51 xa=x o x1x1 x2x2 …x n-1 b=x n f(x)f(x 0 )f(x 1 )f(x 2 )f(x n-1 )f(x n )

52 Simpson’s 1/3 Rule Quadratic Interpolation

53 Simpson’s 3/8 Rule Cubic Interpolation

54 Gauss Quadrature x1x1 x2x2

55 General Case Gauss Method calculates pairs of wi, xi for the Integration limits -1,1 For Other Integration Limits Use Transformation

56 Gauss Quadrature For x g =-1, x=a For x g =1, x=b

57 Gauss Quadrature

58

59 PointsWeighting Factors wi Function Arguments Error 2W0=1.0X0=-0.577350269 F (4) (  ) W1=1.0X1= 0.577350269 3W0=0.5555556X0=-0.77459669 F (6) (  ) W1=0.8888888X1=0.0 W2=0.5555556X2=0.77459669

60 Gaussian Points PointsWeighting Factors wi Function Arguments Error 4W 0 =0.3478548X0=-0.861136312 F (8) (  ) W 1 =0.6521452X1=-339981044 W 2 =0.6521452X2=- 339981044 W 3 =0.3478548X3=0.861136312

61 Gaussian Quadrature Not a good method if function is not available

62 Fig 23.1 FORWARD FINITE DIFFERENCE

63 Fig 23.2 BACKWARD FINITE DIFFERENCE

64 Fig 23.3 CENTERED FINITE DIFFERENCE

65 Data with Errors

66 ODE IVP, BVP

67 Pendulum W=mg Ordinary Differential Equation

68 ODEs Non Linear Linearization Assume  is small

69 ODEs Second Order Systems of ODEs

70 ODE

71 ODE - OBJECTIVES Undetermined

72 ODE- Objectives Initial Conditions

73 ODE-Objectives Given Calculate

74 Runge-Kutta Methods New Value = Old Value + Slope X Step Size

75 Runge Kutta Methods Definition of  yields different Runge-Kutta Methods

76 Euler’s Method Let

77 Sources of Error Truncation: Caused by discretization Local Truncation Propagated Truncation Roundoff: Limited number of significant digits

78 Sources of Error Propagated Local

79 Euler’s Method

80 Heun’s Method PredictorCorrector 2-Steps

81 Heun’s Method Predict Predictor-Corrector Solution in 2 steps Let

82 Heun’s Method Correct Corrector Estimate Let

83 Error in Heun’s Method

84 The Mid-Point Method Remember: Definition of  yields different Runge-Kutta Methods

85 Mid-Point Method Predictor Corrector 2-Steps

86 Mid-Point Method Predictor Predict Let

87 Mid-Point Method Corrector Correct Estimate Let

88

89 Runge Kutta – 2 nd Order

90 Runge Kutta – 3rd Order

91 Runge Kutta – 4th Order

92 Boundary Value Problems

93 Fig 23.3 CENTERED FINITE DIFFERENCE

94 xoxo Boundary Value Problems x1x1 x2x2 x3x3 x n-1 xnxn...

95 Boundary Value Problems xoxo x1x1 x2x2 x3x3 x n-1 xnxn...

96 Boundary Value Problems xoxo x1x1 x2x2 x3x3 x n-1 xnxn...

97 Boundary Value Problems xoxo x1x1 x2x2 x3x3 x n-1 xnxn...

98 Boundary Value Problems xoxo x1x1 x2x2 x3x3 x n-1 xnxn...

99 Boundary Value Problems Collect Equations: BOUNDARY CONDITIONS

100 Example x1x1 x2x2 x3x3 x4x4

101

102

103

104

105


Download ppt "ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW III."

Similar presentations


Ads by Google