Part six: Numerical differentiation and numerical integration

Similar documents
Algebra I Aim: How do we determine the equation of a function from its graph? HW: "Vacations" Worksheet

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point

by Martin Mendez, UASLP Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9

BEKG 2452 NUMERICAL METHODS Solution of Nonlinear Equations

BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination December, 2015 BCS-054 : COMPUTER ORIENTED NUMERICAL TECHNIQUES

Curve Fitting. Objectives

UNIT 5: SIMULTANEOUS EQUATIONS (SYSTEMS OF EQUATIONS)

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

k + ln x 2, para x 0, k, en el punto en que x = 2, tiene la 1. La normal a la curva y = x

NUMERICAL METHODS. lor CHEMICAL ENGINEERS. Using Excel', VBA, and MATLAB* VICTOR J. LAW. CRC Press. Taylor & Francis Group

Data Fitting and Uncertainty

GENG2140, S2, 2012 Week 7: Curve fitting

Numerical Methods in Physics and Astrophysics

CHAPTER 4 ROOTS OF EQUATIONS

Hence a root lies between 1 and 2. Since f a is negative and f(x 0 ) is positive The root lies between a and x 0 i.e. 1 and 1.

Linear Algebra II (finish from last time) Root finding

M.SC. PHYSICS - II YEAR

Numerical Methods for Engineers. and Scientists. Applications using MATLAB. An Introduction with. Vish- Subramaniam. Third Edition. Amos Gilat.

Numerical Methods in Physics and Astrophysics

Saxon Advanced Mathematics Scope and Sequence

Mathematics, Algebra, and Geometry

Zeroes of Transcendental and Polynomial Equations. Bisection method, Regula-falsi method and Newton-Raphson method

Quiz ) Locate your 1 st order neighbors. 1) Simplify. Name Hometown. Name Hometown. Name Hometown.

MTH603 FAQ + Short Questions Answers.

An optimal sixteenth order convergent method to solve nonlinear equations

Virtual University of Pakistan

sum of squared error.

Introductory Numerical Analysis

Engineering. Mathematics. GATE 2019 and ESE 2019 Prelims. For. Comprehensive Theory with Solved Examples

Math 1 Unit 1 EOC Review

Finding Roots of Equations

Math 1 Unit 1 EOC Review

Excel for Scientists and Engineers Numerical Method s. E. Joseph Billo

Numerical Analysis Fall. Roots: Open Methods

ES-2 Lecture: More Least-squares Fitting. Spring 2017

North Carolina MATH I (Traditional) Pacing Guide

The iteration formula for to find the root of the equation

Standards for Mathematical Practice. Number and Quantity. Rewrite algebraic expressions with integer exponents using the properties of exponents.

A New Modification of Newton s Method

SECTION 7: CURVE FITTING. MAE 4020/5020 Numerical Methods with MATLAB

Sample Final Exam. Math S o l u t i o n s. 1. Three points are given: A = ( 2, 2), B = (2, 4), C = ( 4, 0)

Theory of signals and images I. Dr. Victor Castaneda

MATHEMATICS. Course Syllabus. Section A: Linear Algebra. Subject Code: MA. Course Structure. Ordinary Differential Equations

MATH 1301, Practice problems

Mathematical Methods for Numerical Analysis and Optimization

Non-linear least squares

USHA RAMA COLLEGE OF ENGINEERING & TECHNOLOGY

Newton-Raphson Type Methods

Math 122 Fall Unit Test 1 Review Problems Set A

Edexcel GCE Further Pure Mathematics (FP1) Required Knowledge Information Sheet. Daniel Hammocks

FACULTY OF ENGINEERING/EUROPEAN UNIVERSITY OF LEFKE MATH 224 (MATH 208/302/305) ENGINEERING MATHEMATICS (NUMERICAL METHODS) SPRING FINAL EXAM

Numerical Methods Lecture 3

Solution of Nonlinear Equations

Common Core State Standards for Mathematics - High School

Presentation by: H. Sarper. Chapter 2 - Learning Objectives

Computational Methods. Solving Equations

Midterm Review. Igor Yanovsky (Math 151A TA)

Part I 5. Part II 2. Part III 8. Part IV 10. Part V 5 TOTAL 30

p 1 p 0 (p 1, f(p 1 )) (p 0, f(p 0 )) The geometric construction of p 2 for the se- cant method.

Convergence Conditions for the Secant Method

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 4

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

1.8. Integration using Tables and CAS

Reduction to the associated homogeneous system via a particular solution

x is also called the abscissa y is also called the ordinate "If you can create a t-table, you can graph anything!"

Lecture 44. Better and successive approximations x2, x3,, xn to the root are obtained from

REVISTA INVESTIGACION OPERACIONAL VOL. 38, NO. 3, , 2017

Mock Final Exam Name. Solve and check the linear equation. 1) (-8x + 8) + 1 = -7(x + 3) A) {- 30} B) {- 6} C) {30} D) {- 28}

CURRICULUM CATALOG MATHEMATICS 1 (21032X0) NC

MATH 2053 Calculus I Review for the Final Exam

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. B) 6x + 4

Math 108 Final Exam Page 1 NO CALCULATORS OR CELL PHONES ALLOWED.

2. If the discriminant of a quadratic equation is zero, then there (A) are 2 imaginary roots (B) is 1 rational root

Index. Cambridge University Press Data Analysis for Physical Scientists: Featuring Excel Les Kirkup Index More information

Solve the problem. Determine the center and radius of the circle. Use the given information about a circle to find its equation.

MATE EXAMEN FINAL

MATH-1420 Review Concepts (Haugen)

6.4 Determinants and Cramer s Rule

MATHEMATICAL METHODS INTERPOLATION

Mathematics 3 Curs /Q1 - First exam. 31/10/13 Grup M1 Lecturers: Núria Parés and Yolanda Vidal

Estadística II Chapter 4: Simple linear regression

Appendix 8 Numerical Methods for Solving Nonlinear Equations 1

Bindel, Spring 2012 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 16. f(x) dx,

NC Math 1 Scope and Sequence A/B Day High School Refer to Unit Planning Organizers for Instructional Guidance

Even from Gregory-Leibniz series π could be computed: an example of how convergence of series can be accelerated

Engg. Math. II (Unit-IV) Numerical Analysis

Approximation expressions for the large-angle period of a simple pendulum revisited

Subatomic particle location charge mass

Matrices and Determinants

PARTIAL DIFFERENTIAL EQUATIONS

Preface. 2 Linear Equations and Eigenvalue Problem 22

Counting domino trains

5. Hand in the entire exam booklet and your computer score sheet.

X. Numerical Methods

a) Prepare a normal probability plot of the effects. Which effects seem active?

F I F T H E D I T I O N. Introductory Methods of Numerical Analysis. S.S. Sastry

The Solution of the Truncated Harmonic Oscillator Using Lie Groups

Question Bank (I scheme )

3.1 Introduction. Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x x 1.5 =0, tan x x =0.

Transcription:

Part six: Numerical differentiation and numerical integration Numerical integration formulas. Rectangle rule = = 21.1 Trapezoidal rule = 21.2 Simpson 1/3 = 21.2.3 Simpson 3/8 = =,,,, (21.3) (21.10) (21.15) (21.18) = (21.20) Numerical integration key points. Left hand side above formulas are for rule single application (eg..3,..15,..20) Right hand side above formulas are for rule multiple application (eg..10,..18) Lower bound of integration: a Upper bound of integration: b Keep in mind that if a single rule is being used in the computation of an area then all x axis points used in the evaluation of the function must be equidistant from each other. A.Cervantes MN Summary Page 1

Single application of Rectangle rule There is a single evaluation of the function: x m is located at the middle point between a and b = a b Single application of Trapezoidal rule There are two evaluations of the function:, Each value of x for the evaluation points coincide with the integration bounds a b Single application of Simpson 1/3 rule There are three evaluations of the function:,, x 0 and x 2 coincide with the integration bounds a b Single application of Simpson 3/8 rule There are four evaluations of the function:,,, x 0 and x 3 coincide with the integration bounds a b A.Cervantes MN Summary Page 2

Multiple application of Rectangle rule Rectangle rule sampled points: For n applications of rectangle rule we ll have n samples First sample x location: x1 = a + inc /2 Example for 4 rectangles: n=4 1111111111111222222222222233333333333334444444444444 a b x 1 x 2 x 3 x 4 Multiple application of Trapezoidal rule Trapezoidal rule sampled points:, For n applications of trapezoidal rule we ll have 2n samples Each value of x for the evaluation points coincide with the integration bounds Example for 4 trapezoids: n=4 1111111111111222222222222233333333333334444444444444 a b x 0 x 1 x 2 x 3 x 1 x 2 x 3 x 4 Multiple application of Simpson 1/3 rule There are three evaluations of the function:,, x 0 and x 2 coincide with the integration bounds a b A.Cervantes MN Summary Page 3

Multiple application of Simpson 3/8 rule There are four evaluations of the function:,,, x 0 and x 3 coincide with the integration bounds a b Chapter 3 Absolute true error = E t = true value calculated value (3.2) Absolute relative (fractional) true error = Absolute relative (%) true error = %= 100% (3.3) Part two: Roots 5.2 Bisection method (closed method) Open methods 6.1 Fixed point simple iteration method Given f(x), equate f(x) to zero and solve for any x in order to get x = g(x) = ) (6.2) Example1: 2+3=0 = Example2: sen x = 0 x = sen x + x Convergencia por método gráfico de las dos curvas Reformular f(x) = 0 como = entonces graficar = y = 6.2 Newton-Raphson method From figure 6.5 we get the slope: = = (6.6) A.Cervantes MN Summary Page 4

6.3 Secant method Having an additional initial point the rate of change is used as an aprox of f (x) = (6.7) 6.3.3 Método de la secante modificado = (6.8) A.Cervantes MN Summary Page 5

Systems of linear equations. *Inverse of a Matrix using Minors, Cofactors and Adjugate Montante method Excel: minverse( arraya ) Scilab commands: inv( A ), A^-1, 1/A, (See examples of above methods in MN examples file.) *Solving a linear system (finding the unknown variables vector) Gauss elimination method (with backward substitution) Montante method Excel: mmult( minverse( arraya ), arrayb) ) Scilab Commands: for entire unknown variable vector inv(a) * B ; A^-1 * B ; 1/A * B ; A \ B for individual unknown variable X i (Cramer s rule) det( A mi ) / det( A ) define a Matrix by listing its elements define a Matrix by using other (smaller and larger) matrices A.Cervantes MN Summary Page 6

Part five: Curve fitting. Least-Squares Regression 17.1 LINEAR REGRESSION (Least-Squares Linear Regression) Fitting a straight line to a set of paired observations: (x1, y1), (x2, y2),..., (xn, yn). Math expression for a straight line: = + + ; where a 0 is the intercept; a 1 is the slope; e is the error or residual Examples of some criteria for best fit that are inadequate for regression: (a) minimize the sum of the residuals, = inadequate for regression since any straight line passing through the midpoint of the connecting line (except a perfectly vertical line) results in a minimum value of Eq. (17.2) equal to zero because the errors cancel. (b) minimize the sum of the absolute values of the residuals, = inadequate for regression since for the four points shown, any straight line falling within the dashed lines will minimize the sum of the absolute values. Thus, this criterion also does not yield a unique best fit. (c) minimizes the maximum error of any individual point. inadequate for regression because it gives undue influence to an outlier, that is, a single point with a large error. The above criteria could work for some particular cases, but NOT for a general case. Rather than this we ll minimize the sum of the squares of the residuals between the measured y and the y calculated with the linear model: = = =,, (17.3) To determine values for a 0 and a 1, Eq. (17.3) is differentiated with respect to each coefficient: = 2 A.Cervantes MN Summary Page 7

= 2[ ] Setting these derivatives equal to zero will result in a minimum Sr. If this is done, the equations can be expressed as cero: 0= 0= Resulting in a set of two simultaneous linear equations with two unknowns (a 0 and a 1) known as normal equations: + = + = That can be solved simultaneously, = (17.6) = (17.7) *Use of Excel Analysis ToolPack for Linear regression 17.1.5 Linearization of not linear equations Equation: Exponential = Power function: = Saturated Growth- Rate: = + To linearize: ln=ln + ln ln=ln + log= log+log 1 = 1 + 1 axis: ln y vs x log y vs log x 1/y vs 1/x Slope: Intercept: 1 A.Cervantes MN Summary Page 8

17.2 Polynomial regression (order 2) Para ajustar a la línea de regresión cuadrática: = + + + se resuelve el siguiente sistema de ecuaciones lineales: + + = + + = (17.19) + + = Nota: todas las sumatorias son para i=1 hasta n Para encontrar la línea de regresión polinomial de grado m de manera similar habría que resolver un sistema de m+1 ecuaciones lineales simultáneas. 17.3 Regresión lineal múltiple Si y es una función lineal de x 1 y x 2 como en: = + + + A.Cervantes MN Summary Page 9

se resuelve el siguiente sistema de ecuaciones lineales: + + = + + = (17.22) + + = sumatorias son para i=1 hasta n Nota: todas las *Use of Excel Analysis ToolPack for Multiple Linear regression A.Cervantes MN Summary Page 10