Introduction to Scientific Computing

Size: px
Start display at page:

Download "Introduction to Scientific Computing"

Transcription

1 Introduction to Scientific Computing Benson Muite benson 5 March 218 [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 1 / 29

2 Course Aims General introduction to numerical and computational mathematics Review programming methods Learn about some numerical algorithms Understand how these methods are used in real world situations [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 2 / 29

3 Course Overview Lectures Monday J. Livii Benson Muite (benson dot muite at ut dot ee) Practical Monday J. Livii Benson Muite (benson dot muite at ut dot ee) Homework typically due once a week until project. Expected to start this in the labs. Exam/final project presentation will be scheduled at end of course. Grading: Homework 5%, Exam 3%, Active participation 1%, Tests 1% Course Texts: Solomon Numerical Algorithms: Methods for Computer Vision, Machine Learning, and Graphics Pitt-Francis and Whiteley Guide to scientific computing in C++ [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 3 / 29

4 Lecture Topics 1) 12 February: Graphing, differentiation and integration dimension 2) 19 February: programming, recursion, arithmetic operations 3) 26 February: Linear algebra 4) 5 March: Floating point numbers, errors and ordinary differential equations 5) 12 March: Image analysis using statistics 6) 19 March: Image analysis using differential equations - Lecture by Gul Wali Shah 7) 26 March: Case study: Application of machine learning to analyse literary corpora 8) 2 April: Case study: DNA simulation using molecular dynamics [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 4 / 29

5 Lab Topics 1) 12 February: Mathematical functions, differentiation and integration, plotting, reading: https: //doi.org/1.18/ ) 19 February: Sequences, Series summation, convergence and divergence, Fibonacci numbers and Collatz conjecture or similar experimental mathematics 3) 26 February: Monte Carlo integration, parallel computing introduction, Matrix Multiply, LU decomposition 4) 5 March: Finite difference method, error analysis, interval analysis, image segmentation by matrix differences Reading [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 5 / 29

6 Lab Topics 5) 12 March: Eigenvalue computations, singular value decomposition, use of matrix operations in statistics - Eigenfaces 6) 19 March: fixed point iteration, image segmentation - solve partial differential equation from finite differences discretization with implicit timestepping (Mumford-Shah model), compare iterative and direct solvers 7) 26 March: Optimization algorithms, deep learning Reading 8) 2 April: Molecular dynamics simulation using Gromacs [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 6 / 29

7 Reading 1) 12 February: Solomon chapter 1 and 2) 19 February: Solomon chapters 2 and 3 3) 26 February: Monte Carlo integration, parallel computing introduction Solomon chapters 4, 5 4) 5 March: Solomon chapters 14 and 15, interval analysis Reading Differential Equations and Exact Solutions in the Moving Sofa Problem [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 7 / 29

8 Reading 5) 12 March: Matrix Multiply, Eigenvalue computations, singular value decomposition, use of matrix operations in statistics Solomon chapters 6 and 7 6) 19 March: Solomon chapters 11, 13 and 16 7) 26 March: Word count, clustering algorithms, optimization algorithms, deep learning Reading Solomon chapters 8, 9 and 12 8) 2 April: Molecular dynamics simulation [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 8 / 29

9 Some Nice Pictures and Videos ISC 216 Visualization showcase Paraview VisIt computer-codes/visit/gallery Amit Chourasia amit/web/home National Center for Supercomputing Applications Visualization Group University of Stuttgart http: // Brian Leu, Albert Liu, Parth Sheth brianleu/ Michael Quell UCSG6bca26nybgK39n5vnE6w [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 9 / 29

10 Monte Carlo Method: A Probabilistic Way to Calculate Integrals f = 1 b b a a f (x) dx Hence given f, then b a f (x)dx = (b a) f Doing the same in 2 dimensions and estimating the error using the standard deviation f (x, y) da A(R) f ± A(R) R Approximate f by random sampling f 2 ( f ) 2 N 1, f N i=1 f (x i, y i ) N and f 2 N i=1 (f (x i, y i )) 2 N [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 1 / 29

11 Monte Carlo Method: Python Program A program to approximate an i n t e g r a l using a Monte Carlo method This could be made faster by using vectorization, however i t is kept as simple as possible for c l a r i t y and ease of translation into other languages import math import numpy import time numpoints=496 # number of random sample p o i n t s I2d =. # i n i t i a l i z e value I2dsquare =. # i n i t i a l i z e to allow for calculation of variance for n in range ( numpoints ) : x=numpy. random. uniform ( ) y=4. numpy. random. uniform ( ) I2d=I2d+x x+2. y y I2dsquare=I2dsquare +( x x+2. y y) 2 # we scale the i n t e g r a l by the t o t a l area and d i v i d e by the number of # p o i n t s used I2d=I2d / numpoints I2dsquare=I2dsquare / numpoints EstimError=4 numpy. sqrt ( ( I2dsquare I2d 2)/ numpoints ) # estimated e r r o r I2d=I2d 4 p r i n t ( Value : %f %I2d ) print ( Error estimate : %f %EstimError ) Listing 1: A Python program to calculate the volume below z = x 2 + 2y 2, with (x, y) (, 1) (, 4). [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 11 / 29

12 Sample Results of Monte Carlo Program N Value Error Estimate / / / / [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 12 / 29

13 References on Monte Carlo Method https: //en.wikipedia.org/wiki/monte_carlo_method Monte-Carlo method. G.A. Mikhailov (originator), Encyclopedia of Mathematics. php?title=monte-carlo_method&oldid=15336 [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 13 / 29

14 Minimization and Image Alignment One area where minimization is important is in image alignment This may be useful for generating image panoramas Aligning objects [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 14 / 29

15 Minimization and Image Alignment If we have two pictures, and a region of overlap, want to find the transformation for the region of overlap Can minimize RX Y + A where R is a transformation matrix, X and Y contain pixel values for the image in the region of overlap and A is a translation. Choice of norm can affect speed and complexity of computation, in addition to quality of result [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 15 / 29

16 Timestepping for Ordinary Differential Equations: Single Step methods Some of these can be derived from quadrature formulae because du = F(u) u(t = ) = u dt is equivalent to t u(t) = u + F (u(τ))dτ For a single time step δt F (u(τ))dτ F (u())δt gives forward Euler. δt δt δt F (u(τ))dτ F (u(δt))δt gives backward Euler. F (u(τ))dτ.5 [F(u()) + F(u(δt))] δt gives Crank Nicolson. F (u(τ))dτ F (.5u() +.5u(δt))δt gives Implicit Midpoint Rule [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 16 / 29

17 Example from social sciences Abrams-Strogatz model for language death dx = yp yx xp xy dt p xy = csx a p yx = c(1 s)(1 x) a y = 1 x x fraction of population speakers of language x, y fraction of population speakers of language x, p xy probability of switching from language x to y, p yx probability of switching from language y to x, c time scaling constant, a influence of population size on probability of switching language (claim a 1.3 for many groups), s - relative status of language [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 17 / 29

18 Abrams-Strogatz model Demo - Forward Euler method [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 18 / 29

19 Fourth order Runge Kutta Consider du = F(u) u(t = ) = u dt. A popular explicit fourth order Runge-Kutta method is q 1 = f (t k, y k ) q 2 = f (t k + h/2, y k + hq 1 /2) q 3 = f (t k + h/2, y k + hq 2 /2) q 4 = f (t k + h, y k + hq 3 ) y k+1 = y k + h(q 1 + 2q 2 + 2q 3 + q 4 )/6 [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 19 / 29

20 Generating Runge Kutta Methods Butcher Tableau Order conditions [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 2 / 29

21 Generating Runge Kutta Methods Consider 1 1 φ(x)dx φ() + dφ dx x + d2 φ x 2 x= dx 2 x= 2 dx φ() + dφ 1 dx x= 2 + d2 φ 1 dx 2 x= 6 Approximate derivative by finite difference dφ dx φ(θ) φ() θ [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 21 / 29

22 Generating Runge Kutta Methods 1 1 [ ] φ(θ) φ() φ(x)dx φ() + xdx θ ( 1 1 ) φ() + 1 φ(θ) θ (, 1] 2θ 2θ hence δt y(δt) = y() + f (τ, y(τ))dτ ( y() ) (δt)f (, y() 2θ + 1 (δt)f (θ, y() + θ(δt)f (, y()))) 2θ Can generalize this, but first let us calculate the error [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 22 / 29

23 Generating Runge Kutta Methods hence Y 1 = y() + θδtf (, y()) f (θδt, Y 1 ) f (, y() + d f (, y())θδt ( dt f f (, y()) + t + f ) y θδt y t y(δt) = y() + ( 1 1 ) 2θ + 1 2θ δt [f (, y()) + δtf (, y()) ( f t + f y y t ) ] θδt y() + δtf (, y()) + δt2 d 2 dt f (, y()) + O(δt3 ) thus get a second order method [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 23 / 29

24 Generating Runge Kutta Methods To get a higher order method, consider the Butcher tableau so that Y 1 = y() c 1 a 21 c 2 a 31 a 32 b 1 b 2 b 3 Y 2 = y() + δta 21 f (c 1 δt, Y 1 ) Y 3 = y() + δta 31 f (c 2 δt, Y 1 ) + +δta 32 f (c 2 δt, Y 2 ) y(δt) = y() + δt [b 1 Y 1 + b 2 Y 2 + b 3 Y 3 ] Use Taylor expansions to generate order conditions [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 24 / 29

25 Generating Runge Kutta Methods Resulting equations for order conditions b 1 + b 2 + b 3 = 1 b 2 c 2 + b 3 c 3 = 1 2 b 2 c b 3c 2 3 = 1 3 b 3 a 32 c 2 = 1 6 i 1 c i = j=1 a ij [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 25 / 29

26 Generating Runge Kutta Methods Some example solutions Nystrom method RK32 RK [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 26 / 29

27 Generating Runge-Kutta Methods Can systematically generate order conditions using rooted trees and theory of B-series. See Butcher (28), Iserles (29) and Nodepy Can also use similar procedure to generate implicit Runge-Kutta methods for example [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 27 / 29

28 Lorenz equations [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 28 / 29

29 References Butcher An algebraic theory of integration methods Math. Comp. 26 (1972), /S #sthash. DAsEU3y.dpuf Butcher Runge-Kutta methods Scholarpedia (27) Runge-Kutta_methods Krasny Numerical Methods Lecture notes math.lsa.umich.edu/ krasny/math471.html [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 29 / 29

30 References Kouya, Performance evaluation of multiple precision matrix multiplications using parallelized Strassen and Winograd algorithms arxiv: v1 Nodepy Parallel Spectral Numerical Methods Spectral_Numerical_Methods Trefethen Finite Difference and Spectral Methods for Ordinary and Partial Differential Equations pdetext.html [Public Domain, and Poincare 1911 Solvay.jpg], via Wikimedia Commons 3 / 29

Introduction to Scientific Computing

Introduction to Scientific Computing Introduction to Scientific Computing Benson Muite benson.muite@ut.ee http://kodu.ut.ee/ benson https://courses.cs.ut.ee/2018/isc/spring 26 March 2018 [Public Domain,https://commons.wikimedia.org/wiki/File1

More information

Introduction to Numerical Methods for Solving Partial Differential Equations

Introduction to Numerical Methods for Solving Partial Differential Equations Introduction to Numerical Methods for Solving Partial Differential Equations Benson Muite benson.muite@ut.ee http://kodu.ut.ee/ benson http://en.wikibooks.org/wiki/parallel_spectral_numerical_methods 25

More information

Ordinary Differential Equations II

Ordinary Differential Equations II Ordinary Differential Equations II CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations II 1 / 29 Almost Done! No

More information

Applied Math for Engineers

Applied Math for Engineers Applied Math for Engineers Ming Zhong Lecture 15 March 28, 2018 Ming Zhong (JHU) AMS Spring 2018 1 / 28 Recap Table of Contents 1 Recap 2 Numerical ODEs: Single Step Methods 3 Multistep Methods 4 Method

More information

Ordinary Differential Equations II

Ordinary Differential Equations II Ordinary Differential Equations II CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations II 1 / 33 Almost Done! Last

More information

Exam in TMA4215 December 7th 2012

Exam in TMA4215 December 7th 2012 Norwegian University of Science and Technology Department of Mathematical Sciences Page of 9 Contact during the exam: Elena Celledoni, tlf. 7359354, cell phone 48238584 Exam in TMA425 December 7th 22 Allowed

More information

ODE Runge-Kutta methods

ODE Runge-Kutta methods ODE Runge-Kutta methods The theory (very short excerpts from lectures) First-order initial value problem We want to approximate the solution Y(x) of a system of first-order ordinary differential equations

More information

Outline Python, Numpy, and Matplotlib Making Models with Polynomials Making Models with Monte Carlo Error, Accuracy and Convergence Floating Point Mod

Outline Python, Numpy, and Matplotlib Making Models with Polynomials Making Models with Monte Carlo Error, Accuracy and Convergence Floating Point Mod Outline Python, Numpy, and Matplotlib Making Models with Polynomials Making Models with Monte Carlo Error, Accuracy and Convergence Floating Point Modeling the World with Arrays The World in a Vector What

More information

Computational Modeling for Physical Sciences

Computational Modeling for Physical Sciences Computational Modeling for Physical Sciences Since the invention of computers the use of computational modeling and simulations have revolutionized the way we study physical systems. Their applications

More information

NUMERICAL SOLUTION OF ODE IVPs. Overview

NUMERICAL SOLUTION OF ODE IVPs. Overview NUMERICAL SOLUTION OF ODE IVPs 1 Quick review of direction fields Overview 2 A reminder about and 3 Important test: Is the ODE initial value problem? 4 Fundamental concepts: Euler s Method 5 Fundamental

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

FDM for parabolic equations

FDM for parabolic equations FDM for parabolic equations Consider the heat equation where Well-posed problem Existence & Uniqueness Mass & Energy decreasing FDM for parabolic equations CNFD Crank-Nicolson + 2 nd order finite difference

More information

You may not use your books, notes; calculators are highly recommended.

You may not use your books, notes; calculators are highly recommended. Math 301 Winter 2013-14 Midterm 1 02/06/2014 Time Limit: 60 Minutes Name (Print): Instructor This exam contains 8 pages (including this cover page) and 6 problems. Check to see if any pages are missing.

More information

Evolution equations with spectral methods: the case of the wave equation

Evolution equations with spectral methods: the case of the wave equation Evolution equations with spectral methods: the case of the wave equation Jerome.Novak@obspm.fr Laboratoire de l Univers et de ses Théories (LUTH) CNRS / Observatoire de Paris, France in collaboration with

More information

Review for Exam 2 Ben Wang and Mark Styczynski

Review for Exam 2 Ben Wang and Mark Styczynski Review for Exam Ben Wang and Mark Styczynski This is a rough approximation of what we went over in the review session. This is actually more detailed in portions than what we went over. Also, please note

More information

AM205: Assignment 3 (due 5 PM, October 20)

AM205: Assignment 3 (due 5 PM, October 20) AM25: Assignment 3 (due 5 PM, October 2) For this assignment, first complete problems 1, 2, 3, and 4, and then complete either problem 5 (on theory) or problem 6 (on an application). If you submit answers

More information

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo 2008-11-07 Graded Project #1 Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo This homework is due to be handed in on Wednesday 12 November 2008 before 13:00 in the post box of the numerical

More information

NUMERICAL METHODS FOR ENGINEERING APPLICATION

NUMERICAL METHODS FOR ENGINEERING APPLICATION NUMERICAL METHODS FOR ENGINEERING APPLICATION Second Edition JOEL H. FERZIGER A Wiley-Interscience Publication JOHN WILEY & SONS, INC. New York / Chichester / Weinheim / Brisbane / Singapore / Toronto

More information

MTH 452/552 Homework 3

MTH 452/552 Homework 3 MTH 452/552 Homework 3 Do either 1 or 2. 1. (40 points) [Use of ode113 and ode45] This problem can be solved by a modifying the m-files odesample.m and odesampletest.m available from the author s webpage.

More information

MATH 345 Differential Equations

MATH 345 Differential Equations MATH 345 Differential Equations Spring 2018 Instructor: Time: Dr. Manuela Girotti; office: Weber 223C email: manuela.girotti@colostate.edu Mon-Tue-Wed-Fri 1:00pm-1:50pm Location: Engineering E 206 Office

More information

Physics 584 Computational Methods

Physics 584 Computational Methods Physics 584 Computational Methods Introduction to Matlab and Numerical Solutions to Ordinary Differential Equations Ryan Ogliore April 18 th, 2016 Lecture Outline Introduction to Matlab Numerical Solutions

More information

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations ECE257 Numerical Methods and Scientific Computing Ordinary Differential Equations Today s s class: Stiffness Multistep Methods Stiff Equations Stiffness occurs in a problem where two or more independent

More information

Fourth Order RK-Method

Fourth Order RK-Method Fourth Order RK-Method The most commonly used method is Runge-Kutta fourth order method. The fourth order RK-method is y i+1 = y i + 1 6 (k 1 + 2k 2 + 2k 3 + k 4 ), Ordinary Differential Equations (ODE)

More information

Consistency and Convergence

Consistency and Convergence Jim Lambers MAT 77 Fall Semester 010-11 Lecture 0 Notes These notes correspond to Sections 1.3, 1.4 and 1.5 in the text. Consistency and Convergence We have learned that the numerical solution obtained

More information

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

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester HIGHER ORDER METHODS School of Mathematics Semester 1 2008 OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE

More information

Differential Equations

Differential Equations Differential Equations Overview of differential equation! Initial value problem! Explicit numeric methods! Implicit numeric methods! Modular implementation Physics-based simulation An algorithm that

More information

Differential Equations

Differential Equations Differential Equations Definitions Finite Differences Taylor Series based Methods: Euler Method Runge-Kutta Methods Improved Euler, Midpoint methods Runge Kutta (2nd, 4th order) methods Predictor-Corrector

More information

NUMERICAL ANALYSIS WEEKLY OVERVIEW

NUMERICAL ANALYSIS WEEKLY OVERVIEW NUMERICAL ANALYSIS WEEKLY OVERVIEW M. AUTH 1. Monday 28 August Students are encouraged to download Anaconda Python. Anaconda is a version of Python that comes with some numerical packages (numpy and matplotlib)

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 5 Chapter 21 Numerical Differentiation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University 1 All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

MA/CS 615 Spring 2019 Homework #2

MA/CS 615 Spring 2019 Homework #2 MA/CS 615 Spring 019 Homework # Due before class starts on Feb 1. Late homework will not be given any credit. Collaboration is OK but not encouraged. Indicate on your report whether you have collaborated

More information

Four Point Gauss Quadrature Runge Kuta Method Of Order 8 For Ordinary Differential Equations

Four Point Gauss Quadrature Runge Kuta Method Of Order 8 For Ordinary Differential Equations International journal of scientific and technical research in engineering (IJSTRE) www.ijstre.com Volume Issue ǁ July 206. Four Point Gauss Quadrature Runge Kuta Method Of Order 8 For Ordinary Differential

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

AP Calculus BC. Course Overview. Course Outline and Pacing Guide

AP Calculus BC. Course Overview. Course Outline and Pacing Guide AP Calculus BC Course Overview AP Calculus BC is designed to follow the topic outline in the AP Calculus Course Description provided by the College Board. The primary objective of this course is to provide

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

Course Information Course Overview Study Skills Background Material. Introduction. CS 205A: Mathematical Methods for Robotics, Vision, and Graphics

Course Information Course Overview Study Skills Background Material. Introduction. CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Introduction CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Doug James CS 205A: Mathematical Methods Introduction 1 / 16 Instructor Prof. Doug James Office: Gates 363 Telephone: (650)

More information

Math 660 Lecture 4: FDM for evolutionary equations: ODE solvers

Math 660 Lecture 4: FDM for evolutionary equations: ODE solvers Math 660 Lecture 4: FDM for evolutionary equations: ODE solvers Consider the ODE u (t) = f(t, u(t)), u(0) = u 0, where u could be a vector valued function. Any ODE can be reduced to a first order system,

More information

Solving scalar IVP s : Runge-Kutta Methods

Solving scalar IVP s : Runge-Kutta Methods Solving scalar IVP s : Runge-Kutta Methods Josh Engwer Texas Tech University March 7, NOTATION: h step size x n xt) t n+ t + h x n+ xt n+ ) xt + h) dx = ft, x) SCALAR IVP ASSUMED THROUGHOUT: dt xt ) =

More information

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

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

More information

Lecture IV: Time Discretization

Lecture IV: Time Discretization Lecture IV: Time Discretization Motivation Kinematics: continuous motion in continuous time Computer simulation: Discrete time steps t Discrete Space (mesh particles) Updating Position Force induces acceleration.

More information

Finite difference methods for the diffusion equation

Finite difference methods for the diffusion equation Finite difference methods for the diffusion equation D150, Tillämpade numeriska metoder II Olof Runborg May 0, 003 These notes summarize a part of the material in Chapter 13 of Iserles. They are based

More information

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20 2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20 REVIEW Lecture 19: Finite Volume Methods Review: Basic elements of a FV scheme and steps to step-up a FV scheme One Dimensional examples d x j x j 1/2

More information

Numerical Algorithms as Dynamical Systems

Numerical Algorithms as Dynamical Systems A Study on Numerical Algorithms as Dynamical Systems Moody Chu North Carolina State University What This Study Is About? To recast many numerical algorithms as special dynamical systems, whence to derive

More information

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK KINGS COLLEGE OF ENGINEERING MA5-NUMERICAL METHODS DEPARTMENT OF MATHEMATICS ACADEMIC YEAR 00-0 / EVEN SEMESTER QUESTION BANK SUBJECT NAME: NUMERICAL METHODS YEAR/SEM: II / IV UNIT - I SOLUTION OF EQUATIONS

More information

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

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

More information

Class Note #14. In this class, we studied an algorithm for integer multiplication, which. 2 ) to θ(n

Class Note #14. In this class, we studied an algorithm for integer multiplication, which. 2 ) to θ(n Class Note #14 Date: 03/01/2006 [Overall Information] In this class, we studied an algorithm for integer multiplication, which improved the running time from θ(n 2 ) to θ(n 1.59 ). We then used some of

More information

Astronomy 8824: Numerical Methods Notes 2 Ordinary Differential Equations

Astronomy 8824: Numerical Methods Notes 2 Ordinary Differential Equations Astronomy 8824: Numerical Methods Notes 2 Ordinary Differential Equations Reading: Numerical Recipes, chapter on Integration of Ordinary Differential Equations (which is ch. 15, 16, or 17 depending on

More information

Modeling and Experimentation: Compound Pendulum

Modeling and Experimentation: Compound Pendulum Modeling and Experimentation: Compound Pendulum Prof. R.G. Longoria Department of Mechanical Engineering The University of Texas at Austin Fall 2014 Overview This lab focuses on developing a mathematical

More information

Mon Jan Improved acceleration models: linear and quadratic drag forces. Announcements: Warm-up Exercise:

Mon Jan Improved acceleration models: linear and quadratic drag forces. Announcements: Warm-up Exercise: Math 2250-004 Week 4 notes We will not necessarily finish the material from a given day's notes on that day. We may also add or subtract some material as the week progresses, but these notes represent

More information

Runge-Kutta Theory and Constraint Programming Julien Alexandre dit Sandretto Alexandre Chapoutot. Department U2IS ENSTA ParisTech SCAN Uppsala

Runge-Kutta Theory and Constraint Programming Julien Alexandre dit Sandretto Alexandre Chapoutot. Department U2IS ENSTA ParisTech SCAN Uppsala Runge-Kutta Theory and Constraint Programming Julien Alexandre dit Sandretto Alexandre Chapoutot Department U2IS ENSTA ParisTech SCAN 2016 - Uppsala Contents Numerical integration Runge-Kutta with interval

More information

Ordinary Differential Equations. Monday, October 10, 11

Ordinary Differential Equations. Monday, October 10, 11 Ordinary Differential Equations Monday, October 10, 11 Problems involving ODEs can always be reduced to a set of first order differential equations. For example, By introducing a new variable z, this can

More information

The family of Runge Kutta methods with two intermediate evaluations is defined by

The family of Runge Kutta methods with two intermediate evaluations is defined by AM 205: lecture 13 Last time: Numerical solution of ordinary differential equations Today: Additional ODE methods, boundary value problems Thursday s lecture will be given by Thomas Fai Assignment 3 will

More information

Mathematics Qualifying Exam Study Material

Mathematics Qualifying Exam Study Material Mathematics Qualifying Exam Study Material The candidate is expected to have a thorough understanding of engineering mathematics topics. These topics are listed below for clarification. Not all instructors

More information

Introduction to PDEs and Numerical Methods Tutorial 1: Overview of essential linear algebra and analysis

Introduction to PDEs and Numerical Methods Tutorial 1: Overview of essential linear algebra and analysis Platzhalter für Bild, Bild auf Titelfolie hinter das Logo einsetzen Introduction to PDEs and Numerical Methods Tutorial 1: Overview of essential linear algebra and analysis Dr. Noemi Friedman, 25.10.201.

More information

(A) Opening Problem Newton s Law of Cooling

(A) Opening Problem Newton s Law of Cooling Lesson 55 Numerical Solutions to Differential Equations Euler's Method IBHL - 1 (A) Opening Problem Newton s Law of Cooling! Newton s Law of Cooling states that the temperature of a body changes at a rate

More information

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

Do not turn over until you are told to do so by the Invigilator. UNIVERSITY OF EAST ANGLIA School of Mathematics Main Series UG Examination 216 17 INTRODUCTION TO NUMERICAL ANALYSIS MTHE612B Time allowed: 3 Hours Attempt QUESTIONS 1 and 2, and THREE other questions.

More information

Ph 22.1 Return of the ODEs: higher-order methods

Ph 22.1 Return of the ODEs: higher-order methods Ph 22.1 Return of the ODEs: higher-order methods -v20130111- Introduction This week we are going to build on the experience that you gathered in the Ph20, and program more advanced (and accurate!) solvers

More information

13 Numerical Solution of ODE s

13 Numerical Solution of ODE s 13 NUMERICAL SOLUTION OF ODE S 28 13 Numerical Solution of ODE s In simulating dynamical systems, we frequently solve ordinary differential equations. These are of the form dx = f(t, x), dt where the function

More information

Butcher tableau Can summarize an s + 1 stage Runge Kutta method using a triangular grid of coefficients

Butcher tableau Can summarize an s + 1 stage Runge Kutta method using a triangular grid of coefficients AM 205: lecture 13 Last time: ODE convergence and stability, Runge Kutta methods Today: the Butcher tableau, multi-step methods, boundary value problems Butcher tableau Can summarize an s + 1 stage Runge

More information

Problem 1: Toolbox (25 pts) For all of the parts of this problem, you are limited to the following sets of tools:

Problem 1: Toolbox (25 pts) For all of the parts of this problem, you are limited to the following sets of tools: CS 322 Final Exam Friday 18 May 2007 150 minutes Problem 1: Toolbox (25 pts) For all of the parts of this problem, you are limited to the following sets of tools: (A) Runge-Kutta 4/5 Method (B) Condition

More information

Mathematics for chemical engineers. Numerical solution of ordinary differential equations

Mathematics for chemical engineers. Numerical solution of ordinary differential equations Mathematics for chemical engineers Drahoslava Janovská Numerical solution of ordinary differential equations Initial value problem Winter Semester 2015-2016 Outline 1 Introduction 2 One step methods Euler

More information

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

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C. Lecture 9 Approximations of Laplace s Equation, Finite Element Method Mathématiques appliquées (MATH54-1) B. Dewals, C. Geuzaine V1.2 23/11/218 1 Learning objectives of this lecture Apply the finite difference

More information

AP Calculus AB. Course Overview. Course Outline and Pacing Guide

AP Calculus AB. Course Overview. Course Outline and Pacing Guide AP Calculus AB Course Overview AP Calculus AB is designed to follow the topic outline in the AP Calculus Course Description provided by the College Board. The primary objective of this course is to provide

More information

Multi-Factor Finite Differences

Multi-Factor Finite Differences February 17, 2017 Aims and outline Finite differences for more than one direction The θ-method, explicit, implicit, Crank-Nicolson Iterative solution of discretised equations Alternating directions implicit

More information

Introduction to standard and non-standard Numerical Methods

Introduction to standard and non-standard Numerical Methods Introduction to standard and non-standard Numerical Methods Dr. Mountaga LAM AMS : African Mathematic School 2018 May 23, 2018 One-step methods Runge-Kutta Methods Nonstandard Finite Difference Scheme

More information

Numerical Modelling in Fortran: day 10. Paul Tackley, 2016

Numerical Modelling in Fortran: day 10. Paul Tackley, 2016 Numerical Modelling in Fortran: day 10 Paul Tackley, 2016 Today s Goals 1. Useful libraries and other software 2. Implicit time stepping 3. Projects: Agree on topic (by final lecture) (No lecture next

More information

Numerical Solution of Differential Equations

Numerical Solution of Differential Equations 1 Numerical Solution of Differential Equations A differential equation (or "DE") contains derivatives or differentials. In a differential equation the unknown is a function, and the differential equation

More information

Modeling & Simulation 2018 Lecture 12. Simulations

Modeling & Simulation 2018 Lecture 12. Simulations Modeling & Simulation 2018 Lecture 12. Simulations Claudio Altafini Automatic Control, ISY Linköping University, Sweden Summary of lecture 7-11 1 / 32 Models of complex systems physical interconnections,

More information

Multistage Methods I: Runge-Kutta Methods

Multistage Methods I: Runge-Kutta Methods Multistage Methods I: Runge-Kutta Methods Varun Shankar January, 0 Introduction Previously, we saw that explicit multistep methods (AB methods) have shrinking stability regions as their orders are increased.

More information

Designing Information Devices and Systems II Fall 2018 Elad Alon and Miki Lustig Homework 9

Designing Information Devices and Systems II Fall 2018 Elad Alon and Miki Lustig Homework 9 EECS 16B Designing Information Devices and Systems II Fall 18 Elad Alon and Miki Lustig Homework 9 This homework is due Wednesday, October 31, 18, at 11:59pm. Self grades are due Monday, November 5, 18,

More information

I. Numerical Computing

I. Numerical Computing I. Numerical Computing A. Lectures 1-3: Foundations of Numerical Computing Lecture 1 Intro to numerical computing Understand difference and pros/cons of analytical versus numerical solutions Lecture 2

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 6 Chapter 20 Initial-Value Problems PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

Euler s Method, cont d

Euler s Method, cont d Jim Lambers MAT 461/561 Spring Semester 009-10 Lecture 3 Notes These notes correspond to Sections 5. and 5.4 in the text. Euler s Method, cont d We conclude our discussion of Euler s method with an example

More information

[POLS 8500] Review of Linear Algebra, Probability and Information Theory

[POLS 8500] Review of Linear Algebra, Probability and Information Theory [POLS 8500] Review of Linear Algebra, Probability and Information Theory Professor Jason Anastasopoulos ljanastas@uga.edu January 12, 2017 For today... Basic linear algebra. Basic probability. Programming

More information

NUMERICAL MATHEMATICS AND COMPUTING

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

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 6 Chapter 20 Initial-Value Problems PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

Dominican International School PRECALCULUS

Dominican International School PRECALCULUS Dominican International School PRECALCULUS GRADE EVEL: 11 1 Year, 1 Credit TEACHER: Yvonne Lee SY: 2017-2018 email: ylee@dishs.tp.edu.tw COURSE DESCRIPTION Pre-Calculus serves as a transition between algebra

More information

Scientific Data Computing: Lecture 3

Scientific Data Computing: Lecture 3 Scientific Data Computing: Lecture 3 Benson Muite benson.muite@ut.ee 23 April 2018 Outline Monday 10-12, Liivi 2-207 Monday 12-14, Liivi 2-205 Topics Introduction, statistical methods and their applications

More information

AMS526: Numerical Analysis I (Numerical Linear Algebra)

AMS526: Numerical Analysis I (Numerical Linear Algebra) AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 1: Course Overview & Matrix-Vector Multiplication Xiangmin Jiao SUNY Stony Brook Xiangmin Jiao Numerical Analysis I 1 / 20 Outline 1 Course

More information

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

Do not turn over until you are told to do so by the Invigilator. UNIVERSITY OF EAST ANGLIA School of Mathematics Main Series UG Examination 216 17 INTRODUCTION TO NUMERICAL ANALYSIS MTHE712B Time allowed: 3 Hours Attempt QUESTIONS 1 and 2, and THREE other questions.

More information

Strong Stability Preserving Properties of Runge Kutta Time Discretization Methods for Linear Constant Coefficient Operators

Strong Stability Preserving Properties of Runge Kutta Time Discretization Methods for Linear Constant Coefficient Operators Journal of Scientific Computing, Vol. 8, No., February 3 ( 3) Strong Stability Preserving Properties of Runge Kutta Time Discretization Methods for Linear Constant Coefficient Operators Sigal Gottlieb

More information

Lecture 4: Numerical solution of ordinary differential equations

Lecture 4: Numerical solution of ordinary differential equations Lecture 4: Numerical solution of ordinary differential equations Department of Mathematics, ETH Zürich General explicit one-step method: Consistency; Stability; Convergence. High-order methods: Taylor

More information

THE UNIVERSITY OF NEW SOUTH WALES SCHOOL OF PHYSICS PHYS2020 COMPUTATIONAL PHYSICS FINAL EXAM SESSION I Answer all questions

THE UNIVERSITY OF NEW SOUTH WALES SCHOOL OF PHYSICS PHYS2020 COMPUTATIONAL PHYSICS FINAL EXAM SESSION I Answer all questions THE UNIVERSITY OF NEW SOUTH WALES SCHOOL OF PHYSICS PHYS2020 COMPUTATIONAL PHYSICS FINAL EXAM SESSION I 2007 Answer all questions Time allowed =2 hours Total number of questions =5 Marks =40 The questions

More information

Ordinary differential equations. Phys 420/580 Lecture 8

Ordinary differential equations. Phys 420/580 Lecture 8 Ordinary differential equations Phys 420/580 Lecture 8 Most physical laws are expressed as differential equations These come in three flavours: initial-value problems boundary-value problems eigenvalue

More information

1 Ordinary differential equations

1 Ordinary differential equations Numerical Analysis Seminar Frühjahrssemester 08 Lecturers: Prof. M. Torrilhon, Prof. D. Kressner The Störmer-Verlet method F. Crivelli (flcrivel@student.ethz.ch May 8, 2008 Introduction During this talk

More information

Parallel Methods for ODEs

Parallel Methods for ODEs Parallel Methods for ODEs Levels of parallelism There are a number of levels of parallelism that are possible within a program to numerically solve ODEs. An obvious place to start is with manual code restructuring

More information

MATH 1242 FINAL EXAM Spring,

MATH 1242 FINAL EXAM Spring, MATH 242 FINAL EXAM Spring, 200 Part I (MULTIPLE CHOICE, NO CALCULATORS).. Find 2 4x3 dx. (a) 28 (b) 5 (c) 0 (d) 36 (e) 7 2. Find 2 cos t dt. (a) 2 sin t + C (b) 2 sin t + C (c) 2 cos t + C (d) 2 cos t

More information

Chap. 20: Initial-Value Problems

Chap. 20: Initial-Value Problems Chap. 20: Initial-Value Problems Ordinary Differential Equations Goal: to solve differential equations of the form: dy dt f t, y The methods in this chapter are all one-step methods and have the general

More information

Integration of Ordinary Differential Equations

Integration of Ordinary Differential Equations Integration of Ordinary Differential Equations Com S 477/577 Nov 7, 00 1 Introduction The solution of differential equations is an important problem that arises in a host of areas. Many differential equations

More information

Semi-implicit Krylov Deferred Correction Methods for Ordinary Differential Equations

Semi-implicit Krylov Deferred Correction Methods for Ordinary Differential Equations Semi-implicit Krylov Deferred Correction Methods for Ordinary Differential Equations Sunyoung Bu University of North Carolina Department of Mathematics CB # 325, Chapel Hill USA agatha@email.unc.edu Jingfang

More information

Numerical Methods. Scientists. Engineers

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

More information

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs Chapter Two: Numerical Methods for Elliptic PDEs Finite Difference Methods for Elliptic PDEs.. Finite difference scheme. We consider a simple example u := subject to Dirichlet boundary conditions ( ) u

More information

Numerical Methods for Initial Value Problems; Harmonic Oscillators

Numerical Methods for Initial Value Problems; Harmonic Oscillators 1 Numerical Methods for Initial Value Problems; Harmonic Oscillators Lab Objective: Implement several basic numerical methods for initial value problems (IVPs), and use them to study harmonic oscillators.

More information

Intelligent Systems:

Intelligent Systems: Intelligent Systems: Undirected Graphical models (Factor Graphs) (2 lectures) Carsten Rother 15/01/2015 Intelligent Systems: Probabilistic Inference in DGM and UGM Roadmap for next two lectures Definition

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University The Implicit Schemes for the Model Problem The Crank-Nicolson scheme and θ-scheme

More information

University of Texas-Austin - Integration of Computing

University of Texas-Austin - Integration of Computing University of Texas-Austin - Integration of Computing During 2001-2002 the Department of Chemical Engineering at UT-Austin revamped the computing thread in its curriculum in order to strengthen student

More information

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations Finite Differences for Differential Equations 28 PART II Finite Difference Methods for Differential Equations Finite Differences for Differential Equations 29 BOUNDARY VALUE PROBLEMS (I) Solving a TWO

More information

Research Computing with Python, Lecture 7, Numerical Integration and Solving Ordinary Differential Equations

Research Computing with Python, Lecture 7, Numerical Integration and Solving Ordinary Differential Equations Research Computing with Python, Lecture 7, Numerical Integration and Solving Ordinary Differential Equations Ramses van Zon SciNet HPC Consortium November 25, 2014 Ramses van Zon (SciNet HPC Consortium)Research

More information

Lecture 17: Ordinary Differential Equation II. First Order (continued)

Lecture 17: Ordinary Differential Equation II. First Order (continued) Lecture 17: Ordinary Differential Equation II. First Order (continued) 1. Key points Maple commands dsolve dsolve[interactive] dsolve(numeric) 2. Linear first order ODE: y' = q(x) - p(x) y In general,

More information

Numerical Methods for Initial Value Problems; Harmonic Oscillators

Numerical Methods for Initial Value Problems; Harmonic Oscillators Lab 1 Numerical Methods for Initial Value Problems; Harmonic Oscillators Lab Objective: Implement several basic numerical methods for initial value problems (IVPs), and use them to study harmonic oscillators.

More information

Identification Methods for Structural Systems. Prof. Dr. Eleni Chatzi Lecture March, 2016

Identification Methods for Structural Systems. Prof. Dr. Eleni Chatzi Lecture March, 2016 Prof. Dr. Eleni Chatzi Lecture 4-09. March, 2016 Fundamentals Overview Multiple DOF Systems State-space Formulation Eigenvalue Analysis The Mode Superposition Method The effect of Damping on Structural

More information