BOUNDARY VALUE PROBLEMS

Similar documents
Computation Fluid Dynamics

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

ECE 680 Modern Automatic Control. Gradient and Newton s Methods A Review

Numerical differentiation

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester

Math 253 Homework due Wednesday, March 9 SOLUTIONS

Numerical Methods I Solving Nonlinear Equations

MA22S3 Summary Sheet: Ordinary Differential Equations

Maths III - Numerical Methods

ROOT FINDING REVIEW MICHELLE FENG

Numerical Methods. Root Finding

Midterm Review. Igor Yanovsky (Math 151A TA)

Math 240 Calculus III

6x 2 8x + 5 ) = 12x 8

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

PDE: The Method of Characteristics Page 1

Scientific Computing: An Introductory Survey

Numerical Methods in Physics and Astrophysics

Numerical Methods in Physics and Astrophysics

Lecture 16: Relaxation methods

USHA RAMA COLLEGE OF ENGINEERING & TECHNOLOGY

Non-linear least squares

Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS

Lecture 39: Root Finding via Newton s Method

MATH 4211/6211 Optimization Basics of Optimization Problems

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

Numerical analysis meets number theory: using rootfinding methods to calculate inverses mod p n

Newton-Raphson. Relies on the Taylor expansion f(x + δ) = f(x) + δ f (x) + ½ δ 2 f (x) +..

(6.2) -The Shooting Method for Nonlinear Problems

ES 111 Mathematical Methods in the Earth Sciences Lecture Outline 15 - Tues 20th Nov 2018 First and Higher Order Differential Equations

Lecture 1, August 21, 2017

Linear Multistep Methods I: Adams and BDF Methods

FIXED POINT ITERATION

Fourth Order RK-Method

MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES

NATIONAL UNIVERSITY OF SINGAPORE PC5215 NUMERICAL RECIPES WITH APPLICATIONS. (Semester I: AY ) Time Allowed: 2 Hours

3 Algebraic Methods. we can differentiate both sides implicitly to obtain a differential equation involving x and y:

Introduction to gradient descent

Numerical Optimization Algorithms

SYSTEMS OF NONLINEAR EQUATIONS

Advanced Techniques for Mobile Robotics Least Squares. Wolfram Burgard, Cyrill Stachniss, Kai Arras, Maren Bennewitz

! 1.1 Definitions and Terminology

Analysis Methods in Atmospheric and Oceanic Science

Analysis Methods in Atmospheric and Oceanic Science

Applied Mathematics 205. Unit I: Data Fitting. Lecturer: Dr. David Knezevic

Introduction to Partial Differential Equations

Outline. Scientific Computing: An Introductory Survey. Nonlinear Equations. Nonlinear Equations. Examples: Nonlinear Equations

Math 240 Calculus III

2.2 Separable Equations

Lecture 5: Random numbers and Monte Carlo (Numerical Recipes, Chapter 7) Motivations for generating random numbers

6x 2 8x + 5 ) = 12x 8. f (x) ) = d (12x 8) = 12

MTH210 DIFFERENTIAL EQUATIONS. Dr. Gizem SEYHAN ÖZTEPE

CHAPTER 7. An Introduction to Numerical Methods for. Linear and Nonlinear ODE s

y 2y = 4 x, Name Form Solution method

REVIEW OF DIFFERENTIAL CALCULUS

Introduction to ODE's (0A) Young Won Lim 3/9/15

Gradient Based Optimization Methods

Ordinary Differential Equations

Chapter 9: Differential Analysis

Root Finding (and Optimisation)

Workshop on Theoretical Ecology and Global Change March 2009

Optimization. Totally not complete this is...don't use it yet...

Report due date. Please note: report has to be handed in by Monday, May 16 noon.

MATH 350: Introduction to Computational Mathematics

Do not turn over until you are told to do so by the Invigilator.

Lecture 2. Introduction to Differential Equations. Roman Kitsela. October 1, Roman Kitsela Lecture 2 October 1, / 25

Chapter 4: Numerical Methods for Common Mathematical Problems

DIFFERENTIAL EQUATIONS

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.

DIFFERENTIAL EQUATIONS

Quasi-Newton Methods

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.

Second Order ODEs. CSCC51H- Numerical Approx, Int and ODEs p.130/177

DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science

Chapter 9: Differential Analysis of Fluid Flow

Applied Calculus. Review Problems for the Final Exam

1 Lecture 24: Linearization

1. Nonlinear Equations. This lecture note excerpted parts from Michael Heath and Max Gunzburger. f(x) = 0

DIFFERENTIAL EQUATIONS

Problem Set 1 solutions

First Order ODEs, Part I

MATH 350: Introduction to Computational Mathematics

Ordinary Differential Equations

UNIVERSITY OF SOUTHAMPTON. A foreign language dictionary (paper version) is permitted provided it contains no notes, additions or annotations.

MATH 319, WEEK 2: Initial Value Problems, Existence/Uniqueness, First-Order Linear DEs

1. Method 1: bisection. The bisection methods starts from two points a 0 and b 0 such that

Convergence Rates on Root Finding

CS 323: Numerical Analysis and Computing

Problem. Set up the definite integral that gives the area of the region. y 1 = x 2 6x, y 2 = 0. dx = ( 2x 2 + 6x) dx.

Math and Numerical Methods Review

The Shooting Method for Boundary Value Problems

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

1 Newton s Method. Suppose we want to solve: x R. At x = x, f (x) can be approximated by:

Numerical solutions of nonlinear systems of equations

Exam 3 MATH Calculus I

Solutions of separable equations often are in an implicit form; that is, not solved for the dependent variable.

a factors The exponential 0 is a special case. If b is any nonzero real number, then

ENGI Partial Differentiation Page y f x

ASSIGNMENT BOOKLET. Numerical Analysis (MTE-10) (Valid from 1 st July, 2011 to 31 st March, 2012)

Transformations and A Universal First Order Taylor Expansion

Transcription:

BOUNDARY VALUE PROBLEMS School of Mathematics Semester 1 2008

OUTLINE 1 REVIEW 2 BOUNDARY VALUE PROBLEMS 3 NEWTONS SHOOTING METHOD 4 SUMMARY

OUTLINE 1 REVIEW 2 BOUNDARY VALUE PROBLEMS 3 NEWTONS SHOOTING METHOD 4 SUMMARY

OUTLINE 1 REVIEW 2 BOUNDARY VALUE PROBLEMS 3 NEWTONS SHOOTING METHOD 4 SUMMARY

OUTLINE 1 REVIEW 2 BOUNDARY VALUE PROBLEMS 3 NEWTONS SHOOTING METHOD 4 SUMMARY

INTIAL VALUE PROBLEMS FOR ODES So far we have have encountered initial value problems We can start at one end and march to the other We have seen different methods of differing order We will select a method based upon: Accuracy the order of errors in the method Expense how time consuming a method is Stability yet to talk about this!!

INTIAL VALUE PROBLEMS FOR ODES So far we have have encountered initial value problems We can start at one end and march to the other We have seen different methods of differing order We will select a method based upon: Accuracy the order of errors in the method Expense how time consuming a method is Stability yet to talk about this!!

OUTLINE Review 1 REVIEW 2 BOUNDARY VALUE PROBLEMS 3 NEWTONS SHOOTING METHOD 4 SUMMARY

BOUNDARY CONTITIONS All ODEs and PDEs require boundary conditions in order that a solution may exist In initial value problems, the boundary conditions are all on one side This is not always the case, for instance take the following problem: d 2 y dx 2 + κdy dx + xy = 0 with the boundary conditions y(0) = 0 and y(1) = 1. then we have conditions at both ends!

BOUNDARY CONTITIONS All ODEs and PDEs require boundary conditions in order that a solution may exist In initial value problems, the boundary conditions are all on one side This is not always the case, for instance take the following problem: d 2 y dx 2 + κdy dx + xy = 0 with the boundary conditions y(0) = 0 and y(1) = 1. then we have conditions at both ends!

BOUNDARY CONTITIONS All ODEs and PDEs require boundary conditions in order that a solution may exist In initial value problems, the boundary conditions are all on one side This is not always the case, for instance take the following problem: d 2 y dx 2 + κdy dx + xy = 0 with the boundary conditions y(0) = 0 and y(1) = 1. then we have conditions at both ends!

REDUCE THE PROBLEM TO AN ODE We can rewrite the problem above as a system of first order ODEs: Y 1 = y(x); Y 2 = dy dx ; dy 1 dx = Y 2; dy 2 dx = κy 2 xy 1. and the boundary conditions are: Y 1 (x = 0) = 0 and Y 1 (x = 1) = 0.

WHAT NEXT? Review In order to solve the problem by marching through x we need to assign a value to Y 2 (x = 0) How to choose a value of Y 2 our choice must satisfy the boundary condition y 1 (x) 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0 0.2 0.4 0.6 0.8 1 x

WHAT NEXT? Review In order to solve the problem by marching through x we need to assign a value to Y 2 (x = 0) How to choose a value of Y 2 our choice must satisfy the boundary condition y 1 (x) 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0 0.2 0.4 0.6 0.8 1 x

OUTLINE Review 1 REVIEW 2 BOUNDARY VALUE PROBLEMS 3 NEWTONS SHOOTING METHOD 4 SUMMARY

TAKING A GUESS Review Start by making a guess, g, to Y 2 (0) so that Y(0) = ( Y1 (0) Y 2 (0) ) = ( 0. g Next, solve using your favourite method, to get Y(1) = ( Y1 (1) Y 2 (1) ) = ( β1 then by comparing the value β 1 to our boundary condition, we can see how good the guess was β 2 ) )

UP A BIT... DOWN A BIT... In order to make our guess better, we want to know whether we have shot above or below Let us look at the value φ(g) = Y 1 (1; g) 1, then the guess is right when φ = 0. This now looks like a root finding problem which leads us to

UP A BIT... DOWN A BIT... In order to make our guess better, we want to know whether we have shot above or below Let us look at the value φ(g) = Y 1 (1; g) 1, then the guess is right when φ = 0. This now looks like a root finding problem which leads us to

OUTLINE Review 1 REVIEW 2 BOUNDARY VALUE PROBLEMS 3 NEWTONS SHOOTING METHOD 4 SUMMARY

CORRECTING THE GUESS Suppose we have taken a guess ĝ, then seek a correction dg such that φ(ĝ + dg) = 0 Then take a Taylor expansion around φ(ĝ) to obtain φ(ĝ + dg) = φ(ĝ) + dg dφ dg (ĝ) + O(dg2 ) So equating this to zero and rearranging we find our correction is dg = φ(ĝ) φ (ĝ)

REMINDER... Review Newton s root finding algorithm has quadratic convergence The formula is: x n+1 = x n f(x)/f (x) f(x) 0.8 0.6 0.4 0.2 0-0.2-0.4-0.6 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x Start with a guess x 0 = 0.8 In order to generate the green line, we need the gradient of f at x 0 = 0.8 The new guess is x 1 = 0.55625

REMINDER... Review Newton s root finding algorithm has quadratic convergence The formula is: x n+1 = x n f(x)/f (x) f(x) 0.8 0.6 0.4 0.2 0-0.2-0.4-0.6 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x Start with a guess x 0 = 0.8 In order to generate the green line, we need the gradient of f at x 0 = 0.8 The new guess is x 1 = 0.55625

OUTLINE Review 1 REVIEW 2 BOUNDARY VALUE PROBLEMS 3 NEWTONS SHOOTING METHOD 4 SUMMARY

SECANT METHOD Review Our formula to generate new guesses is: How do we find φ (g n )? We could estimate it by to give the Secant Method g n+1 = g n φ(g n) φ (g n ) φ (g n ) = φ(g n) φ(g n 1 ) g n g n 1 g n+1 = g n φ(g n)(g n g n 1 ) φ(g n ) φ(g n 1 )

SECANT METHOD Review Our formula to generate new guesses is: How do we find φ (g n )? We could estimate it by to give the Secant Method g n+1 = g n φ(g n) φ (g n ) φ (g n ) = φ(g n) φ(g n 1 ) g n g n 1 g n+1 = g n φ(g n)(g n g n 1 ) φ(g n ) φ(g n 1 )

OUTLINE Review 1 REVIEW 2 BOUNDARY VALUE PROBLEMS 3 NEWTONS SHOOTING METHOD 4 SUMMARY

INITIAL VALUE PROBLEM FOR g Consider again dy 1 dx =Y 2 dy 2 dx = κy 2 xy 1 with Y(0) = (0, g) T Then we can write φ (g n ) = Y 1 g (1; g n) This suggests we should differentiate the original equations with respect to g

INITIAL VALUE PROBLEM FOR g Consider again dy 1 dx =Y 2 dy 2 dx = κy 2 xy 1 with Y(0) = (0, g) T Then we can write φ (g n ) = Y 1 g (1; g n) This suggests we should differentiate the original equations with respect to g

INITIAL VALUE PROBLEM FOR g Then the initial value problem for φ is given by { } ( d Y = dx g ( Y 0 g = x=0 1 κ Y 2 Y 2 g g x Y 1 g ). ), Then we may recover φ since φ (g n ) = Y 1 g (1; g n) and use newton s formula to generate new guesses

INITIAL VALUE PROBLEM FOR g Then the initial value problem for φ is given by { } ( d Y = dx g ( Y 0 g = x=0 1 κ Y 2 Y 2 g g x Y 1 g ). ), Then we may recover φ since φ (g n ) = Y 1 g (1; g n) and use newton s formula to generate new guesses

THE NEWTON-AUGMENTED SYSTEM Simultaneously solve for Y and φ, setting Y 1 = y, Y 2 = y, Y 3 = y/ g and Y 4 = y / g Resulting system looks something like dy dx = Y 2 κy 2 xy 1 Y 4 κy 4 xy 3, Y(x = 0) = 0 g 0 1.

SUMMARY Boundary value problems are commonplace in CFD and mathematics in general Newton s Shooting method is one of the most common methods for solving these types of problem Newton s method is quadratic, so should converge in 5-15 iterations Start worrying if it doesn t!

SUMMARY Boundary value problems are commonplace in CFD and mathematics in general Newton s Shooting method is one of the most common methods for solving these types of problem Newton s method is quadratic, so should converge in 5-15 iterations Start worrying if it doesn t!