2D1240 Numerical Methods II / André Jaun, NADA, KTH NADA

Size: px
Start display at page:

Download "2D1240 Numerical Methods II / André Jaun, NADA, KTH NADA"

Transcription

1 A NADA D4 Numerical Methods II / André Jaun, NADA, KTH 8. PRECISION INTEGRATION, NON-LINEAR EQUATIONS 8.. Remember: what we saw during the last lesson Numerical error propagation, convergence and Richardson etrapolation Differentiation using nite differences Integration Newton-Cotes quadrature rules (mid-point, trapezoidal, Simpson) 8.. Overview: what you will learn today Integration of periodic s, cubic Hermite polynomials and splines Gauss & Gauss-Konrod quadrature Methods for non-linear polynomial equations, bisection, secant and Newton-Raphson

2 I=quad(inline('sqrt(.5+*ep(-).*sin(*.^))'),,,E-7); Recursion level limit in quad reached 48 times. Singularity likely. Warning: Function dened in a separate le fq.m I=[I I] = T (h) f (b) f (a) I + f (b) f (a) h h 4 ::: 7 8. More on Newton-Cotes quadrature (NAM 5., H 8.3.) Error estimates are obtained eperimentally by comparing successive approimations. Using the highest resolution estimates from the previous eample: err= abs( ) = e-9 err with the nal result R q + ep( )sin( )d = : ± 5 9. The mid-point and trapezoidal rules both integrate eactly linear polynomials. The Simpson rule integrates eactly cubic polynomials. In Matlab use recursive Newton-Cotes quadratures with quad() or quadl() I = Periodic s are best integrated with a trapezoidal rule without etrapolation. It can be shown that the periodicity cancels out the errors for all powers resulting in an asymtotic convergence that is more rapid than any power of h. Higher order rules can in principle be dened using Romberg s method. Runge oscillations however yield negative weights w i and large cancellation errors.

3 Z b Z Z Z d = ; w + w = NX Z 8.3 Gauss quadrature (NAM 5.3, H 8.3.3) Choose N = 4 coefcients ( ;w ); ( ;w ) for a quadrature f()d ß G w f( ) + w f( ) so as to integrate eactly polynomials up to N = 3rd order (cubic) I = w + w = d = ; + w = Z w d = 3 ; w 3 + w 3 = Z 3 d = : This requires solving a system N = 4 of non-linear equation; the solution for the nodes i coincide with the zeros of Legre polynomials and are generally tabulated: here = = p ; w 3, = ; leads to a quadrature A linear transformation can be used to map any interval [a; b] to [ ; ] I ß f( :57735) + f(:57735) = b a f(t)dt f b a + b + a ß b a d a b i + b + a w i f a i=

4 Z b f(t)dt ß G N b a NX b a Ig=gauss(N,F,a,b) Gauss quadrature of order N, integrand F, interval [a,b] N switch, g=[ ]; wg=[ ]; case b + a 3, g=[ ]; wg=[ ]; case 4, g=[ ]; wg=[ ]; case 5, g=[ ]; case ]; wg=[ , g=[ ]; case ]; wg=[ , g=[ ]; case ]; wg=[ out=nan; return otherwise g]; wg=[fliplr(wg(n:nh)) wg]; g=[-fliplr(g(n:nh)) abm=(a+b)/; tg=hh*g+abm; Change interval to [-;] hh=(b-a)/; g=[]; for k=:5, g=[g gauss(k,inline('ep(-.^)'),,)]; ; g = g Gauss quadrature using N nodes to integrate eactly polynomials of order N w i f(t i ); t i = i + With Matlab the nodes and weights can be tabulated as a i= nh=floor((n+)/); n=nh-floor(n/)+; Complete nodes and weights fg=feval(f,tg); Ig=hh*sum(wg.*fg); Result of Gauss quadrature Runge oscillations do not appear for large N because i are not evenly spaced: the weights w i remain all positive, preventing cancellation errors. Unfortunately previous evaluations cannot be re-used when increasing N! N +.

5 7X = K b a b + a b + a Gauss-Konrod uses 7 Gauss nodes and 8 Konrod nodes for two quadratures w i f(t i ); t i = 7 = b a G i + i= 7 v i f( i ) 5 = b a K i= 8X i= A ; i = b a K where 5 reuses the f(t values ) i G from 7 to integrate eactly polynomials only up to order (instead of 3 with 5 Gauss points), but provides an error estimate u i f(t i ) + ο i + d ; d = jk 5 G 7 j j 5 qd=jk Error < With Matlab divide the quadrature into 3 intervals.4. Gauss Konrod quadrature G 7 K 5 Gauss Konrod =[.8.5 ]; Ig=[]; Ik=[]; Ek=[]; for i=:length()-, =gauss(7,@fq,(i),(i+)); Ig=[Ig Igi]; Igi Ik=[Ik Iki]; [Iki,e]=g7k5(@fq,(i),(i+)); e]; Ek=[Ek G7=sum(Ig), K5= sum([ik;ek],) = G7 f()=[.5+ep( )sin( )]

6 [Igk,err]=g7k5(F,a,b); Gauss-Kronrod with 5-points, integrand F, interval [a,b] 7 Gauss points and weights ]; g=[ ]; wg=[ g]; wg=[fliplr(wg) wg]; g=[-fliplr(g) 8 Kronrod points and new weights ]; k=[ ]; u=[ ]; v=[ k]; u=[fliplr(u) u]; v=[fliplr(v) v]; k=[-fliplr(k) Quadrature in standard interval [-,] Error estimate err=*d*sqrt(d/abs(k5)); d=abs(k5-g7); Return approimation and error estimate err=ma([eps*abs(k5) err]); Igk=K5; - trapezoidal Simpson (Romberg) & G. G 7 K 5 In Matlab the Gauss-Konrod nodes and weights can be tabulated as hh=(b-a)/; abm=(a+b)/; tg=hh*g+abm; fg=feval(f,tg); G7 = hh*sum(wg.*fg); tk=hh*k+abm; fk=feval(f,tk); K5= hh*(sum(u.*fg)+sum(v.*fk)); Peer Teaching ( minutes to think, eplain to your neighbour and vote) Choosing a quadrature. Which method / rule should you use to integrate numerically with the highest precision possible a) A cubic (Hermite or Bézier) polynomial c) R ß ( sin )ecos d ß b) A square root d) + R ( + sin )e p 3 d

7 Z ß= Z ß= Z cos() p p = t p + p = p sin Z p ß= Z ß= Z 5 Z p ß= Z ß= d 4=X 3 =3 q + 6; Error < Tricks and other quadratures (NAM , H 8.4) Singularities: change variable, integrate analytically or use the lowest order possible cos(t ) = tdt = cos(t )dt t ψ p! p d sin p d + z } p ß analytically= z } behaved well Improper integrals: transform with =-logt, = t t or nd an upper bound for the tail d d d X q + 6 = Z X q Z q z } R X Error< d = 4 +

8 f=fqd(,y) f=sqrt(3+sin(3**y)+cos(3*y)).*ep(-(/pi).^); I=qd(Q); in D, Q the renement factor Quadrature =(a:d:b)'; d=(b-a)/n; c=.^/pi-+pi/4; F=[]; G=[]; Y=[]; i=:n+ for y=c(i):dy:d(i); dy=(d(i)-c(i))/ny; f=fqd((i),y); g=dy*(sum(f)-.5*(f()+f(ny+)));trapezoidal-y y]; F=[F; f]; G=[G; g]; Y=[Y; Double integrals are treated one dimension after the other Z Z f(; y)ddy = Z b d() "Z f(; y)dy # c() d D a z } g() n=*q; ny=5*q; a=; b=pi; Domain a,b Domain c() d=/pi+ep(-/pi)+ep(-(-).^); d() Trapezoidal- I=d*(sum(G)-.5*(G()+G(n+))); return I=qd(); I=qd(); I=[I I I+(I-I)/3] = Simple resolution I Double resolution Romberg / Simpson D f(,y) 3.5 y.5 For rectangular integration domains D, youcanalsousedblquad().

9 Problem: nd a solution of the non-linear f() = equation f() changes sign unless is a double root, e.g. ( ) = ffl g7=roots([ ])' = g7 8.5 Non-linear equations (NAM , H 5.5) ffl f () changes sign if is a double root, e.g. = Polynomial equations are solved using Matlab s command root() The zeros of P 7 () = ( )=6, the Legre polynomial used in the Gauss-Konrod G 7 K 5 quadrature, are Bisection method: divide the interval succesively by two =bisection(f,a,b,tol) fa=feval(f,a); abs(b-a)>tol while f=feval(f,); =a+(b-a)/; 8 Interval bisection 6 sign(fa)==sign(f) if fa=f; a=m; else fb=f; b=m; f()= 4sin() 4 3 return bisection(inline('.^-4*sin()'),.,.5,e-6) = ( iterations) ans Robust, but very Error < log slow with b a tol 4

10 Newton Raphson method: = n f( n) f ( n+ ) n =newton(f,fp,,tol) a=+*tol; Secant method: = n ( n n )f( n ) f( n+ ) f( n ) n =secant(f,a,b,tol) fb=feval(f,b); fa=feval(f,a); 8 Secant method 6 abs(b-a)>tol while f=feval(f,); =b-fb*(b-a)/(fb-fa); fa=fb; a=b; fb=f; b=; return secant(inline('.^-4*sin()'),.5,.5,e-6) = (6 iterations) ans Fast superlinear convergence, but requires a good initial guess. Doesn t f need (). f()= 4sin() Newton method abs(-a)>tol while a=; 8 6 fp=feval(fp,) f=feval(f,); =-f/fp; return newton(inline('.^-4*sin()'),... inline('*-4*cos()'),.3,e-6) f()= 4sin() 4 3 ans = Superfast quadratic convergence, but requires a good initial guess and f ()

11 = f( n) ( n ) + ff n + (ff n ) f (n ) f ( n ) + ::: f f ( n ) ( n ) + ::: f Convergence rate p dened with j n+ ffj ß Cj n ffj p Denote the solution = ff and epand with Taylor around n = f( n ) + (ff n )f ( n ) + (ff n) f(ff) f ( n ) + ::: Divide f by ( n ) 6= and substitute the solution f(ff) = n f( n) f ( n ) ff = (ff n) Newton: n+ which yields a quadratic convergence near a single root z } j n+ ffj ß Cj n ffj ; f ( n ) C lim = n! f (ff) = ( n ) f (ff) f The convergence gets down to linear near a double f root (ff) =.

12 =iter(f,,tol) a=+*tol; return iter(inline('*sqrt(sin())'),.5,e-6) Fied point iteration method: rewrite f() = inaform n+ = G( n ) f() = 4 sin = ) n+ = p sin n 3.5 Fied point iteration f()= abs(-a)>tol while a=; =feval(f,); =[sin()] /.5 f()=[sin()] / (5 iterations) Converges linearly if jg ()j <, but is of little practical interest. ans =

2D1240 Numerical Methods II / André Jaun, NADA, KTH NADA

2D1240 Numerical Methods II / André Jaun, NADA, KTH NADA ND 2D24 Numerical Methods II / ndré Jaun, ND, KTH 2. INITIL- / OUNDRY VLUE PROLEMS 2.. Remember: what we saw during the last lesson Euler and Runge-Kutta methods for solving ODEs Predator-prey model using

More information

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam Jim Lambers MAT 460/560 Fall Semester 2009-10 Practice Final Exam 1. Let f(x) = sin 2x + cos 2x. (a) Write down the 2nd Taylor polynomial P 2 (x) of f(x) centered around x 0 = 0. (b) Write down the corresponding

More information

Numerical Integration (Quadrature) Another application for our interpolation tools!

Numerical Integration (Quadrature) Another application for our interpolation tools! Numerical Integration (Quadrature) Another application for our interpolation tools! Integration: Area under a curve Curve = data or function Integrating data Finite number of data points spacing specified

More information

Integration, differentiation, and root finding. Phys 420/580 Lecture 7

Integration, differentiation, and root finding. Phys 420/580 Lecture 7 Integration, differentiation, and root finding Phys 420/580 Lecture 7 Numerical integration Compute an approximation to the definite integral I = b Find area under the curve in the interval Trapezoid Rule:

More information

Numerical Methods. Root Finding

Numerical Methods. Root Finding Numerical Methods Solving Non Linear 1-Dimensional Equations Root Finding Given a real valued function f of one variable (say ), the idea is to find an such that: f() 0 1 Root Finding Eamples Find real

More information

SOLVING EQUATIONS OF ONE VARIABLE

SOLVING EQUATIONS OF ONE VARIABLE 1 SOLVING EQUATIONS OF ONE VARIABLE ELM1222 Numerical Analysis Some of the contents are adopted from Laurene V. Fausett, Applied Numerical Analysis using MATLAB. Prentice Hall Inc., 1999 2 Today s lecture

More information

Exact and Approximate Numbers:

Exact and Approximate Numbers: Eact and Approimate Numbers: The numbers that arise in technical applications are better described as eact numbers because there is not the sort of uncertainty in their values that was described above.

More information

Math Numerical Analysis Mid-Term Test Solutions

Math Numerical Analysis Mid-Term Test Solutions Math 400 - Numerical Analysis Mid-Term Test Solutions. Short Answers (a) A sufficient and necessary condition for the bisection method to find a root of f(x) on the interval [a,b] is f(a)f(b) < 0 or f(a)

More information

Numerical Integration

Numerical Integration Numerical Integration Sanzheng Qiao Department of Computing and Software McMaster University February, 2014 Outline 1 Introduction 2 Rectangle Rule 3 Trapezoid Rule 4 Error Estimates 5 Simpson s Rule 6

More information

Numerical Integration of Functions

Numerical Integration of Functions Numerical Integration of Functions Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University Reference: 1. Applied Numerical Methods with MATLAB for Engineers,

More information

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

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn Review Taylor Series and Error Analysis Roots of Equations Linear Algebraic Equations Optimization Numerical Differentiation and Integration Ordinary Differential Equations Partial Differential Equations

More information

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b) Numerical Methods - PROBLEMS. The Taylor series, about the origin, for log( + x) is x x2 2 + x3 3 x4 4 + Find an upper bound on the magnitude of the truncation error on the interval x.5 when log( + x)

More information

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

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9 TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1 Chapter 01.01 Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9 Chapter 01.02 Measuring errors 11 True error 11 Relative

More information

Numerical integration and differentiation. Unit IV. Numerical Integration and Differentiation. Plan of attack. Numerical integration.

Numerical integration and differentiation. Unit IV. Numerical Integration and Differentiation. Plan of attack. Numerical integration. Unit IV Numerical Integration and Differentiation Numerical integration and differentiation quadrature classical formulas for equally spaced nodes improper integrals Gaussian quadrature and orthogonal

More information

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.

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. 3.1 Introduction Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x 3 +1.5x 1.5 =0, tan x x =0. Practical existence test for roots: by intermediate value theorem, f C[a, b] & f(a)f(b)

More information

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

Numerical Methods for Engineers. and Scientists. Applications using MATLAB. An Introduction with. Vish- Subramaniam. Third Edition. Amos Gilat. Numerical Methods for Engineers An Introduction with and Scientists Applications using MATLAB Third Edition Amos Gilat Vish- Subramaniam Department of Mechanical Engineering The Ohio State University Wiley

More information

Numerical Integra/on

Numerical Integra/on Numerical Integra/on Applica/ons The Trapezoidal Rule is a technique to approximate the definite integral where For 1 st order: f(a) f(b) a b Error Es/mate of Trapezoidal Rule Truncation error: From Newton-Gregory

More information

CS 257: Numerical Methods

CS 257: Numerical Methods CS 57: Numerical Methods Final Exam Study Guide Version 1.00 Created by Charles Feng http://www.fenguin.net CS 57: Numerical Methods Final Exam Study Guide 1 Contents 1 Introductory Matter 3 1.1 Calculus

More information

Applied Numerical Analysis

Applied Numerical Analysis Applied Numerical Analysis Using MATLAB Second Edition Laurene V. Fausett Texas A&M University-Commerce PEARSON Prentice Hall Upper Saddle River, NJ 07458 Contents Preface xi 1 Foundations 1 1.1 Introductory

More information

Page No.1. MTH603-Numerical Analysis_ Muhammad Ishfaq

Page No.1. MTH603-Numerical Analysis_ Muhammad Ishfaq Page No.1 File Version v1.5.3 Update: (Dated: 3-May-011) This version of file contains: Content of the Course (Done) FAQ updated version.(these must be read once because some very basic definition and

More information

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015 CLASS NOTES Computational Methods for Engineering Applications I Spring 2015 Petros Koumoutsakos Gerardo Tauriello (Last update: July 2, 2015) IMPORTANT DISCLAIMERS 1. REFERENCES: Much of the material

More information

Example - Newton-Raphson Method

Example - Newton-Raphson Method Eample - Newton-Raphson Method We now consider the following eample: minimize f( 3 3 + -- 4 4 Since f ( 3 2 + 3 3 and f ( 6 + 9 2 we form the following iteration: + n 3 ( n 3 3( n 2 ------------------------------------

More information

Name of the Student: Unit I (Solution of Equations and Eigenvalue Problems)

Name of the Student: Unit I (Solution of Equations and Eigenvalue Problems) Engineering Mathematics 8 SUBJECT NAME : Numerical Methods SUBJECT CODE : MA6459 MATERIAL NAME : University Questions REGULATION : R3 UPDATED ON : November 7 (Upto N/D 7 Q.P) (Scan the above Q.R code for

More information

Homework 5 - Solutions

Homework 5 - Solutions Spring Math 54 Homework 5 - Solutions BF 3.4.4. d. The spline interpolation routine below produces the following coefficients: i a i b i c i d i -..869948.75637848.656598 -.5.9589.487644.9847639.887.9863.34456976.489747

More information

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2.

INTERPOLATION. and y i = cos x i, i = 0, 1, 2 This gives us the three points. Now find a quadratic polynomial. p(x) = a 0 + a 1 x + a 2 x 2. INTERPOLATION Interpolation is a process of finding a formula (often a polynomial) whose graph will pass through a given set of points (x, y). As an example, consider defining and x 0 = 0, x 1 = π/4, x

More information

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004 Department of Applied Mathematics and Theoretical Physics AMA 204 Numerical analysis Exam Winter 2004 The best six answers will be credited All questions carry equal marks Answer all parts of each question

More information

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 4

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 4 2.29 Spring 2015 Lecture 4 Review Lecture 3 Truncation Errors, Taylor Series and Error Analysis Taylor series: 2 3 n n i1 i i i i i n f( ) f( ) f '( ) f ''( ) f '''( )... f ( ) R 2! 3! n! n1 ( n1) Rn f

More information

A first order divided difference

A first order divided difference A first order divided difference For a given function f (x) and two distinct points x 0 and x 1, define f [x 0, x 1 ] = f (x 1) f (x 0 ) x 1 x 0 This is called the first order divided difference of f (x).

More information

Numerical Methods in Physics and Astrophysics

Numerical Methods in Physics and Astrophysics Kostas Kokkotas 2 October 20, 2014 2 http://www.tat.physik.uni-tuebingen.de/ kokkotas Kostas Kokkotas 3 TOPICS 1. Solving nonlinear equations 2. Solving linear systems of equations 3. Interpolation, approximation

More information

Nonlinear Equations. Chapter The Bisection Method

Nonlinear Equations. Chapter The Bisection Method Chapter 6 Nonlinear Equations Given a nonlinear function f(), a value r such that f(r) = 0, is called a root or a zero of f() For eample, for f() = e 016064, Fig?? gives the set of points satisfying y

More information

Chapter 3: Root Finding. September 26, 2005

Chapter 3: Root Finding. September 26, 2005 Chapter 3: Root Finding September 26, 2005 Outline 1 Root Finding 2 3.1 The Bisection Method 3 3.2 Newton s Method: Derivation and Examples 4 3.3 How To Stop Newton s Method 5 3.4 Application: Division

More information

Chapter 5 - Quadrature

Chapter 5 - Quadrature Chapter 5 - Quadrature The Goal: Adaptive Quadrature Historically in mathematics, quadrature refers to the act of trying to find a square with the same area of a given circle. In mathematical computing,

More information

CLASS NOTES Models, Algorithms and Data: Introduction to computing 2018

CLASS NOTES Models, Algorithms and Data: Introduction to computing 2018 CLASS NOTES Models, Algorithms and Data: Introduction to computing 2018 Petros Koumoutsakos, Jens Honore Walther (Last update: April 16, 2018) IMPORTANT DISCLAIMERS 1. REFERENCES: Much of the material

More information

Numerical Methods in Physics and Astrophysics

Numerical Methods in Physics and Astrophysics Kostas Kokkotas 2 October 17, 2017 2 http://www.tat.physik.uni-tuebingen.de/ kokkotas Kostas Kokkotas 3 TOPICS 1. Solving nonlinear equations 2. Solving linear systems of equations 3. Interpolation, approximation

More information

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by 1. QUESTION (a) Given a nth degree Taylor polynomial P n (x) of a function f(x), expanded about x = x 0, write down the Lagrange formula for the truncation error, carefully defining all its elements. How

More information

Romberg Integration and Gaussian Quadrature

Romberg Integration and Gaussian Quadrature Romberg Integration and Gaussian Quadrature P. Sam Johnson October 17, 014 P. Sam Johnson (NITK) Romberg Integration and Gaussian Quadrature October 17, 014 1 / 19 Overview We discuss two methods for integration.

More information

19.4 Spline Interpolation

19.4 Spline Interpolation c9-b.qxd 9/6/5 6:4 PM Page 8 8 CHAP. 9 Numerics in General 9.4 Spline Interpolation Given data (function values, points in the xy-plane) (x, ƒ ), (x, ƒ ),, (x n, ƒ n ) can be interpolated by a polynomial

More information

Scientific Computing: Numerical Integration

Scientific Computing: Numerical Integration Scientific Computing: Numerical Integration Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course MATH-GA.2043 or CSCI-GA.2112, Fall 2015 Nov 5th, 2015 A. Donev (Courant Institute) Lecture

More information

Fundamental Theorem of Calculus

Fundamental Theorem of Calculus NCTM Annual Meeting and Eposition Denver, CO April 8, Presented by Mike Koehler Blue Valley North High School Overland Park, KS I. Approimations with Rectangles (Finding the Area Under Curves by Approimating

More information

Finding the Roots of f(x) = 0. Gerald W. Recktenwald Department of Mechanical Engineering Portland State University

Finding the Roots of f(x) = 0. Gerald W. Recktenwald Department of Mechanical Engineering Portland State University Finding the Roots of f(x) = 0 Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab:

More information

Finding the Roots of f(x) = 0

Finding the Roots of f(x) = 0 Finding the Roots of f(x) = 0 Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab:

More information

Numerical Methods. Scientists. Engineers

Numerical Methods. Scientists. Engineers Third Edition Numerical Methods for Scientists and Engineers K. Sankara Rao Numerical Methods for Scientists and Engineers Numerical Methods for Scientists and Engineers Third Edition K. SANKARA RAO Formerly,

More information

MA 114 Worksheet #01: Integration by parts

MA 114 Worksheet #01: Integration by parts Fall 8 MA 4 Worksheet Thursday, 3 August 8 MA 4 Worksheet #: Integration by parts. For each of the following integrals, determine if it is best evaluated by integration by parts or by substitution. If

More information

Preface. 2 Linear Equations and Eigenvalue Problem 22

Preface. 2 Linear Equations and Eigenvalue Problem 22 Contents Preface xv 1 Errors in Computation 1 1.1 Introduction 1 1.2 Floating Point Representation of Number 1 1.3 Binary Numbers 2 1.3.1 Binary number representation in computer 3 1.4 Significant Digits

More information

Chapter 1. Root Finding Methods. 1.1 Bisection method

Chapter 1. Root Finding Methods. 1.1 Bisection method Chapter 1 Root Finding Methods We begin by considering numerical solutions to the problem f(x) = 0 (1.1) Although the problem above is simple to state it is not always easy to solve analytically. This

More information

CISE-301: Numerical Methods Topic 1:

CISE-301: Numerical Methods Topic 1: CISE-3: Numerical Methods Topic : Introduction to Numerical Methods and Taylor Series Lectures -4: KFUPM Term 9 Section 8 CISE3_Topic KFUPM - T9 - Section 8 Lecture Introduction to Numerical Methods What

More information

APPLICATIONS OF DIFFERENTIATION

APPLICATIONS OF DIFFERENTIATION 4 APPLICATIONS OF DIFFERENTIATION APPLICATIONS OF DIFFERENTIATION 4.8 Newton s Method In this section, we will learn: How to solve high degree equations using Newton s method. INTRODUCTION Suppose that

More information

Numerical Methods in Informatics

Numerical Methods in Informatics Numerical Methods in Informatics Lecture 2, 30.09.2016: Nonlinear Equations in One Variable http://www.math.uzh.ch/binf4232 Tulin Kaman Institute of Mathematics, University of Zurich E-mail: tulin.kaman@math.uzh.ch

More information

MATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations.

MATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations. MATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations. Dmitriy Leykekhman Fall 2008 Goals Learn about different methods for the solution of f(x) = 0, their advantages and disadvantages. Convergence

More information

Solution of Algebric & Transcendental Equations

Solution of Algebric & Transcendental Equations Page15 Solution of Algebric & Transcendental Equations Contents: o Introduction o Evaluation of Polynomials by Horner s Method o Methods of solving non linear equations o Bracketing Methods o Bisection

More information

Calculus 1 - Lab ) f(x) = 1 x. 3.8) f(x) = arcsin( x+1., prove the equality cosh 2 x sinh 2 x = 1. Calculus 1 - Lab ) lim. 2.

Calculus 1 - Lab ) f(x) = 1 x. 3.8) f(x) = arcsin( x+1., prove the equality cosh 2 x sinh 2 x = 1. Calculus 1 - Lab ) lim. 2. ) Solve the following inequalities.) ++.) 4 >.) Calculus - Lab { + > + 5 + < +. ) Graph the functions f() =, g() = + +, h() = cos( ), r() = +. ) Find the domain of the following functions.) f() = +.) f()

More information

Outline. Math Numerical Analysis. Intermediate Value Theorem. Lecture Notes Zeros and Roots. Joseph M. Mahaffy,

Outline. Math Numerical Analysis. Intermediate Value Theorem. Lecture Notes Zeros and Roots. Joseph M. Mahaffy, Outline Math 541 - Numerical Analysis Lecture Notes Zeros and Roots Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research

More information

Math Numerical Analysis

Math Numerical Analysis Math 541 - Numerical Analysis Lecture Notes Zeros and Roots Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research Center

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 5 Nonlinear Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction

More information

Romberg Integration. MATH 375 Numerical Analysis. J. Robert Buchanan. Spring Department of Mathematics

Romberg Integration. MATH 375 Numerical Analysis. J. Robert Buchanan. Spring Department of Mathematics Romberg Integration MATH 375 Numerical Analysis J. Robert Buchanan Department of Mathematics Spring 019 Objectives and Background In this lesson we will learn to obtain high accuracy approximations to

More information

Outline. 1 Numerical Integration. 2 Numerical Differentiation. 3 Richardson Extrapolation

Outline. 1 Numerical Integration. 2 Numerical Differentiation. 3 Richardson Extrapolation Outline Numerical Integration Numerical Differentiation Numerical Integration Numerical Differentiation 3 Michael T. Heath Scientific Computing / 6 Main Ideas Quadrature based on polynomial interpolation:

More information

8.3 Numerical Quadrature, Continued

8.3 Numerical Quadrature, Continued 8.3 Numerical Quadrature, Continued Ulrich Hoensch Friday, October 31, 008 Newton-Cotes Quadrature General Idea: to approximate the integral I (f ) of a function f : [a, b] R, use equally spaced nodes

More information

x 2 x n r n J(x + t(x x ))(x x )dt. For warming-up we start with methods for solving a single equation of one variable.

x 2 x n r n J(x + t(x x ))(x x )dt. For warming-up we start with methods for solving a single equation of one variable. Maria Cameron 1. Fixed point methods for solving nonlinear equations We address the problem of solving an equation of the form (1) r(x) = 0, where F (x) : R n R n is a vector-function. Eq. (1) can be written

More information

Numerical Methods I: Numerical Integration/Quadrature

Numerical Methods I: Numerical Integration/Quadrature 1/20 Numerical Methods I: Numerical Integration/Quadrature Georg Stadler Courant Institute, NYU stadler@cims.nyu.edu November 30, 2017 umerical integration 2/20 We want to approximate the definite integral

More information

NUMERICAL MATHEMATICS AND COMPUTING

NUMERICAL MATHEMATICS AND COMPUTING NUMERICAL MATHEMATICS AND COMPUTING Fourth Edition Ward Cheney David Kincaid The University of Texas at Austin 9 Brooks/Cole Publishing Company I(T)P An International Thomson Publishing Company Pacific

More information

Optimization and Calculus

Optimization and Calculus Optimization and Calculus To begin, there is a close relationship between finding the roots to a function and optimizing a function. In the former case, we solve for x. In the latter, we solve: g(x) =

More information

Lecture 8: Calculus and Differential Equations

Lecture 8: Calculus and Differential Equations Lecture 8: Calculus and Differential Equations Dr. Mohammed Hawa Electrical Engineering Department University of Jordan EE201: Computer Applications. See Textbook Chapter 9. Numerical Methods MATLAB provides

More information

Lecture 8: Calculus and Differential Equations

Lecture 8: Calculus and Differential Equations Lecture 8: Calculus and Differential Equations Dr. Mohammed Hawa Electrical Engineering Department University of Jordan EE21: Computer Applications. See Textbook Chapter 9. Numerical Methods MATLAB provides

More information

Numerical Solution of f(x) = 0

Numerical Solution of f(x) = 0 Numerical Solution of f(x) = 0 Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@pdx.edu ME 350: Finding roots of f(x) = 0 Overview Topics covered in these slides

More information

GENG2140, S2, 2012 Week 7: Curve fitting

GENG2140, S2, 2012 Week 7: Curve fitting GENG2140, S2, 2012 Week 7: Curve fitting Curve fitting is the process of constructing a curve, or mathematical function, f(x) that has the best fit to a series of data points Involves fitting lines and

More information

Contents. I Basic Methods 13

Contents. I Basic Methods 13 Preface xiii 1 Introduction 1 I Basic Methods 13 2 Convergent and Divergent Series 15 2.1 Introduction... 15 2.1.1 Power series: First steps... 15 2.1.2 Further practical aspects... 17 2.2 Differential

More information

Lecture 7. Root finding I. 1 Introduction. 2 Graphical solution

Lecture 7. Root finding I. 1 Introduction. 2 Graphical solution 1 Introduction Lecture 7 Root finding I For our present purposes, root finding is the process of finding a real value of x which solves the equation f (x)=0. Since the equation g x =h x can be rewritten

More information

Notes for Numerical Analysis Math 5465 by S. Adjerid Virginia Polytechnic Institute and State University. (A Rough Draft)

Notes for Numerical Analysis Math 5465 by S. Adjerid Virginia Polytechnic Institute and State University. (A Rough Draft) Notes for Numerical Analysis Math 5465 by S. Adjerid Virginia Polytechnic Institute and State University (A Rough Draft) 1 2 Contents 1 Error Analysis 5 2 Nonlinear Algebraic Equations 7 2.1 Convergence

More information

Homework set #7 solutions, Math 128A J. Xia

Homework set #7 solutions, Math 128A J. Xia Homework set #7 solutions, Math 18A J. Xia Sec 4.4: 1a, a, 3a, 7abc, 17 1a. Compute by hand or use a program. Matlab code for the Composite Trapezoidal rule: function integral = cmptrap(a,b,n,f) h = (b-a)/n;

More information

Lösning: Tenta Numerical Analysis för D, L. FMN011,

Lösning: Tenta Numerical Analysis för D, L. FMN011, Lösning: Tenta Numerical Analysis för D, L. FMN011, 090527 This exam starts at 8:00 and ends at 12:00. To get a passing grade for the course you need 35 points in this exam and an accumulated total (this

More information

CS 323: Numerical Analysis and Computing

CS 323: Numerical Analysis and Computing CS 323: Numerical Analysis and Computing MIDTERM #2 Instructions: This is an open notes exam, i.e., you are allowed to consult any textbook, your class notes, homeworks, or any of the handouts from us.

More information

Mathematical Methods for Numerical Analysis and Optimization

Mathematical Methods for Numerical Analysis and Optimization Biyani's Think Tank Concept based notes Mathematical Methods for Numerical Analysis and Optimization (MCA) Varsha Gupta Poonam Fatehpuria M.Sc. (Maths) Lecturer Deptt. of Information Technology Biyani

More information

Computational Methods

Computational Methods Numerical Computational Methods Revised Edition P. B. Patil U. P. Verma Alpha Science International Ltd. Oxford, U.K. CONTENTS Preface List ofprograms v vii 1. NUMER1CAL METHOD, ERROR AND ALGORITHM 1 1.1

More information

The problems that follow illustrate the methods covered in class. They are typical of the types of problems that will be on the tests.

The problems that follow illustrate the methods covered in class. They are typical of the types of problems that will be on the tests. NUMERICAL ANALYSIS PRACTICE PROBLEMS JAMES KEESLING The problems that follow illustrate the methods covered in class. They are typical of the types of problems that will be on the tests.. Solving Equations

More information

Numerical Analysis. A Comprehensive Introduction. H. R. Schwarz University of Zürich Switzerland. with a contribution by

Numerical Analysis. A Comprehensive Introduction. H. R. Schwarz University of Zürich Switzerland. with a contribution by Numerical Analysis A Comprehensive Introduction H. R. Schwarz University of Zürich Switzerland with a contribution by J. Waldvogel Swiss Federal Institute of Technology, Zürich JOHN WILEY & SONS Chichester

More information

Numerical Methods for Engineers

Numerical Methods for Engineers Numerical Methods for Engineers SEVENTH EDITION Steven C Chopra Berger Chair in Computing and Engineering Tufts University Raymond P. Canal Professor Emeritus of Civil Engineering of Michiaan University

More information

Introductory Numerical Analysis

Introductory Numerical Analysis Introductory Numerical Analysis Lecture Notes December 16, 017 Contents 1 Introduction to 1 11 Floating Point Numbers 1 1 Computational Errors 13 Algorithm 3 14 Calculus Review 3 Root Finding 5 1 Bisection

More information

PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435

PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435 PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435 Professor Biswa Nath Datta Department of Mathematical Sciences Northern Illinois University DeKalb, IL. 60115 USA E mail: dattab@math.niu.edu

More information

Fundamental Numerical Methods for Electrical Engineering

Fundamental Numerical Methods for Electrical Engineering Stanislaw Rosloniec Fundamental Numerical Methods for Electrical Engineering 4y Springei Contents Introduction xi 1 Methods for Numerical Solution of Linear Equations 1 1.1 Direct Methods 5 1.1.1 The Gauss

More information

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane. Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane c Sateesh R. Mane 2018 3 Lecture 3 3.1 General remarks March 4, 2018 This

More information

Beyond Newton s method Thomas P. Minka

Beyond Newton s method Thomas P. Minka Beyond Newton s method Thomas P. Minka 2000 (revised 7/21/2017) Abstract Newton s method for optimization is equivalent to iteratively maimizing a local quadratic approimation to the objective function.

More information

MATHEMATICAL METHODS INTERPOLATION

MATHEMATICAL METHODS INTERPOLATION MATHEMATICAL METHODS INTERPOLATION I YEAR BTech By Mr Y Prabhaker Reddy Asst Professor of Mathematics Guru Nanak Engineering College Ibrahimpatnam, Hyderabad SYLLABUS OF MATHEMATICAL METHODS (as per JNTU

More information

Unit 3. Integration. 3A. Differentials, indefinite integration. y x. c) Method 1 (slow way) Substitute: u = 8 + 9x, du = 9dx.

Unit 3. Integration. 3A. Differentials, indefinite integration. y x. c) Method 1 (slow way) Substitute: u = 8 + 9x, du = 9dx. Unit 3. Integration 3A. Differentials, indefinite integration 3A- a) 7 6 d. (d(sin ) = because sin is a constant.) b) (/) / d c) ( 9 8)d d) (3e 3 sin + e 3 cos)d e) (/ )d + (/ y)dy = implies dy = / d /

More information

Today. Introduction to optimization Definition and motivation 1-dimensional methods. Multi-dimensional methods. General strategies, value-only methods

Today. Introduction to optimization Definition and motivation 1-dimensional methods. Multi-dimensional methods. General strategies, value-only methods Optimization Last time Root inding: deinition, motivation Algorithms: Bisection, alse position, secant, Newton-Raphson Convergence & tradeos Eample applications o Newton s method Root inding in > 1 dimension

More information

PARTIAL DIFFERENTIAL EQUATIONS

PARTIAL DIFFERENTIAL EQUATIONS MATHEMATICAL METHODS PARTIAL DIFFERENTIAL EQUATIONS I YEAR B.Tech By Mr. Y. Prabhaker Reddy Asst. Professor of Mathematics Guru Nanak Engineering College Ibrahimpatnam, Hyderabad. SYLLABUS OF MATHEMATICAL

More information

NUMERICAL ANALYSIS SYLLABUS MATHEMATICS PAPER IV (A)

NUMERICAL ANALYSIS SYLLABUS MATHEMATICS PAPER IV (A) NUMERICAL ANALYSIS SYLLABUS MATHEMATICS PAPER IV (A) Unit - 1 Errors & Their Accuracy Solutions of Algebraic and Transcendental Equations Bisection Method The method of false position The iteration method

More information

Halley s Method: A Cubically Converging. Method of Root Approximation

Halley s Method: A Cubically Converging. Method of Root Approximation Halley s Method: A Cubically Converging Method of Root Approximation Gabriel Kramer Brittany Sypin December 3, 2011 Abstract This paper will discuss numerical ways of approximating the solutions to the

More information

We consider the problem of finding a polynomial that interpolates a given set of values:

We consider the problem of finding a polynomial that interpolates a given set of values: Chapter 5 Interpolation 5. Polynomial Interpolation We consider the problem of finding a polynomial that interpolates a given set of values: x x 0 x... x n y y 0 y... y n where the x i are all distinct.

More information

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Lectures 9-10: Polynomial and piecewise polynomial interpolation Lectures 9-1: Polynomial and piecewise polynomial interpolation Let f be a function, which is only known at the nodes x 1, x,, x n, ie, all we know about the function f are its values y j = f(x j ), j

More information

Numerical Analysis & Computer Programming

Numerical Analysis & Computer Programming ++++++++++ Numerical Analysis & Computer Programming Previous year Questions from 07 to 99 Ramanasri Institute W E B S I T E : M A T H E M A T I C S O P T I O N A L. C O M C O N T A C T : 8 7 5 0 7 0 6

More information

6.1 The function can be set up for fixed-point iteration by solving it for x

6.1 The function can be set up for fixed-point iteration by solving it for x 1 CHAPTER 6 6.1 The function can be set up for fied-point iteration by solving it for 1 sin i i Using an initial guess of 0 = 0.5, the first iteration yields 1 sin 0.5 0.649637 a 0.649637 0.5 100% 3% 0.649637

More information

Mathematics for Engineers. Numerical mathematics

Mathematics for Engineers. Numerical mathematics Mathematics for Engineers Numerical mathematics Integers Determine the largest representable integer with the intmax command. intmax ans = int32 2147483647 2147483647+1 ans = 2.1475e+09 Remark The set

More information

NUMERICAL ANALYSIS PROBLEMS

NUMERICAL ANALYSIS PROBLEMS NUMERICAL ANALYSIS PROBLEMS JAMES KEESLING The problems that follow illustrate the methods covered in class. They are typical of the types of problems that will be on the tests.. Solving Equations Problem.

More information

Nonlinearity Root-finding Bisection Fixed Point Iteration Newton s Method Secant Method Conclusion. Nonlinear Systems

Nonlinearity Root-finding Bisection Fixed Point Iteration Newton s Method Secant Method Conclusion. Nonlinear Systems Nonlinear Systems CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Nonlinear Systems 1 / 24 Part III: Nonlinear Problems Not all numerical problems

More information

3.3.1 Linear functions yet again and dot product In 2D, a homogenous linear scalar function takes the general form:

3.3.1 Linear functions yet again and dot product In 2D, a homogenous linear scalar function takes the general form: 3.3 Gradient Vector and Jacobian Matri 3 3.3 Gradient Vector and Jacobian Matri Overview: Differentiable functions have a local linear approimation. Near a given point, local changes are determined by

More information

Section 6.6 Gaussian Quadrature

Section 6.6 Gaussian Quadrature Section 6.6 Gaussian Quadrature Key Terms: Method of undetermined coefficients Nonlinear systems Gaussian quadrature Error Legendre polynomials Inner product Adapted from http://pathfinder.scar.utoronto.ca/~dyer/csca57/book_p/node44.html

More information

MTH603 FAQ + Short Questions Answers.

MTH603 FAQ + Short Questions Answers. Absolute Error : Accuracy : The absolute error is used to denote the actual value of a quantity less it s rounded value if x and x* are respectively the rounded and actual values of a quantity, then absolute

More information

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T Heath Chapter 5 Nonlinear Equations Copyright c 2001 Reproduction permitted only for noncommercial, educational

More information

X. Numerical Methods

X. Numerical Methods X. Numerical Methods. Taylor Approximation Suppose that f is a function defined in a neighborhood of a point c, and suppose that f has derivatives of all orders near c. In section 5 of chapter 9 we introduced

More information