Homework No. 2 Solutions TA: Theo Drivas
|
|
- Conrad Barker
- 6 years ago
- Views:
Transcription
1 Homework No. Solutions TA: Theo Drivas Problem 1. (a) Consider the initial-value problems for the following two differential equations: (i) dy/dt = y, y(0) = y 0, (ii) dy/dt = y, y(0) = y 0. Use separation of variables (or any other technique) to solve these two problems exactly as explicit functions y(t; y 0 ) of time t and initial condition y 0. Are these problems well-posed? Explain your answer. (b) For each of the two problems in (a), calculate both the absolute condition number and the relative condition number Abs.cond(y(t; y 0 )) := y(t; y 0) y 0 Rel.cond(y(t; y 0 )) := y 0 y(t; y 0 ) y(t; y 0 ) y 0 For the specific time t = 100, is each problem absolutely well-conditioned? Relatively well-conditioned? Explain your answers. (c) Later in the course we shall study the Euler method to approximately solve the problem (ii) in part (a): ŷ(t n+1 ) ŷ(t n ) h = ŷ(t n ), t n = nh, n = 0, 1,,...; ŷ(0) = y 0, which gives the approximation ŷ(t n ) y(t n ) by solving a simple first-order linear difference equation. Find the explicit expression for the approximate solution ŷ(t n ; y 0, h) as a function of t n, y 0, and h. Also calculate the absolute and relative condition numbers of the approximation, using similar definitions as in part (b). For what values of h is the absolute condition number always less than 1? (Sol a) The general solution to ẏ = ±y is y(t; y 0 ) = y 0 e ±t These problems are well posed because there (i) is a solution, (ii) it is unique and (iii) it depends continuously on the data (here, y 0 ). (Sol b) The absolute conditions numbers are Abs.cond(y(t; y 0 )) := y(t; y 0) y 0 = { e t e t for ẏ = y for ẏ = y The relative conditions numbers are identical for both problems because y(t;y0) y 0 Rel.cond(y(t; y 0 )) := y 0 y(t; y 0 ) = 1 y(t; y 0 ) y 0 = y(t;y0) y 0 : 1
2 Clearly both problems are relatively well-conditioned since both relative condition numbers are unity for all time. Because { e 100 for ẏ = y Abs.cond(y(100; y 0 )) = e for ẏ = y! the first problem is not absolutely well-conditioned at time t = 100, but the second is absolutely well-conditioned at t = 100. (Sol c) For t n = nh, n = 0, 1,,... ŷ(t n+1 ) ŷ(t n ) = ŷ(t n ), h = ŷ(t n ) = (1 h) tn/h y 0 The condition numbers are: Abs.cond(ŷ(t n ; y 0 )) := ŷ(t n; y 0 ) y 0 Rel.cond(ŷ(t n ; y 0 ))) := For h satisfying 1 < (1 h) < 1, i.e. necessarily less than 1. = (1 h) tn/h y 0 ŷ(t n ; y 0 ) = 1 ŷ(t n ; y 0 ) y 0 Problem. (a) Use bisection method to find the roots of 0 < h <, the absolute condition number is f(x) = sin(x) ln(x 4 + 1/) x with tolerance T OL = Make certain that you find all of the roots of the given function. Record the final endpoints of the bracketing interval, the achieved tolerance, the number of iterations, and the computational time for each root. (You may use the prepared matlab script bisect.m, if you wish.) (b) Repeat part (a) using instead the Newton-Fourier method. This method combines the Newton iteration for x n with another iteration equation y n+1 = y n f(y n) f (x n ). Assuming that f is increasing and convex on the interval [x 0, y 0 ], i.e. that f (x) > 0, f (x) > 0, x [x 0, y 0 ] ( ) and that x 0, y 0 bracket a root, or f(x 0 ) < 0 and f(y 0 ) > 0, then the iterates [x n, y n ] converge quadratically and always bracket the root. Write your own matlab script newtfour.m to implement this algorithm, e.g. by modifying newton.m. (c) If the condition (*) is not satisfied, but f and f do not change sign on an interval around the root, then one of the following modified functions f (x) = f(x), f 3 (x) = f( x), f 4 (x) = f( x) will satisfy (*). Use the Newton-Fourier method to find all of the roots of the function in part (a) to tolerance T OL = For each root use the same initial interval [x 0, y 0 ] as you did for the bisection method in part (a). Note that the function may not satisfy the condition (*) for each of the roots and, in that case, you will need to use one of the transformed functions discussed above
3 (d) Compare the results of the bisection and Newton-Fourier methods (final endpoints of the bracketing interval, achieved tolerance, number of iterations, and computational time). Which method is preferable and why? (Sol a) 1 >> f=inline('sin(x)-log(x.ˆ4+1/)-x') >> tol=10ˆ(-15) 3 4 >> figure; fplot(@(x) [f(x), 0*x], [-10,10]) 5 >> pause 6 7 >> format long 8 9 >> % BISECTION >> a=0;b=1; 1 >> bisect k = ans = Elapsed time is seconds. 17 >> pause >> a=-1;b=0; 0 >> bisect 1 k = 50 3 ans = Elapsed time is seconds. 5 6 >> pause 7 8 >> a=-10;b=-9; 9 >> bisect k = 47 3 ans = Elapsed time is seconds. (Sol b) Here is a version of newtfour.m: 1 tic 3 itmax=100; 4 5 if sign(f(x))==sign(f(y)) 6 'failure to bracket root' 7 return 8 end 9 10 k=0 11 [x y y-x] 1 13 while abs(x-y)>tol*max(abs(y),1.0) 14 if k+1>itmax 15 break 16 end 17 xold=x; 18 yold=y; 19 k=k+1 3
4 Figure 1: The function f(x) = sin(x) ln(x 4 + 1/) x. 0 DF=Df(y); 1 x=x-f(x)/df; y=y-f(y)/df; 3 [x y y-x] 4 end 5 6 toc (Sol c) We now apply this algorithm: 1 % FOURIER-NEWTON 3 >> fold=f; 4 >> figure; fplot(@(x) [fold(x), 0*x], [0,1]) 5 >> pause 6 >> % f(x)=-f(x) 7 >> f=inline('-(sin(x)-log(x.ˆ4+1/)-x)') 8 >> figure; fplot(@(x) [f(x), 0*x], [0,1]) 9 >> Df=inline('-cos(x)+4*x.ˆ3./(x.ˆ4+1/)+1') >> x=0;y=1; 1 >> newtfour k = 7 15 ans = Elapsed time is seconds >> pause 19 0 >> figure; fplot(@(x) [fold(x), 0*x], [-1,0]) 1 >> pause >> % f(x)=-f(-x) 3 >> f=inline('sin(x)+log(x.ˆ4+1/)-x') 4 >> figure; fplot(@(x) [f(x), 0*x], [0,1]) 5 >> Df=inline('cos(x)+4*x.ˆ3./(x.ˆ4+1/)-1') 6 7 >> x=0;y=1; 8 >> newtfour 9 30 k = 7 31 ans =
5 3 Elapsed time is seconds >> pause >> figure; [fold(x), 0*x], [-10,-9]) 38 >> pause 39 >> % f(x)=f(-x) 40 >> f=inline('-sin(x)-log(x.ˆ4+1/)+x') 41 >> figure; fplot(@(x) [f(x), 0*x], [9,10]) 4 >> Df=inline('-cos(x)-4*x.ˆ3/(x.ˆ4+1/)+1') >> x=9;y=10; 45 >> newtfour k = 4 48 ans = Elapsed time is seconds. Figure : The function f f(x) = sin(x) + ln(x 4 + 1/) + x (left) and the derivative f f (x) = cos(x) (right) on the interval x [0, 1]. 4x3 x 4 +1/ Similar plots to these are generated by the code for the corresponding other modified functions. (Sol d) Newton-Fourier method is preferable since it requires less computational time, less number of iterations, while achieves approximately the same bracketing interval and tolerance, than that of bisection method. 5
6 Problem 3. a) Use Newton s method to find the smallest positive root of f(x) = sin(x 3 ) x/, again with tolerance T OL = Record the final approximate root, the achieved tolerance, the number of iterations, and the computational time. (b) Repeat part (a) using the secant method. Use the same initial x 0 as you did for Newton s method in (a) and make one Newton iteration to generate x 1. (c) Repeat part (a) using the method of inverse quadratic interpolation (IQI). Use the same initial x 0, x 1 as you did for the secant method in (b), and make one secant iteration to generate x. (d) Compare the results of the three methods (final endpoints of the bracketing interval, achieved tolerance, number of iterations, and computational time). Which method is preferable and why? (Sol a) Figure 3: The function f(x) = sin(x 3 ) x/. 1 Ntry=1000; >> f=inline('sin(x.ˆ3)-x/') 3 >> Df=inline('3*x.ˆ.*cos(x.ˆ3)-1/') 4 >> figure; fplot(@(x) [f(x), 0*x], [0,1]) 5 >> pause 6 7 >> timen=0; 8 >> for nt=1:ntry 9 >> x=1; 10 >> tic 11 >> newton 1 >> timen=timen+toc; 13 >> end 14 >> timen=timen/ntry; 15 >> k=k 16 >> [x abs(x-xold)] 17 >> disp(['elapsed time is ', numstr(timen), ' seconds']) 18 6
7 19 k = 6 0 ans = Elapsed time is seconds (Sol b) 1 >> times=0; >> for nt=1:ntry 3 >> a=1; 4 >> clear b 5 >> tic 6 >> secant 7 >> times=times+toc; 8 >> end 9 >> times=times/ntry; 10 >> k=k 11 >> [b abs(b-a)] 1 >> disp(['elapsed time is ', numstr(times), ' seconds']) k = 7 15 ans = Elapsed time is seconds (Sol c) 1 >> timei=0; >> for nt=1:ntry 3 >> a=1; 4 >> clear b 5 >> clear c 6 >> tic 7 >> iquadi 8 >> timei=timei+toc; 9 >> end 10 >> timei=timei/ntry; 11 >> k=k 1 >> [c abs(c-b)] 13 >> disp(['elapsed time is ', numstr(timen), ' seconds']) k = 7 16 ans = Elapsed time is seconds (Sol d) The Newtons method is preferable since it requires less computational time than those of IQL and secant methods. Note: These 3 methods give roughly the same final approximate root and achieved tolerance. The number of iterations in Newtons method is the least, but every iteration in Newtons method requires the computer to evaluate f (x). This can cause this method to be slower that secant or IQl at each iteration for some problems since they do not need to do this function evaluation. 7
8 Problem 4. Derive the error formula for the secant method x x n+1 = (x x n )(x x n 1 ) f[x n 1, x n, x ] f[x n 1, x n ] in terms of the divided-differences. By direct computation: (x n x n 1 ) x x n+1 = x x n + f(x n ) f(x n ) f(x n 1 ) ( = (f(x n ) f(x n 1 )) (x ) x n ) (x n x n 1 ) f(x (xn x n 1 ) n) f(x n ) f(x n 1 ) ( = (x x n ) (f(x n) f(x n 1 )) f(x ) n) (xn x n 1 ) (x n x n 1 ) (x x n ) f(x n ) f(x n 1 ) ( = (x x n ) (f(x n) f(x n 1 )) + f(x ) ) f(x n ) (xn x n 1 ) (x n x n 1 ) (x x n ) f(x n ) f(x n 1 ) where we have made use of the fact that f(x ) = 0. Continuing on, we have x x n+1 = (x x n ) ( f[x n 1, x n ] + f[x n, x ]) /f[x n 1, x n ] ( ) f[xn, x ] f[x n 1, x n ] = (x x n )(x x n 1 ) /f[x n 1, x n ] (x x n 1 ) = (x x n )(x x n 1 ) f[x n 1, x n, x ]. f[x n 1, x n ] Problem 5. Numerically calculate the Newton iterates for solving x 1 = 0, and use x 0 = 5. Identify and explain the resulting speed of convergence. (Sol) 1 >> f=inline('xˆ-1'); >> Df=inline('*x'); 3 >> tol=eps; 4 5 >> MM=5; 6 >> x=ˆmm; 7 8 >> k=0; 9 >> xold=0; 10 >> itmax=50; 11 >> xx(k+1)=x; 1 >> kk(k+1)=k; >> while abs(x-xold)>tol*max(abs(x),1.0) 15 >> if k+1>itmax 16 >> break 17 >> end 18 >> xold=x; 19 >> k=k+1 0 >> x=x-f(x)/df(x); 1 >> xx(k+1)=x; 8
9 >> kk(k+1)=k; 3 >> [x abs(x-xold)] 4 >> end 5 6 k = 31 7 ans = >> plot(kk,log(xx),'-b',kk,mm-kk,'-r',kk,0*kk,'-k') 30 >> axis([0 k MM-k MM]) 31 >> xlabel('$k$','fontsize',15,'interpreter','latex') 3 >> ylabel('$\log (x k)$','fontsize',15,'interpreter','latex') 33 >> title('newton iterates $x k$ for $f(x)=xˆ-1$ and... $x 0=ˆ{5}$','FontSize',18,'Interpreter','latex') 34 >> legend('x k','ˆ{5-k}','1') We can understand the rate of convergence as follows. We have: x = x f(x) f (x) = x x 1 = 1 ( x + 1 ) x for x 1. x x thus the rate of convergence is 1/. Problem 6. Define an iteration formula by z n+1 = x n f(x n) f (x n ) x n+1 = z n+1 f(z n+1) f (x n ) This is like two Newton steps, with the second re-using the derivative from the first. (a) Show that the order of convergence of x n to x is at least 3. Hint: Exploit the theorem proved in class on order of convergence of fixed-point methods (generalizing Theorem.9 in Burden & Faires), and let h(x) = x f(x) f (x) g(x) = h(x) f(h(x)) f (x) 9
10 (b) Compare this method to Newton s method in terms of the number of function and derivative evaluations. If τ f is the time required to evaluate f and τ f is the additional time to evaluate f, then how large must τ f /τ f be in order for the new iteration to converge faster than Newton? (Sol a) We first calculate the derivatives of h: h (x) = f(x)f (x) (f (x)) h (x) = f (x) f (x) + f(x) d dx [ f ] (x) (f (x)) so h (x ) = 0 and h (x ) = f (x )/f (x ). Now we calculate the derivatives of g, ( g (x) = h (x) 1 f ) (h(x)) f + f(h(x))f (x) (x) f (x) ( g (x) = h (x) 1 f ) (h(x)) f + h (x) d ( 1 f ) (h(x)) (x) dx f (x) + f (h(x))h (x) f (x) f (x) + f(h(x)) d ( f ) (x) dx f (x) So that g (x ) = 0 and g (x ) = h (x) 0+0 d ( 1 f ) (h(x)) dx f +0 f (x) f (x) (x) f (x) +0 d dx x=x ( f ) (x) f (x) = 0! Since g(x ) = x 0 but g (x ) = g (x ) = 0, we can apply the theorem proved in class (pg 6 of Ch. of the notes), to say that we have order of convergence at least 3. (Sol b) The convergence times for Newton and the 3rd order method we have here are: τ newt = (τ f + τ f ) log K log τ 3rd = (τ f + τ f ) log K log 3 Thus τ 3rd τ newt = ( τf + τ f τ f + τ f ) log log 3 < 1 iff ( ) τf + τ f τ f + τ f < log 3 log = log 3 iff τ f τ f > log 3 log
11 Problem 7. Given below is a table of iterates from a linearly convergent iteration x n+1 = g(x n ). Estimate (a) the rate of linear convergence, (b) the fixed point x and (c) the error x 7 x. n x n (d) Use x 7 and the error estimate in (c) to make an improved estimate of the fixed point value x to which the sequence converges. 1 % g=inline('x+cos(x/)-sin(x/)') >> xi(1)=1; 3 >> xi()= ; 4 >> xi(3)= ; 5 >> xi(4)= ; 6 >> xi(5)= ; 7 >> xi(6)= ; 8 >> xi(7)= ; 9 >> xi(8)= ; >> x=xi(3:8); 1 >> xp=xi(:7); 13 >> xpp=xi(1:6); (Sol a) We estimate the rate of convergence as follows: λ n x n+1 x n x n x n 1, λ >> lamest=(x-xp)./(xp-xpp); 3 lamest = >> lamest=lamest(6) 6 lamest = (Sol b) The naive estimate is x 7 = (Sol c) We estimated the error as: x x 7 =
12 1 >> errest=lamest.*(x-xp)./(lamest-1); 3 errest = >> errest=errest(6) 6 errest = (Sol d) Exploiting our estimate of the error, we use Aitken extrapolation to obtain an improved estimate: x n = x n + = x n + λ n 1 λ n (x n x n 1 ) x n + (x n x n 1 ) (x n 1 x n ) (x n x n 1 ) x x n x n 1 x n 1 x n 1 xn xn 1 x n 1 x n (x n x n 1 ) 1 >> xx=x-errest; 3 xx = >> fixest=xx(6) 6 fixest = You may recognize this number x as π/ = ! Clearly the Aitken extrapolate x 7 gives a much more accurate estimate (relative error ) than does the naive guess x 7 (relative error ). 1
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 informationVariable. Peter W. White Fall 2018 / Numerical Analysis. Department of Mathematics Tarleton State University
Newton s Iterative s Peter W. White white@tarleton.edu Department of Mathematics Tarleton State University Fall 2018 / Numerical Analysis Overview Newton s Iterative s Newton s Iterative s Newton s Iterative
More informationIntroductory 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 informationINTRODUCTION TO NUMERICAL ANALYSIS
INTRODUCTION TO NUMERICAL ANALYSIS Cho, Hyoung Kyu Department of Nuclear Engineering Seoul National University 3. SOLVING NONLINEAR EQUATIONS 3.1 Background 3.2 Estimation of errors in numerical solutions
More informationCS 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 informationROOT FINDING REVIEW MICHELLE FENG
ROOT FINDING REVIEW MICHELLE FENG 1.1. Bisection Method. 1. Root Finding Methods (1) Very naive approach based on the Intermediate Value Theorem (2) You need to be looking in an interval with only one
More information5. Hand in the entire exam booklet and your computer score sheet.
WINTER 2016 MATH*2130 Final Exam Last name: (PRINT) First name: Student #: Instructor: M. R. Garvie 19 April, 2016 INSTRUCTIONS: 1. This is a closed book examination, but a calculator is allowed. The test
More informationSolution 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 informationPractical Numerical Analysis: Sheet 3 Solutions
Practical Numerical Analysis: Sheet 3 Solutions 1. We need to compute the roots of the function defined by f(x) = sin(x) + sin(x 2 ) on the interval [0, 3] using different numerical methods. First we consider
More informationNumerical Analysis Fall. Roots: Open Methods
Numerical Analysis 2015 Fall Roots: Open Methods Open Methods Open methods differ from bracketing methods, in that they require only a single starting value or two starting values that do not necessarily
More informationHomework 2. Matthew Jin. April 10, 2014
Homework Matthew Jin April 10, 014 1a) The relative error is given by ŷ y y, where ŷ represents the observed output value, and y represents the theoretical output value. In this case, the observed output
More information1. Method 1: bisection. The bisection methods starts from two points a 0 and b 0 such that
Chapter 4 Nonlinear equations 4.1 Root finding Consider the problem of solving any nonlinear relation g(x) = h(x) in the real variable x. We rephrase this problem as one of finding the zero (root) of a
More informationNonlinearity 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 informationNumerical solutions of nonlinear systems of equations
Numerical solutions of nonlinear systems of equations Tsung-Ming Huang Department of Mathematics National Taiwan Normal University, Taiwan E-mail: min@math.ntnu.edu.tw August 28, 2011 Outline 1 Fixed points
More informationMath Introduction to Numerical Methods - Winter 2011 Homework 2 Assigned: Friday, January 14, Due: Thursday, January 27,
Math 371 - Introduction to Numerical Methods - Winter 2011 Homework 2 Assigned: Friday, January 14, 2011. Due: Thursday, January 27, 2011.. Include a cover page. You do not need to hand in a problem sheet.
More informationBisection Method. and compute f (p 1 ). repeat with p 2 = a 2+b 2
Bisection Method Given continuous function f (x) on the interval [a, b] with f (a) f (b) < 0, there must be a root in (a, b). To find a root: set [a 1, b 1 ] = [a, b]. set p 1 = a 1+b 1 2 and compute f
More informationMath 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 information1. Nonlinear Equations. This lecture note excerpted parts from Michael Heath and Max Gunzburger. f(x) = 0
Numerical Analysis 1 1. Nonlinear Equations This lecture note excerpted parts from Michael Heath and Max Gunzburger. Given function f, we seek value x for which where f : D R n R n is nonlinear. f(x) =
More informationLecture 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 informationMath 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 informationSection 3.5: Implicit Differentiation
Section 3.5: Implicit Differentiation In the previous sections, we considered the problem of finding the slopes of the tangent line to a given function y = f(x). The idea of a tangent line however is not
More informationOptimization 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 informationScientific 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 informationMidterm Review. Igor Yanovsky (Math 151A TA)
Midterm Review Igor Yanovsky (Math 5A TA) Root-Finding Methods Rootfinding methods are designed to find a zero of a function f, that is, to find a value of x such that f(x) =0 Bisection Method To apply
More informationHalley 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 informationCHEE 222: PROCESS DYNAMICS AND NUMERICAL METHODS
CHEE 222: PROCESS DYNAMICS AND NUMERICAL METHODS Winter 2017 Implementation of Numerical Methods via MATLAB Instructor: Xiang Li 1 Outline 1. Introduction - Command, script and function - MATLAB function
More informationSOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS BISECTION METHOD
BISECTION METHOD If a function f(x) is continuous between a and b, and f(a) and f(b) are of opposite signs, then there exists at least one root between a and b. It is shown graphically as, Let f a be negative
More informationMath 551 Homework Assignment 3 Page 1 of 6
Math 551 Homework Assignment 3 Page 1 of 6 Name and section: ID number: E-mail: 1. Consider Newton s method for finding + α with α > 0 by finding the positive root of f(x) = x 2 α = 0. Assuming that x
More informationOutline. 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 informationInvestigating Limits in MATLAB
MTH229 Investigating Limits in MATLAB Project 5 Exercises NAME: SECTION: INSTRUCTOR: Exercise 1: Use the graphical approach to find the following right limit of f(x) = x x, x > 0 lim x 0 + xx What is the
More informationMATH 350: Introduction to Computational Mathematics
MATH 350: Introduction to Computational Mathematics Chapter IV: Locating Roots of Equations Greg Fasshauer Department of Applied Mathematics Illinois Institute of Technology Spring 2011 fasshauer@iit.edu
More informationLecture 8. Root finding II
1 Introduction Lecture 8 Root finding II In the previous lecture we considered the bisection root-bracketing algorithm. It requires only that the function be continuous and that we have a root bracketed
More informationBisection and False Position Dr. Marco A. Arocha Aug, 2014
Bisection and False Position Dr. Marco A. Arocha Aug, 2014 1 Given function f, we seek x values for which f(x)=0 Solution x is the root of the equation or zero of the function f Problem is known as root
More informationMATH 350: Introduction to Computational Mathematics
MATH 350: Introduction to Computational Mathematics Chapter IV: Locating Roots of Equations Greg Fasshauer Department of Applied Mathematics Illinois Institute of Technology Spring 2011 fasshauer@iit.edu
More informationHomework and Computer Problems for Math*2130 (W17).
Homework and Computer Problems for Math*2130 (W17). MARCUS R. GARVIE 1 December 21, 2016 1 Department of Mathematics & Statistics, University of Guelph NOTES: These questions are a bare minimum. You should
More informationRoot Finding: Close Methods. Bisection and False Position Dr. Marco A. Arocha Aug, 2014
Root Finding: Close Methods Bisection and False Position Dr. Marco A. Arocha Aug, 2014 1 Roots Given function f(x), we seek x values for which f(x)=0 Solution x is the root of the equation or zero of the
More informationRoot finding. Root finding problem. Root finding problem. Root finding problem. Notes. Eugeniy E. Mikhailov. Lecture 05. Notes
Root finding Eugeniy E. Mikhailov The College of William & Mary Lecture 05 Eugeniy Mikhailov (W&M) Practical Computing Lecture 05 1 / 10 2 sin(x) 1 = 0 2 sin(x) 1 = 0 Often we have a problem which looks
More informationOutline. Scientific Computing: An Introductory Survey. Nonlinear Equations. Nonlinear Equations. Examples: Nonlinear Equations
Methods for Systems of Methods for Systems of Outline Scientific Computing: An Introductory Survey Chapter 5 1 Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign
More informationSOLUTIONS to Exercises from Optimization
SOLUTIONS to Exercises from Optimization. Use the bisection method to find the root correct to 6 decimal places: 3x 3 + x 2 = x + 5 SOLUTION: For the root finding algorithm, we need to rewrite the equation
More informationPolytechnic Institute of NYU MA 2132 Final Practice Answers Fall 2012
Polytechnic Institute of NYU MA Final Practice Answers Fall Studying from past or sample exams is NOT recommended. If you do, it should be only AFTER you know how to do all of the homework and worksheet
More informationNumerical 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 informationFunctions & Graphs. Section 1.2
Functions & Graphs Section 1.2 What you will remember Functions Domains and Ranges Viewing and Interpreting Graphs Even Functions and Odd Functions Symmetry Functions Defined in Pieces Absolute Value Functions
More informationA Few Concepts from Numerical Analysis
2 A Few Concepts from Numerical Analysis A systematic treatment of numerical methods is provided in conventional courses and textbooks on numerical analysis. But a few very common issues, that emerge in
More informationEXAMPLE OF ONE-STEP METHOD
EXAMPLE OF ONE-STEP METHOD Consider solving y = y cos x, y(0) = 1 Imagine writing a Taylor series for the solution Y (x), say initially about x = 0. Then Y (h) = Y (0) + hy (0) + h2 2 Y (0) + h3 6 Y (0)
More informationChapter 4. Solution of Non-linear Equation. Module No. 1. Newton s Method to Solve Transcendental Equation
Numerical Analysis by Dr. Anita Pal Assistant Professor Department of Mathematics National Institute of Technology Durgapur Durgapur-713209 email: anita.buie@gmail.com 1 . Chapter 4 Solution of Non-linear
More informationNumerical Methods
Numerical Methods 263-2014 Prof. M. K. Banda Botany Building: 2-10. Prof. M. K. Banda (Tuks) WTW263 Semester II 1 / 27 Theme 1: Solving Nonlinear Equations Prof. M. K. Banda (Tuks) WTW263 Semester II 2
More informationCLASS 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 informationNumerical 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 informationNumerical Methods Lecture 3
Numerical Methods Lecture 3 Nonlinear Equations by Pavel Ludvík Introduction Definition (Root or zero of a function) A root (or a zero) of a function f is a solution of an equation f (x) = 0. We learn
More informationNonlinear equations. Norms for R n. Convergence orders for iterative methods
Nonlinear equations Norms for R n Assume that X is a vector space. A norm is a mapping X R with x such that for all x, y X, α R x = = x = αx = α x x + y x + y We define the following norms on the vector
More informationChapter 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 informationMath 128A: Homework 2 Solutions
Math 128A: Homework 2 Solutions Due: June 28 1. In problems where high precision is not needed, the IEEE standard provides a specification for single precision numbers, which occupy 32 bits of storage.
More information1. Write a program based on computing divided differences one diagonal at a time as shown below: f x 1,x 2
Math Homework 6. Write a program based on computing divided differences one diagonal at a time as shown below: f x f x f x f x,x f x f x,x f x f x,x,x f x,x... f x You will need nested loops for this.
More informationFIXED POINT ITERATION
FIXED POINT ITERATION The idea of the fixed point iteration methods is to first reformulate a equation to an equivalent fixed point problem: f (x) = 0 x = g(x) and then to use the iteration: with an initial
More information8.7 Taylor s Inequality Math 2300 Section 005 Calculus II. f(x) = ln(1 + x) f(0) = 0
8.7 Taylor s Inequality Math 00 Section 005 Calculus II Name: ANSWER KEY Taylor s Inequality: If f (n+) is continuous and f (n+) < M between the center a and some point x, then f(x) T n (x) M x a n+ (n
More informationPRACTICE PROBLEMS FOR MIDTERM I
Problem. Find the limits or explain why they do not exist (i) lim x,y 0 x +y 6 x 6 +y ; (ii) lim x,y,z 0 x 6 +y 6 +z 6 x +y +z. (iii) lim x,y 0 sin(x +y ) x +y Problem. PRACTICE PROBLEMS FOR MIDTERM I
More informationComputational Methods. Solving Equations
Computational Methods Solving Equations Manfred Huber 2010 1 Solving Equations Solving scalar equations is an elemental task that arises in a wide range of applications Corresponds to finding parameters
More informationSolutions of Equations in One Variable. Newton s Method
Solutions of Equations in One Variable Newton s Method Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University c 2011 Brooks/Cole,
More informationFind all of the real numbers x that satisfy the algebraic equation:
Appendix C: Factoring Algebraic Expressions Factoring algebraic equations is the reverse of expanding algebraic expressions discussed in Appendix B. Factoring algebraic equations can be a great help when
More informationNewton's forward interpolation formula
Newton's Interpolation Formulae Interpolation is the process of approximating a given function, whose values are known at N + 1 tabular points, by a suitable polynomial, P N (x) of degree N which takes
More information0.1 Problems to solve
0.1 Problems to solve Homework Set No. NEEP 547 Due September 0, 013 DLH Nonlinear Eqs. reducible to first order: 1. 5pts) Find the general solution to the differential equation: y = [ 1 + y ) ] 3/. 5pts)
More information10.3 Steepest Descent Techniques
The advantage of the Newton and quasi-newton methods for solving systems of nonlinear equations is their speed of convergence once a sufficiently accurate approximation is known. A weakness of these methods
More informationLecture 44. Better and successive approximations x2, x3,, xn to the root are obtained from
Lecture 44 Solution of Non-Linear Equations Regula-Falsi Method Method of iteration Newton - Raphson Method Muller s Method Graeffe s Root Squaring Method Newton -Raphson Method An approximation to the
More informationNumerical 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 informationCHM320: MATH REVIEW. I. Ordinary Derivative:
CHM30: MATH REVIEW I. Ordinary Derivative: Figure : Secant line between two points on a function Ordinary derivatives describe how functions of a single variable change in response to variation of the
More informationRoot finding. Eugeniy E. Mikhailov. Lecture 05. The College of William & Mary. Eugeniy Mikhailov (W&M) Practical Computing Lecture 05 1 / 10
Root finding Eugeniy E. Mikhailov The College of William & Mary Lecture 05 Eugeniy Mikhailov (W&M) Practical Computing Lecture 05 1 / 10 Root finding problem Generally we want to solve the following canonical
More informationCHAPTER 4 ROOTS OF EQUATIONS
CHAPTER 4 ROOTS OF EQUATIONS Chapter 3 : TOPIC COVERS (ROOTS OF EQUATIONS) Definition of Root of Equations Bracketing Method Graphical Method Bisection Method False Position Method Open Method One-Point
More informationNotes 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 informationOWELL WEEKLY JOURNAL
Y \»< - } Y Y Y & #»»» q ] q»»»>) & - - - } ) x ( - { Y» & ( x - (» & )< - Y X - & Q Q» 3 - x Q Y 6 \Y > Y Y X 3 3-9 33 x - - / - -»- --
More informationPART 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 informationNumerical 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 informationMS 2001: Test 1 B Solutions
MS 2001: Test 1 B Solutions Name: Student Number: Answer all questions. Marks may be lost if necessary work is not clearly shown. Remarks by me in italics and would not be required in a test - J.P. Question
More informationLecture 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 informationJim 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 informationMath 180, Exam 2, Practice Fall 2009 Problem 1 Solution. f(x) = arcsin(2x + 1) = sin 1 (3x + 1), lnx
Math 80, Exam, Practice Fall 009 Problem Solution. Differentiate the functions: (do not simplify) f(x) = x ln(x + ), f(x) = xe x f(x) = arcsin(x + ) = sin (3x + ), f(x) = e3x lnx Solution: For the first
More informationSolving nonlinear equations
Chapter Solving nonlinear equations Bisection Introduction Linear equations are of the form: find x such that ax + b = 0 Proposition Let f be a real-valued function that is defined and continuous on a
More information2.4 - Convergence of the Newton Method and Modified Newton Method
2.4 - Convergence of the Newton Method and Modified Newton Method Consider the problem of finding the solution of the equation: for in Assume that is continuous and for in 1. Newton's Method: Suppose that
More informationNonlinearity 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 Doug James (and Justin Solomon) CS 205A: Mathematical Methods Nonlinear Systems 1 / 27 Part III: Nonlinear Problems Not
More informationInterpolation. 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter
Key References: Interpolation 1. Judd, K. Numerical Methods in Economics, Cambridge: MIT Press. Chapter 6. 2. Press, W. et. al. Numerical Recipes in C, Cambridge: Cambridge University Press. Chapter 3
More informationProblem Total Points Score
Your Name Your Signature Instructor Name Problem Total Points Score 1 16 2 12 3 6 4 6 5 8 6 10 7 12 8 6 9 10 10 8 11 6 Total 100 This test is closed notes and closed book. You may not use a calculator.
More informationZeroes of Transcendental and Polynomial Equations. Bisection method, Regula-falsi method and Newton-Raphson method
Zeroes of Transcendental and Polynomial Equations Bisection method, Regula-falsi method and Newton-Raphson method PRELIMINARIES Solution of equation f (x) = 0 A number (real or complex) is a root of the
More informationLecture 5: Random numbers and Monte Carlo (Numerical Recipes, Chapter 7) Motivations for generating random numbers
Lecture 5: Random numbers and Monte Carlo (Numerical Recipes, Chapter 7) Motivations for generating random numbers To sample a function in a statistically controlled manner (i.e. for Monte Carlo integration)
More informationLecture 39: Root Finding via Newton s Method
Lecture 39: Root Finding via Newton s Method We have studied two braceting methods for finding zeros of a function, bisection and regula falsi. These methods have certain virtues (most importantly, they
More informationNumerical Methods 5633
Numerical Methods 5633 Lecture 4 Michaelmas Term 2017 Marina Krstic Marinkovic mmarina@maths.tcd.ie School of Mathematics Trinity College Dublin Marina Krstic Marinkovic 1 / 17 5633-Numerical Methods Root
More informationMath 180, Final Exam, Fall 2012 Problem 1 Solution
Math 80, Final Exam, Fall 0 Problem Solution. Find the derivatives of the following functions: (a) ln(ln(x)) (b) x 6 + sin(x) e x (c) tan(x ) + cot(x ) (a) We evaluate the derivative using the Chain Rule.
More information1 The best of all possible worlds
Notes for 2017-03-18 1 The best of all possible worlds Last time, we discussed three methods of solving f(x) = 0: Newton, modified Newton, and bisection. Newton is potentially faster than bisection; bisection
More informationOutline. Additional Nonlinear Systems. Abstract. Finding Equilibrium Points Numerically. Newton s Method
Outline Finding Equilibrium Points Numerically Additional Nonlinear Systems James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University June 13, 2017
More informationOrder of convergence
Order of convergence Linear and Quadratic Order of convergence Computing square root with Newton s Method Given a > 0, p def = a is positive root of equation Newton s Method p k+1 = p k p2 k a 2p k = 1
More informationMotivation: We have already seen an example of a system of nonlinear equations when we studied Gaussian integration (p.8 of integration notes)
AMSC/CMSC 460 Computational Methods, Fall 2007 UNIT 5: Nonlinear Equations Dianne P. O Leary c 2001, 2002, 2007 Solving Nonlinear Equations and Optimization Problems Read Chapter 8. Skip Section 8.1.1.
More informationRoot Finding Convergence Analysis
Root Finding Convergence Analysis Justin Ross & Matthew Kwitowski November 5, 2012 There are many different ways to calculate the root of a function. Some methods are direct and can be done by simply solving
More information. (a) Express [ ] as a non-trivial linear combination of u = [ ], v = [ ] and w =[ ], if possible. Otherwise, give your comments. (b) Express +8x+9x a
TE Linear Algebra and Numerical Methods Tutorial Set : Two Hours. (a) Show that the product AA T is a symmetric matrix. (b) Show that any square matrix A can be written as the sum of a symmetric matrix
More informationNumerical Methods 5633
Numerical Methods 5633 Lecture 6 Marina Krstic Marinkovic mmarina@maths.tcd.ie School of Mathematics Trinity College Dublin Marina Krstic Marinkovic 1 / 14 5633-Numerical Methods Organisational To appear
More informationDegree Master of Science in Mathematical Modelling and Scientific Computing Mathematical Methods I Thursday, 12th January 2012, 9:30 a.m.- 11:30 a.m.
Degree Master of Science in Mathematical Modelling and Scientific Computing Mathematical Methods I Thursday, 12th January 2012, 9:30 a.m.- 11:30 a.m. Candidates should submit answers to a maximum of four
More informationMA 8019: Numerical Analysis I Solution of Nonlinear Equations
MA 8019: Numerical Analysis I Solution of Nonlinear Equations Suh-Yuh Yang ( 楊肅煜 ) Department of Mathematics, National Central University Jhongli District, Taoyuan City 32001, Taiwan syyang@math.ncu.edu.tw
More information3.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 informationASSIGNMENT BOOKLET. Numerical Analysis (MTE-10) (Valid from 1 st July, 2011 to 31 st March, 2012)
ASSIGNMENT BOOKLET MTE-0 Numerical Analysis (MTE-0) (Valid from st July, 0 to st March, 0) It is compulsory to submit the assignment before filling in the exam form. School of Sciences Indira Gandhi National
More informationSYSTEMS OF ODES. mg sin ( (x)) dx 2 =
SYSTEMS OF ODES Consider the pendulum shown below. Assume the rod is of neglible mass, that the pendulum is of mass m, and that the rod is of length `. Assume the pendulum moves in the plane shown, and
More informationApplied Computational Economics Workshop. Part 3: Nonlinear Equations
Applied Computational Economics Workshop Part 3: Nonlinear Equations 1 Overview Introduction Function iteration Newton s method Quasi-Newton methods Practical example Practical issues 2 Introduction Nonlinear
More information14 Lecture 14 Local Extrema of Function
14 Lecture 14 Local Extrema of Function 14.1 Taylor s Formula with Lagrangian Remainder Term Theorem 14.1. Let n N {0} and f : (a,b) R. We assume that there exists f (n+1) (x) for all x (a,b). Then for
More informationRoot Finding (and Optimisation)
Root Finding (and Optimisation) M.Sc. in Mathematical Modelling & Scientific Computing, Practical Numerical Analysis Michaelmas Term 2018, Lecture 4 Root Finding The idea of root finding is simple we want
More information