MAE 107 Homework 7 Solutions

Size: px
Start display at page:

Download "MAE 107 Homework 7 Solutions"

Transcription

1 MAE 107 Homework 7 Solutions 1. Tridiagonal system for u xx (x) + u(x) = 1 + sin(πx/4), for x [0, ], where u(0) =, u() = 4, with step size h = 1/. The total number of segments are: n = 0 1/ =. The nodes will be x 0 through x, with x 0 = 0, x =, and x k+1 x k = 1/. Use difference approximation for u xx (x) at each x k, k = 1,,, 4, 5: The differential equation becomes D h (x k) = u(x k1) u(x k ) + u(x k+1 ) h u(x k1) u(x k ) + u(x k+1 ) h + u(x k ) = 1 + sin( πx k for k = 1,,, 4, 5. Substituting in u(0) = u(x 0 ) =, u() = u(x ) = 4), we get u(x 1) + u(x ) h + u(x 1 ) = 1 + sin( πx 1 u(x 1) u(x ) + u(x ) h + u(x ) = 1 + sin( πx u(x ) u(x ) + u(x h + u(x ) = 1 + sin( πx u(x ) u(x + u(x 5 ) h + u(x = 1 + sin( πx 4 u(x 4) u(x 5 ) + 4 h + u(x 5 ) = 1 + sin( πx 5 Putting all the constants on the right hand side and collect terms, we get ( ) ( ) h + 1 u(x 1 ) h u(x ) = 1 + sin( πx 1 + h ( ) ( ) ( ) h u(x 1 ) + h + 1 u(x ) h u(x ) = 1 + sin( πx ( ) ( ) ( ) h u(x ) + h + 1 u(x ) h u(x = 1 + sin( πx ( ) ( ) ( ) h u(x ) + h + 1 u(x h u(x 5 ) = 1 + sin( πx 4 ( ) ( ) h u(x + h + 1 u(x 5 ) = 1 + sin( πx h 1

2 We can also multiply by h on both sides: ( + h )u(x 1 ) u(x ) = h + h sin( πx 1 + u(x 1 ) + ( + h )u(x ) u(x ) = h + h sin( πx u(x ) + ( + h )u(x ) u(x = h + h sin( πx u(x ) + ( + h )u(x u(x 5 ) = h + h sin( πx 4 u(x + ( + h )u(x 5 ) = h + h sin( πx Write in matrix form u(x h h 1 ) h h h u(x ) h h h u(x ) = u(x h h h u(x h h 5 ) or 1 + sin( πx 1 + h 1 + sin( πx 1 + sin( πx 1 + sin( πx sin( πx h + h u(x 1 ) h (1 + sin( πx 1 + h u(x ) )) + h (1 + sin( πx 0 + h ) 0 u(x h ) = h (1 + sin( πx ) u(x h (1 + sin( πx h ) u(x 5 ) h (1 + sin( πx 5 4 )) + 1. Matlab function that generates the tridiagonal system with input n: function [A,b] = tridiagsys(n) % Generate the tridiagonal system for given differential equation % Input variables % - n: The number of steps % Output variables % - A: The tridiagonal matrix % - b: The vector of right hand side (rhs) % Functions Called % None % Given differential equation % -u (x) + u(x) = 1 + sin(pi*x/4), 0 <= x <= % u(0)=, u()=4 % Calculate h and x(interior points only, not points) h = (-0)/n; x = h:h:-h;

3 % Allocate vectors A = zeros(n-1,n-1); b = zeros(n-1,1); % Fill in the matrix for i = 1:n-1 % Diagonal A(i,i) = /h^ + 1; if i >1 % Lower diagonals A(i,i-1) = -/h^; % Upper diagonals A(i-1,i) = -/h^; % Calculate rhs vector b(1) = 1 + sin(pi*x(1)/4) + /h^; for i=:n- b(i) = 1 + sin(pi*x(i)/4); b(n-1) = 1 + sin(pi*x(n-1)/4) + 1/h^; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Code that calls the function with inputs looping over an input vector of n values: % Generate the tridiagonal system of the differential equation % -u (x) + u(x) = 1 + sin(pi*x/4), 0 <= x <= % u(0)=, u()=4 % for a vector of n values % vector of n n = [,8,10]; % loop over n for i = 1:length(n); [A,b] = tridiagsys(n(i)); display(a) display(b). There is only one root between [a k1, b k1 ]. The midpoint of the interval is a k1+b k1. Let the root be r. If our guess ˆx k is in the left half of the interval, i.e. ˆx k [a k1, a k1+b k1 ), the worst case would be when r = b k1, and the error in this case would be e = b k1 ˆx k > b k1a k1. Similarly, if our guess ˆx k is in the right half of the interval, i.e. or ˆx k ( a k1+b k1, b k1 ], the

4 worst case would be when r = a k1, and the error in this case would be e = a k1 ˆx k > b k1 a k1. If our guess ˆx k is at the midpoint, i.e. ˆx k = a k1+b k1, then the worst case is when r = a k1 or r = b k1, and in either case the error e = b k1a k1 is less than that of other guesses. 4. Perform steps of bisection method to find the root of f(x) = exp[x sin(x)], starting with a 0 = and b 0 =. f(a 0 ) =.9545 f(b 0 ) = f(a 0 ) f(b 0 ) < 0. There is a root between a 0 and b 0. ˆx 1 = c 1 = a 0 + b 0 f(c 1 ) = = + = 0 f(c 1 ) f(b 0 ) < 0. There is a root between c 1 and b 0. a 1 = c 1 = 0 b 1 = b 0 = ˆx = c = a 1 + b 1 f(a 1 ) = f(b 1 ) = f(c ) = = 0 + = 1 f(c ) f(a 1 ) < 0. There is a root between c and a 1. a = a 1 = 0 b = c = 1 ˆx = c = a + b f(a ) = f(b ) = f(c ) = = = 0.5 f(c ) f(b ) < 0. There is a root between c and b. a = c = 0.5 b = b = 1 ˆx 4 = c 4 = a + b = Matlab code that performs bisection method. = 0.75 function [f] = functioneval(x) % Compute the function value % Input variables 4

5 % - x: the point where function value is calculated % Output variables % - f: function value at point x % Functions Called % - None f = - exp(*x - sin(x)); A function that performs bisection method: function [root, f, n] = bisection_mthd(a,b,eps) % The objective of this code is to compute the root of a % function using the bisection method. % Input variables % - a,b: the starting points of the bisection algorithm % - eps: the desired error % Output variables % - root: The approximation of the root of the function after n iterations (xhat_n) % - f: The value of the funtion at xhat_n % - n: The number of function evaluations % Functions Called % - functioneval: This function returns the evaluation of f at x % Initial function evaluations fa = functioneval(a); fb = functioneval(b); % Check if starting point is compatible if (fa*fb > 0) error( Initial points are incompatible ); % Determine number of steps corresponding to desired error n = ceil((log(b-a) - log(eps))/log()); % midpoint of [a_0,b_0] c = a + 0.5*(b-a); % Algorithm. of Textbook for i = 1:n-1 fc = functioneval(c); if (fa*fc < 0) b = c; fb = fc; elseif (fa*fc > 0) a = c; fa = fc; else %fa*fc = 0 root = c; 5

6 root = (a+b)/; f = functioneval(root); % there is one function evaluation in each iteration from step to step n; % and there are two function evaluations in the beginning % number of function evaluations = n+1 n= n+1; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Results: >> [xhat_n,fxhat_n,n]= bisection_mthd(-,,10^(-5)) xhat_n = fxhat_n = n = -8.51e-0 0

Root 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 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 information

Bisection and False Position Dr. Marco A. Arocha Aug, 2014

Bisection 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 information

Figure 1: Graph of y = x cos(x)

Figure 1: Graph of y = x cos(x) Chapter The Solution of Nonlinear Equations f(x) = 0 In this chapter we will study methods for find the solutions of functions of single variables, ie values of x such that f(x) = 0 For example, f(x) =

More information

Midterm Review. Igor Yanovsky (Math 151A TA)

Midterm 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 information

Homework #4 Solutions

Homework #4 Solutions Homework #4 Solutions 1. f(x) = e x + e 1+sin(x) + cos (x) f (x) = e x + cos(x) e 1+sin(x) sin (x) f (x) = e x + e 1+sin(x) (cos (x) sin(x)) cos (x) f (x) = (1 3e 1+sin(x) cos(x)) sin(x) + e 1+sin(x) (cos

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

Determining the Roots of Non-Linear Equations Part I

Determining the Roots of Non-Linear Equations Part I Determining the Roots of Non-Linear Equations Part I Prof. Dr. Florian Rupp German University of Technology in Oman (GUtech) Introduction to Numerical Methods for ENG & CS (Mathematics IV) Spring Term

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

Justify all your answers and write down all important steps. Unsupported answers will be disregarded.

Justify all your answers and write down all important steps. Unsupported answers will be disregarded. Numerical Analysis FMN011 10058 The exam lasts 4 hours and has 13 questions. A minimum of 35 points out of the total 70 are required to get a passing grade. These points will be added to those you obtained

More information

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.

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. The Bisection method or BOLZANO s method or Interval halving method: Find the positive root of x 3 x = 1 correct to four decimal places by bisection method Let f x = x 3 x 1 Here f 0 = 1 = ve, f 1 = ve,

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

MAE 107 Homework 8 Solutions

MAE 107 Homework 8 Solutions MAE 107 Homework 8 Solutions 1. Newton s method to solve 3exp( x) = 2x starting at x 0 = 11. With chosen f(x), indicate x n, f(x n ), and f (x n ) at each step stopping at the first n such that f(x n )

More information

Math 471. Numerical methods Root-finding algorithms for nonlinear equations

Math 471. Numerical methods Root-finding algorithms for nonlinear equations Math 471. Numerical methods Root-finding algorithms for nonlinear equations overlap Section.1.5 of Bradie Our goal in this chapter is to find the root(s) for f(x) = 0..1 Bisection Method Intermediate value

More information

Homework 2 - Solutions MA/CS 375, Fall 2005

Homework 2 - Solutions MA/CS 375, Fall 2005 Homework 2 - Solutions MA/CS 375, Fall 2005 1. Use the bisection method, Newton s method, and the Matlab R function fzero to compute a positive real number x satisfying: sinh x = cos x. For each of the

More information

GAMS. Loops and Conditional Statements. x 2, x < 0. write a GAMS model that calculates the value of f(x) for the following set of x values:

GAMS. Loops and Conditional Statements. x 2, x < 0. write a GAMS model that calculates the value of f(x) for the following set of x values: GAMS Loops and Conditional Statements 1. Examples: Example 1: The function f(x) is defined by: x 2, x < 0 f(x) = sin(x), 0 x < π 2 1, x π 2 write a GAMS model that calculates the value of f(x) for the

More information

Homework and Computer Problems for Math*2130 (W17).

Homework 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 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

Root Finding Convergence Analysis

Root 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

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

Practical Numerical Analysis: Sheet 3 Solutions

Practical 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 information

If you need the source code from the sample solutions, copy and paste from the PDF should work. If you re having trouble, send me an .

If you need the source code from the sample solutions, copy and paste from the PDF should work. If you re having trouble, send me an  . AM117 Sample Solutions, HW#1 Hi, I m Andreas Kloeckner, your grader for this course. Feel free to email me at kloeckner@dam.brown.edu. The code for the sample solutions is written so that it will run in

More information

Numerical Methods 5633

Numerical 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 information

STOP, a i+ 1 is the desired root. )f(a i) > 0. Else If f(a i+ 1. Set a i+1 = a i+ 1 and b i+1 = b Else Set a i+1 = a i and b i+1 = a i+ 1

STOP, a i+ 1 is the desired root. )f(a i) > 0. Else If f(a i+ 1. Set a i+1 = a i+ 1 and b i+1 = b Else Set a i+1 = a i and b i+1 = a i+ 1 53 17. Lecture 17 Nonlinear Equations Essentially, the only way that one can solve nonlinear equations is by iteration. The quadratic formula enables one to compute the roots of p(x) = 0 when p P. Formulas

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

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 Methods Lecture 3

Numerical 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 information

1. Write a program based on computing divided differences one diagonal at a time as shown below: f x 1,x 2

1. 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 information

Today s class. Numerical differentiation Roots of equation Bracketing methods. Numerical Methods, Fall 2011 Lecture 4. Prof. Jinbo Bi CSE, UConn

Today s class. Numerical differentiation Roots of equation Bracketing methods. Numerical Methods, Fall 2011 Lecture 4. Prof. Jinbo Bi CSE, UConn Today s class Numerical differentiation Roots of equation Bracketing methods 1 Numerical Differentiation Finite divided difference First forward difference First backward difference Lecture 3 2 Numerical

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

Solving Non-Linear Equations (Root Finding)

Solving Non-Linear Equations (Root Finding) Solving Non-Linear Equations (Root Finding) Root finding Methods What are root finding methods? Methods for determining a solution of an equation. Essentially finding a root of a function, that is, a zero

More information

Unit 2: Solving Scalar Equations. Notes prepared by: Amos Ron, Yunpeng Li, Mark Cowlishaw, Steve Wright Instructor: Steve Wright

Unit 2: Solving Scalar Equations. Notes prepared by: Amos Ron, Yunpeng Li, Mark Cowlishaw, Steve Wright Instructor: Steve Wright cs416: introduction to scientific computing 01/9/07 Unit : Solving Scalar Equations Notes prepared by: Amos Ron, Yunpeng Li, Mark Cowlishaw, Steve Wright Instructor: Steve Wright 1 Introduction We now

More information

Numerical methods. Examples with solution

Numerical methods. Examples with solution Numerical methods Examples with solution CONTENTS Contents. Nonlinear Equations 3 The bisection method............................ 4 Newton s method.............................. 8. Linear Systems LU-factorization..............................

More information

4. We accept without proofs that the following functions are differentiable: (e x ) = e x, sin x = cos x, cos x = sin x, log (x) = 1 sin x

4. We accept without proofs that the following functions are differentiable: (e x ) = e x, sin x = cos x, cos x = sin x, log (x) = 1 sin x 4 We accept without proofs that the following functions are differentiable: (e x ) = e x, sin x = cos x, cos x = sin x, log (x) = 1 sin x x, x > 0 Since tan x = cos x, from the quotient rule, tan x = sin

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

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

5. 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 information

Homework for Section 1.4, Continuity and One sided Limits. Study 1.4, # 1 21, 27, 31, 37 41, 45 53, 61, 69, 87, 91, 93. Class Notes: Prof. G.

Homework for Section 1.4, Continuity and One sided Limits. Study 1.4, # 1 21, 27, 31, 37 41, 45 53, 61, 69, 87, 91, 93. Class Notes: Prof. G. GOAL: 1. Understand definition of continuity at a point. 2. Evaluate functions for continuity at a point, and on open and closed intervals 3. Understand the Intermediate Value Theorum (IVT) Homework for

More information

Some MATLAB Programs and Functions. Bisection Method

Some MATLAB Programs and Functions. Bisection Method Some MATLAB Programs and Functions By Dr. Huda Alsaud Bisection Method %Computes approximate solution of f(x)=0 %Input: function handle f; a,b such that f(a)*f(b)

More information

Continuity. To handle complicated functions, particularly those for which we have a reasonable formula or formulas, we need a more precise definition.

Continuity. To handle complicated functions, particularly those for which we have a reasonable formula or formulas, we need a more precise definition. Continuity Intuitively, a function is continuous if its graph can be traced on paper in one motion without lifting the pencil from the paper. Thus the graph has no tears or holes. To handle complicated

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

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

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

Lesson 59 Rolle s Theorem and the Mean Value Theorem

Lesson 59 Rolle s Theorem and the Mean Value Theorem Lesson 59 Rolle s Theorem and the Mean Value Theorem HL Math - Calculus After this lesson, you should be able to: Understand and use Rolle s Theorem Understand and use the Mean Value Theorem 1 Rolle s

More information

Mark Scheme (Results) Summer 2010

Mark Scheme (Results) Summer 2010 Mark Scheme (Results) Summer 2010 IGCSE IGCSE Mathematics (4400) Paper 4H Higher Tier Edexcel Limited. Registered in England and Wales No. 4496750 Edexcel is one of the leading examining and awarding bodies

More information

Intro to Scientific Computing: How long does it take to find a needle in a haystack?

Intro to Scientific Computing: How long does it take to find a needle in a haystack? Intro to Scientific Computing: How long does it take to find a needle in a haystack? Dr. David M. Goulet Intro Binary Sorting Suppose that you have a detector that can tell you if a needle is in a haystack,

More information

Chapter 2: Functions, Limits and Continuity

Chapter 2: Functions, Limits and Continuity Chapter 2: Functions, Limits and Continuity Functions Limits Continuity Chapter 2: Functions, Limits and Continuity 1 Functions Functions are the major tools for describing the real world in mathematical

More information

Chapter 8: Taylor s theorem and L Hospital s rule

Chapter 8: Taylor s theorem and L Hospital s rule Chapter 8: Taylor s theorem and L Hospital s rule Theorem: [Inverse Mapping Theorem] Suppose that a < b and f : [a, b] R. Given that f (x) > 0 for all x (a, b) then f 1 is differentiable on (f(a), f(b))

More information

2.2 The Limit of a Function

2.2 The Limit of a Function 2.2 The Limit of a Function Introductory Example: Consider the function f(x) = x is near 0. x f(x) x f(x) 1 3.7320508 1 4.236068 0.5 3.8708287 0.5 4.1213203 0.1 3.9748418 0.1 4.0248457 0.05 3.9874607 0.05

More information

AMSC/CMSC 466 Problem set 3

AMSC/CMSC 466 Problem set 3 AMSC/CMSC 466 Problem set 3 1. Problem 1 of KC, p180, parts (a), (b) and (c). Do part (a) by hand, with and without pivoting. Use MATLAB to check your answer. Use the command A\b to get the solution, and

More information

Math 552 Scientific Computing II Spring SOLUTIONS: Homework Set 1

Math 552 Scientific Computing II Spring SOLUTIONS: Homework Set 1 Math 552 Scientific Computing II Spring 21 SOLUTIONS: Homework Set 1 ( ) a b 1 Let A be the 2 2 matrix A = By hand, use Gaussian elimination with back c d substitution to obtain A 1 by solving the two

More information

* is a row matrix * An mxn matrix is a square matrix if and only if m=n * A= is a diagonal matrix if = 0 i

* is a row matrix * An mxn matrix is a square matrix if and only if m=n * A= is a diagonal matrix if = 0 i CET MATRICES *A matrix is an order rectangular array of numbers * A matrix having m rows and n columns is called mxn matrix of order * is a column matrix * is a row matrix * An mxn matrix is a square matrix

More information

Computing Integrals. Lectures INF2320 p. 1/48

Computing Integrals. Lectures INF2320 p. 1/48 Computing Integrals Lectures INF2320 p. 1/48 Lectures INF2320 p. 2/48 Bagels We study a simple example of scientific computing. Assume that you run a Bagel&Juice cafè Each night you have to decide how

More information

Root finding. Root finding problem. Root finding problem. Root finding problem. Notes. Eugeniy E. Mikhailov. Lecture 05. Notes

Root 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 information

CHAPTER-II ROOTS OF EQUATIONS

CHAPTER-II ROOTS OF EQUATIONS CHAPTER-II ROOTS OF EQUATIONS 2.1 Introduction The roots or zeros of equations can be simply defined as the values of x that makes f(x) =0. There are many ways to solve for roots of equations. For some

More information

Linearization and Extreme Values of Functions

Linearization and Extreme Values of Functions Linearization and Extreme Values of Functions 3.10 Linearization and Differentials Linear or Tangent Line Approximations of function values Equation of tangent to y = f(x) at (a, f(a)): Tangent line approximation

More information

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method COURSE 7 3. Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method The presence of derivatives in the remainder difficulties in applicability to practical problems

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

A Review of Bracketing Methods for Finding Zeros of Nonlinear Functions

A Review of Bracketing Methods for Finding Zeros of Nonlinear Functions Applied Mathematical Sciences, Vol 1, 018, no 3, 137-146 HIKARI Ltd, wwwm-hikaricom https://doiorg/101988/ams018811 A Review of Bracketing Methods for Finding Zeros of Nonlinear Functions Somkid Intep

More information

Chapter 8 Gauss Elimination. Gab-Byung Chae

Chapter 8 Gauss Elimination. Gab-Byung Chae Chapter 8 Gauss Elimination Gab-Byung Chae 2008 5 19 2 Chapter Objectives How to solve small sets of linear equations with the graphical method and Cramer s rule Gauss Elimination Understanding how to

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

Introduction to PDEs and Numerical Methods Lecture 7. Solving linear systems

Introduction to PDEs and Numerical Methods Lecture 7. Solving linear systems Platzhalter für Bild, Bild auf Titelfolie hinter das Logo einsetzen Introduction to PDEs and Numerical Methods Lecture 7. Solving linear systems Dr. Noemi Friedman, 09.2.205. Reminder: Instationary heat

More information

Mean Value Theorem. MATH 161 Calculus I. J. Robert Buchanan. Summer Department of Mathematics

Mean Value Theorem. MATH 161 Calculus I. J. Robert Buchanan. Summer Department of Mathematics Mean Value Theorem MATH 161 Calculus I J. Robert Buchanan Department of Mathematics Summer 2018 Background: Corollary to the Intermediate Value Theorem Corollary Suppose f is continuous on the closed interval

More information

Taylor and Maclaurin Series. Approximating functions using Polynomials.

Taylor and Maclaurin Series. Approximating functions using Polynomials. Taylor and Maclaurin Series Approximating functions using Polynomials. Approximating f x = e x near x = 0 In order to approximate the function f x = e x near x = 0, we can use the tangent line (The Linear

More information

Motivation: We have already seen an example of a system of nonlinear equations when we studied Gaussian integration (p.8 of integration notes)

Motivation: 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 information

MATH 20B MIDTERM #2 REVIEW

MATH 20B MIDTERM #2 REVIEW MATH 20B MIDTERM #2 REVIEW FORMAT OF MIDTERM #2 The format will be the same as the practice midterms. There will be six main questions worth 0 points each. These questions will be similar to problems you

More information

Math-3315 & CSE-3365, exam 2 answer sheet

Math-3315 & CSE-3365, exam 2 answer sheet Math-3315 & CSE-3365, exam 2 answer sheet Oct. 23, 2012 Problem 1. (20 points) Given a vector z that contains all distinct elements z 1,z 2,,z n. The first task is to generate an n n Vandermonde-type matrix

More information

Intermediate Value Theorem

Intermediate Value Theorem Stewart Section 2.5 Continuity p. 1/ Intermediate Value Theorem The intermediate value theorem states that, if a function f is continuous on a closed interval [a,b] (that is, an interval that includes

More information

An Overly Simplified and Brief Review of Differential Equation Solution Methods. 1. Some Common Exact Solution Methods for Differential Equations

An Overly Simplified and Brief Review of Differential Equation Solution Methods. 1. Some Common Exact Solution Methods for Differential Equations An Overly Simplified and Brief Review of Differential Equation Solution Methods We will be dealing with initial or boundary value problems. A typical initial value problem has the form y y 0 y(0) 1 A typical

More information

Homework 2. Matthew Jin. April 10, 2014

Homework 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 information

Mean Value Theorem. MATH 161 Calculus I. J. Robert Buchanan. Summer Department of Mathematics

Mean Value Theorem. MATH 161 Calculus I. J. Robert Buchanan. Summer Department of Mathematics Mean Value Theorem MATH 161 Calculus I J. Robert Buchanan Department of Mathematics Summer 2018 Background: Corollary to the Intermediate Value Theorem Corollary Suppose f is continuous on the closed interval

More information

Taylor and Maclaurin Series. Approximating functions using Polynomials.

Taylor and Maclaurin Series. Approximating functions using Polynomials. Taylor and Maclaurin Series Approximating functions using Polynomials. Approximating f x = e x near x = 0 In order to approximate the function f x = e x near x = 0, we can use the tangent line (The Linear

More information

Qualifying Examination

Qualifying Examination Summer 24 Day. Monday, September 5, 24 You have three hours to complete this exam. Work all problems. Start each problem on a All problems are 2 points. Please email any electronic files in support of

More information

Chapter 2 Solutions of Equations of One Variable

Chapter 2 Solutions of Equations of One Variable Chapter 2 Solutions of Equations of One Variable 2.1 Bisection Method In this chapter we consider one of the most basic problems of numerical approximation, the root-finding problem. This process involves

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

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

Announcements. Topics: Homework:

Announcements. Topics: Homework: Announcements Topics: - sections 7.3 (the definite integral +area), 7.4 (FTC), 7.5 (additional techniques of integration) * Read these sections and study solved examples in your textbook! Homework: - review

More information

SOLUTIONS to Problems for Review Chapter 15 McCallum, Hughes, Gleason, et al. ISBN by Vladimir A. Dobrushkin

SOLUTIONS to Problems for Review Chapter 15 McCallum, Hughes, Gleason, et al. ISBN by Vladimir A. Dobrushkin SOLUTIONS to Problems for Review Chapter 1 McCallum, Hughes, Gleason, et al. ISBN 978-0470-118-9 by Vladimir A. Dobrushkin For Exercises 1, find the critical points of the given function and classify them

More information

Examination paper for TMA4215 Numerical Mathematics

Examination paper for TMA4215 Numerical Mathematics Department of Mathematical Sciences Examination paper for TMA425 Numerical Mathematics Academic contact during examination: Trond Kvamsdal Phone: 93058702 Examination date: 6th of December 207 Examination

More information

Consider the following example of a linear system:

Consider the following example of a linear system: LINEAR SYSTEMS Consider the following example of a linear system: Its unique solution is x + 2x 2 + 3x 3 = 5 x + x 3 = 3 3x + x 2 + 3x 3 = 3 x =, x 2 = 0, x 3 = 2 In general we want to solve n equations

More information

MA 8019: Numerical Analysis I Solution of Nonlinear Equations

MA 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 information

Who am I? Math 1080: Numerical Linear Algebra. Books. Format

Who am I? Math 1080: Numerical Linear Algebra. Books. Format Who am I? Math 18: Numerical Linear Algebra M M Sussman sussmanm@mathpittedu Office Hours: MW 1:45PM-2:45PM, Thack 622 Part-time faculty in Math Dept Experience at Bettis lab Administer 27/271 Numerical

More information

ME 535 Project Report Numerical Computation of Plastic Zone Shapes in Fracture Mechanics. V.V.H. Aditya ( ) Rishi Pahuja ( ) June 9, 2014

ME 535 Project Report Numerical Computation of Plastic Zone Shapes in Fracture Mechanics. V.V.H. Aditya ( ) Rishi Pahuja ( ) June 9, 2014 ME 535 Project Report Numerical Computation of Plastic Zone Shapes in Fracture Mechanics V.V.H. Aditya (137301) Rishi Pahuja (137303) June 9, 014 Abstract The purpose of this project is to numerically

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

Announcements. Topics: Homework: - sections , 6.1 (extreme values) * Read these sections and study solved examples in your textbook!

Announcements. Topics: Homework: - sections , 6.1 (extreme values) * Read these sections and study solved examples in your textbook! Announcements Topics: - sections 5.2 5.7, 6.1 (extreme values) * Read these sections and study solved examples in your textbook! Homework: - review lecture notes thoroughly - work on practice problems

More information

AIMS Exercise Set # 1

AIMS Exercise Set # 1 AIMS Exercise Set #. Determine the form of the single precision floating point arithmetic used in the computers at AIMS. What is the largest number that can be accurately represented? What is the smallest

More information

Chapter 1: Limits and Continuity

Chapter 1: Limits and Continuity Chapter 1: Limits and Continuity Winter 2015 Department of Mathematics Hong Kong Baptist University 1/69 1.1 Examples where limits arise Calculus has two basic procedures: differentiation and integration.

More information

MAT137 Calculus! Lecture 9

MAT137 Calculus! Lecture 9 MAT137 Calculus! Lecture 9 Today we will study: Limits at infinity. L Hôpital s Rule. Mean Value Theorem. (11.5,11.6, 4.1) PS3 is due this Friday June 16. Next class: Applications of the Mean Value Theorem.

More information

SPECIMEN EXAMINATION 2014/2015 ADEDEX424. Access to Science - Mathematics 1. Dr. Anthony Cronin Dr. Anthony Brown. Time Allowed: 3 hours

SPECIMEN EXAMINATION 2014/2015 ADEDEX424. Access to Science - Mathematics 1. Dr. Anthony Cronin Dr. Anthony Brown. Time Allowed: 3 hours University College Dublin An Coláiste Ollscoile, Baile Átha Cliath SPECIMEN EXAMINATION 2014/2015 ADEDEX424 Access to Science - Mathematics 1 Dr. Anthony Cronin Dr. Anthony Brown Time Allowed: hours Instructions

More information

Engineering Computation

Engineering Computation Engineering Computation Systems of Linear Equations_1 1 Learning Objectives for Lecture 1. Motivate Study of Systems of Equations and particularly Systems of Linear Equations. Review steps of Gaussian

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

Math Homework 1. The homework consists mostly of a selection of problems from the suggested books. 1 ± i ) 2 = 1, 2.

Math Homework 1. The homework consists mostly of a selection of problems from the suggested books. 1 ± i ) 2 = 1, 2. Math 70300 Homework 1 September 1, 006 The homework consists mostly of a selection of problems from the suggested books. 1. (a) Find the value of (1 + i) n + (1 i) n for every n N. We will use the polar

More information

MATH 552 Spectral Methods Spring Homework Set 5 - SOLUTIONS

MATH 552 Spectral Methods Spring Homework Set 5 - SOLUTIONS MATH 55 Spectral Methods Spring 9 Homework Set 5 - SOLUTIONS. Suppose you are given an n n linear system Ax = f where the matrix A is tridiagonal b c a b c. A =.........,. a n b n c n a n b n with x =

More information

R x n. 2 R We simplify this algebraically, obtaining 2x n x n 1 x n x n

R x n. 2 R We simplify this algebraically, obtaining 2x n x n 1 x n x n Math 42 Homework 4. page 3, #9 This is a modification of the bisection method. Write a MATLAB function similar to bisect.m. Here, given the points P a a,f a and P b b,f b with f a f b,we compute the point

More information

Math 261 Calculus I. Test 1 Study Guide. Name. Decide whether the limit exists. If it exists, find its value. 1) lim x 1. f(x) 2) lim x -1/2 f(x)

Math 261 Calculus I. Test 1 Study Guide. Name. Decide whether the limit exists. If it exists, find its value. 1) lim x 1. f(x) 2) lim x -1/2 f(x) Math 261 Calculus I Test 1 Study Guide Name Decide whether the it exists. If it exists, find its value. 1) x 1 f(x) 2) x -1/2 f(x) Complete the table and use the result to find the indicated it. 3) If

More information

Section 3.7. Rolle s Theorem and the Mean Value Theorem

Section 3.7. Rolle s Theorem and the Mean Value Theorem Section.7 Rolle s Theorem and the Mean Value Theorem The two theorems which are at the heart of this section draw connections between the instantaneous rate of change and the average rate of change of

More information

Formulas to remember

Formulas to remember Complex numbers Let z = x + iy be a complex number The conjugate z = x iy Formulas to remember The real part Re(z) = x = z+z The imaginary part Im(z) = y = z z i The norm z = zz = x + y The reciprocal

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 Doug James (and Justin Solomon) CS 205A: Mathematical Methods Nonlinear Systems 1 / 27 Part III: Nonlinear Problems Not

More information

Chapter 6. Additional Topics in Trigonometry. 6.6 Vectors. Copyright 2014, 2010, 2007 Pearson Education, Inc.

Chapter 6. Additional Topics in Trigonometry. 6.6 Vectors. Copyright 2014, 2010, 2007 Pearson Education, Inc. Chapter 6 Additional Topics in Trigonometry 6.6 Vectors Copyright 2014, 2010, 2007 Pearson Education, Inc. 1 Obectives: Use magnitude and direction to show vectors are equal. Visualize scalar multiplication,

More information

Scilab. Prof. S. A. Katre Dept. of Mathematics, University of Pune

Scilab. Prof. S. A. Katre Dept. of Mathematics, University of Pune Scilab Prof. S. A. Katre Dept. of Mathematics, University of Pune sakatre@math.unipune.ernet.in sakatre@gmail.com sakatre@bprim.org July 25, 2009 Page 1 of 27 1. n-th roots ->%i %i = i -->sqrt(%i) 0.7071068

More information

5 Finding roots of equations

5 Finding roots of equations Lecture notes for Numerical Analysis 5 Finding roots of equations Topics:. Problem statement. Bisection Method 3. Newton s Method 4. Fixed Point Iterations 5. Systems of equations 6. Notes and further

More information