Mathematics 22: Lecture 11

Size: px
Start display at page:

Download "Mathematics 22: Lecture 11"

Transcription

1 Mathematics 22: Lecture 11 Runge-Kutta Dan Sloughter Furman University January 25, 2008 Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

2 Order of approximations One may show that the error in Euler s method is bounded by the step-size h times a constant. We call Euler s method a first-order method. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

3 Order of approximations One may show that the error in Euler s method is bounded by the step-size h times a constant. We call Euler s method a first-order method. The modified Euler method is a second-order method: the error is bounded by a constant times h 2. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

4 Runge-Kutta method Consider the initial-value problem du dt = f (t, u), u(t 0) = u 0. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

5 Runge-Kutta method Consider the initial-value problem du dt = f (t, u), u(t 0) = u 0. Divide [t 0, t 0 + T ] into N equal intervals of length h = T N. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

6 Runge-Kutta method Consider the initial-value problem du dt = f (t, u), u(t 0) = u 0. Divide [t 0, t 0 + T ] into N equal intervals of length h = T N. Let t i = t 0 + ih, i = 0, 1, 2,..., N. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

7 Runge-Kutta method Consider the initial-value problem du dt = f (t, u), u(t 0) = u 0. Divide [t 0, t 0 + T ] into N equal intervals of length h = T N. Let t i = t 0 + ih, i = 0, 1, 2,..., N. Having computed u 0, u 1,..., u i, let k 1 = f (t i, u i ) ( k 2 = f t i + h 2, u i + h ) 2 k 1 ( k 3 = f t i + h 2, u i + h ) 2 k 2 k 4 = f (t i + h, u i + hk 3 ). Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

8 Runge-Kutta (cont d) Let u i+1 = u i + h 6 (k 1 + 2k 2 + 2k 3 + k 4 ). Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

9 Runge-Kutta (cont d) Let u i+1 = u i + h 6 (k 1 + 2k 2 + 2k 3 + k 4 ). Runge-Kutta is a fourth-order method. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

10 Example Consider the initial-value problem on the interval [0, 6]. du dt = u cos(t), u(0) = 1. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

11 Example Consider the initial-value problem on the interval [0, 6]. Let h = 0.1 as before. du dt = u cos(t), u(0) = 1. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

12 Example Consider the initial-value problem on the interval [0, 6]. Let h = 0.1 as before. du dt For the first step, we have k 1 = (1.0) cos(0) = 1.0 = u cos(t), u(0) = 1. k 2 = (1.0 + (0.05)(1.0)) cos(0.05) = k 3 = (1.0 + (0.05)( )) cos(0.05) = k 4 = (1.0 + (0.1)( )) cos(0.1) = Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

13 Example (cont d) And so u 1 = (1.0 + (2)( ) + (2)( ) ) 6 = Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

14 Example (cont d) And so u 1 = (1.0 + (2)( ) + (2)( ) ) 6 = Note: the exact value is u(0.1) = e sin(0.1) = Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

15 Example (cont d) And so u 1 = (1.0 + (2)( ) + (2)( ) ) 6 = Note: the exact value is u(0.1) = e sin(0.1) = Recall: with Euler s method we had u 1 = 1.1 and with the modified Euler method we had u 1 = Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

16 Using Octave Runge-Kutta in Octave: octave:1> function w = f(t,u) > w = u*cos(t); > endfunction octave:2> t = [0:0.1:6]; octave:3> u(1) = 1.0; octave:4> for i = 1:60 > k1 = f(t(i),u(i)); > k2 = f(t(i)+0.05,u(i)+0.05*k1); > k3 = f(t(i)+0.05,u(i)+0.05*k2); > k4 = f(t(i)+0.1,u(i)+0.1*k3); > u(i+1) = u(i) + (0.1/6)*(k1 + 2*k2 + 2*k3 + k4); > endfor Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

17 Using Octave Runge-Kutta in Octave: octave:1> function w = f(t,u) > w = u*cos(t); > endfunction octave:2> t = [0:0.1:6]; octave:3> u(1) = 1.0; octave:4> for i = 1:60 > k1 = f(t(i),u(i)); > k2 = f(t(i)+0.05,u(i)+0.05*k1); > k3 = f(t(i)+0.05,u(i)+0.05*k2); > k4 = f(t(i)+0.1,u(i)+0.1*k3); > u(i+1) = u(i) + (0.1/6)*(k1 + 2*k2 + 2*k3 + k4); > endfor Note: u(6) u 60 = , which is exact to 5 decimal places. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

18 Using Octave (cont d) Comparison of exact (green) and approximate (red) solutions: Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

19 Octave: lsode The following commands use the built-in Octave function lsode to solve our equation: octave:1> function w = f(u, t) > w = u*cos(t); > endfunction octave:2> t = [0:0.1:6]; octave:3> u = lsode("f",1.0,t); Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

20 Octave: lsode The following commands use the built-in Octave function lsode to solve our equation: octave:1> function w = f(u, t) > w = u*cos(t); > endfunction octave:2> t = [0:0.1:6]; octave:3> u = lsode("f",1.0,t); Note: u and t are reversed in the definition of f from our notation. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

21 lsode (cont d) The method used by Octave is an adaptive step-size method. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

22 lsode (cont d) The method used by Octave is an adaptive step-size method. That is, the actual step-size (value of h) used varies as the integration proceeds based on the behavior of the function. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

23 lsode (cont d) The method used by Octave is an adaptive step-size method. That is, the actual step-size (value of h) used varies as the integration proceeds based on the behavior of the function. In particular, the values in the t vector do not determine the step size, but are there only for evaluation and plotting purposes. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

24 lsode (cont d) The method used by Octave is an adaptive step-size method. That is, the actual step-size (value of h) used varies as the integration proceeds based on the behavior of the function. In particular, the values in the t vector do not determine the step size, but are there only for evaluation and plotting purposes. In particular, if one only wanted to know u(6), t could be specified by t = [0:6:6], in which case u(2) is the approximation to u(6). Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

25 lsode (cont d) The method used by Octave is an adaptive step-size method. That is, the actual step-size (value of h) used varies as the integration proceeds based on the behavior of the function. In particular, the values in the t vector do not determine the step size, but are there only for evaluation and plotting purposes. In particular, if one only wanted to know u(6), t could be specified by t = [0:6:6], in which case u(2) is the approximation to u(6). Or, we could just use u = lsode("f",1.0,[0 6]); to perform the evaluation. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

26 Runge-Kutta in Maxima To approximate a solution in Maxima using Runge-Kutta: Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

27 Runge-Kutta in Maxima To approximate a solution in Maxima using Runge-Kutta: load("dynamics") Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

28 Runge-Kutta in Maxima To approximate a solution in Maxima using Runge-Kutta: load("dynamics") u:rk(u*cos(t),u,1.0,[t,0,6,0.1])$ Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

29 Runge-Kutta in Maxima To approximate a solution in Maxima using Runge-Kutta: load("dynamics") u:rk(u*cos(t),u,1.0,[t,0,6,0.1])$ The resulting ordered pairs are in the variable u. Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

30 Runge-Kutta in Maxima To approximate a solution in Maxima using Runge-Kutta: load("dynamics") u:rk(u*cos(t),u,1.0,[t,0,6,0.1])$ The resulting ordered pairs are in the variable u. To plot the result: wxplot2d([discrete,u]) Note: In the lab use, plot2d([discrete,u]) Dan Sloughter (Furman University) Mathematics 22: Lecture 11 January 25, / 11

Mathematics 22: Lecture 10

Mathematics 22: Lecture 10 Mathematics 22: Lecture 10 Euler s Method Dan Sloughter Furman University January 22, 2008 Dan Sloughter (Furman University) Mathematics 22: Lecture 10 January 22, 2008 1 / 14 Euler s method Consider the

More information

Mathematics 22: Lecture 7

Mathematics 22: Lecture 7 Mathematics 22: Lecture 7 Separation of Variables Dan Sloughter Furman University January 15, 2008 Dan Sloughter (Furman University) Mathematics 22: Lecture 7 January 15, 2008 1 / 8 Separable equations

More information

Mathematics 22: Lecture 5

Mathematics 22: Lecture 5 Mathematics 22: Lecture 5 Autonomous Equations Dan Sloughter Furman University January 11, 2008 Dan Sloughter (Furman University) Mathematics 22: Lecture 5 January 11, 2008 1 / 11 Solving the logistics

More information

Mathematics 13: Lecture 4

Mathematics 13: Lecture 4 Mathematics 13: Lecture Planes Dan Sloughter Furman University January 10, 2008 Dan Sloughter (Furman University) Mathematics 13: Lecture January 10, 2008 1 / 10 Planes in R n Suppose v and w are nonzero

More information

Mathematics 22: Lecture 19

Mathematics 22: Lecture 19 Mathematics 22: Lecture 19 Legendre s Equation Dan Sloughter Furman University February 5, 2008 Dan Sloughter (Furman University) Mathematics 22: Lecture 19 February 5, 2008 1 / 11 Example: Legendre s

More information

Mathematics 22: Lecture 4

Mathematics 22: Lecture 4 Mathematics 22: Lecture 4 Population Models Dan Sloughter Furman University January 10, 2008 Dan Sloughter (Furman University) Mathematics 22: Lecture 4 January 10, 2008 1 / 6 Malthusian growth model Let

More information

Mathematics 13: Lecture 10

Mathematics 13: Lecture 10 Mathematics 13: Lecture 10 Matrices Dan Sloughter Furman University January 25, 2008 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 1 / 19 Matrices Recall: A matrix is a

More information

Mathematics 22: Lecture 12

Mathematics 22: Lecture 12 Mathematics 22: Lecture 12 Second-order Linear Equations Dan Sloughter Furman University January 28, 2008 Dan Sloughter (Furman University) Mathematics 22: Lecture 12 January 28, 2008 1 / 14 Definition

More information

Change of Variables: Indefinite Integrals

Change of Variables: Indefinite Integrals Change of Variables: Indefinite Integrals Mathematics 11: Lecture 39 Dan Sloughter Furman University November 29, 2007 Dan Sloughter (Furman University) Change of Variables: Indefinite Integrals November

More information

Antiderivatives. Mathematics 11: Lecture 30. Dan Sloughter. Furman University. November 7, 2007

Antiderivatives. Mathematics 11: Lecture 30. Dan Sloughter. Furman University. November 7, 2007 Antiderivatives Mathematics 11: Lecture 30 Dan Sloughter Furman University November 7, 2007 Dan Sloughter (Furman University) Antiderivatives November 7, 2007 1 / 9 Definition Recall: Suppose F and f are

More information

Some Trigonometric Limits

Some Trigonometric Limits Some Trigonometric Limits Mathematics 11: Lecture 7 Dan Sloughter Furman University September 20, 2007 Dan Sloughter (Furman University) Some Trigonometric Limits September 20, 2007 1 / 14 The squeeze

More information

Pivotal Quantities. Mathematics 47: Lecture 16. Dan Sloughter. Furman University. March 30, 2006

Pivotal Quantities. Mathematics 47: Lecture 16. Dan Sloughter. Furman University. March 30, 2006 Pivotal Quantities Mathematics 47: Lecture 16 Dan Sloughter Furman University March 30, 2006 Dan Sloughter (Furman University) Pivotal Quantities March 30, 2006 1 / 10 Pivotal quantities Definition Suppose

More information

The Chain Rule. Mathematics 11: Lecture 18. Dan Sloughter. Furman University. October 10, 2007

The Chain Rule. Mathematics 11: Lecture 18. Dan Sloughter. Furman University. October 10, 2007 The Chain Rule Mathematics 11: Lecture 18 Dan Sloughter Furman University October 10, 2007 Dan Sloughter (Furman University) The Chain Rule October 10, 2007 1 / 15 Example Suppose that a pebble is dropped

More information

Sampling Distributions

Sampling Distributions Sampling Distributions Mathematics 47: Lecture 9 Dan Sloughter Furman University March 16, 2006 Dan Sloughter (Furman University) Sampling Distributions March 16, 2006 1 / 10 Definition We call the probability

More information

Nonparametric Tests. Mathematics 47: Lecture 25. Dan Sloughter. Furman University. April 20, 2006

Nonparametric Tests. Mathematics 47: Lecture 25. Dan Sloughter. Furman University. April 20, 2006 Nonparametric Tests Mathematics 47: Lecture 25 Dan Sloughter Furman University April 20, 2006 Dan Sloughter (Furman University) Nonparametric Tests April 20, 2006 1 / 14 The sign test Suppose X 1, X 2,...,

More information

Calculus: Area. Mathematics 15: Lecture 22. Dan Sloughter. Furman University. November 12, 2006

Calculus: Area. Mathematics 15: Lecture 22. Dan Sloughter. Furman University. November 12, 2006 Calculus: Area Mathematics 15: Lecture 22 Dan Sloughter Furman University November 12, 2006 Dan Sloughter (Furman University) Calculus: Area November 12, 2006 1 / 7 Area Note: formulas for the areas of

More information

CHAPTER 80 NUMERICAL METHODS FOR FIRST-ORDER DIFFERENTIAL EQUATIONS

CHAPTER 80 NUMERICAL METHODS FOR FIRST-ORDER DIFFERENTIAL EQUATIONS CHAPTER 8 NUMERICAL METHODS FOR FIRST-ORDER DIFFERENTIAL EQUATIONS EXERCISE 33 Page 834. Use Euler s method to obtain a numerical solution of the differential equation d d 3, with the initial conditions

More information

Solving Ordinary Differential Equations

Solving Ordinary Differential Equations Solving Ordinary Differential Equations Sanzheng Qiao Department of Computing and Software McMaster University March, 2014 Outline 1 Initial Value Problem Euler s Method Runge-Kutta Methods Multistep Methods

More information

Solution: (a) Before opening the parachute, the differential equation is given by: dv dt. = v. v(0) = 0

Solution: (a) Before opening the parachute, the differential equation is given by: dv dt. = v. v(0) = 0 Math 2250 Lab 4 Name/Unid: 1. (25 points) A man bails out of an airplane at the altitute of 12,000 ft, falls freely for 20 s, then opens his parachute. Assuming linear air resistance ρv ft/s 2, taking

More information

Example. Mathematics 255: Lecture 17. Example. Example (cont d) Consider the equation. d 2 y dt 2 + dy

Example. Mathematics 255: Lecture 17. Example. Example (cont d) Consider the equation. d 2 y dt 2 + dy Mathematics 255: Lecture 17 Undetermined Coefficients Dan Sloughter Furman University October 10, 2008 6y = 5e 4t. so the general solution of 0 = r 2 + r 6 = (r + 3)(r 2), 6y = 0 y(t) = c 1 e 3t + c 2

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

Vector Fields and Solutions to Ordinary Differential Equations using Octave

Vector Fields and Solutions to Ordinary Differential Equations using Octave Vector Fields and Solutions to Ordinary Differential Equations using Andreas Stahel 6th December 29 Contents Vector fields. Vector field for the logistic equation...............................2 Solutions

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

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

Goodness of Fit Tests: Homogeneity

Goodness of Fit Tests: Homogeneity Goodness of Fit Tests: Homogeneity Mathematics 47: Lecture 35 Dan Sloughter Furman University May 11, 2006 Dan Sloughter (Furman University) Goodness of Fit Tests: Homogeneity May 11, 2006 1 / 13 Testing

More information

What we ll do: Lecture 21. Ordinary Differential Equations (ODEs) Differential Equations. Ordinary Differential Equations

What we ll do: Lecture 21. Ordinary Differential Equations (ODEs) Differential Equations. Ordinary Differential Equations What we ll do: Lecture Ordinary Differential Equations J. Chaudhry Department of Mathematics and Statistics University of New Mexico Review ODEs Single Step Methods Euler s method (st order accurate) Runge-Kutta

More information

Simple ODE Solvers - Derivation

Simple ODE Solvers - Derivation Simple ODE Solvers - Derivation These notes provide derivations of some simple algorithms for generating, numerically, approximate solutions to the initial value problem y (t =f ( t, y(t y(t 0 =y 0 Here

More information

Lesson 4: Population, Taylor and Runge-Kutta Methods

Lesson 4: Population, Taylor and Runge-Kutta Methods Lesson 4: Population, Taylor and Runge-Kutta Methods 4.1 Applied Problem. Consider a single fish population whose size is given by x(t). The change in the size of the fish population over a given time

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

The Geometry. Mathematics 15: Lecture 20. Dan Sloughter. Furman University. November 6, 2006

The Geometry. Mathematics 15: Lecture 20. Dan Sloughter. Furman University. November 6, 2006 The Geometry Mathematics 15: Lecture 20 Dan Sloughter Furman University November 6, 2006 Dan Sloughter (Furman University) The Geometry November 6, 2006 1 / 18 René Descartes 1596-1650 Dan Sloughter (Furman

More information

Solution: (a) Before opening the parachute, the differential equation is given by: dv dt. = v. v(0) = 0

Solution: (a) Before opening the parachute, the differential equation is given by: dv dt. = v. v(0) = 0 Math 2250 Lab 4 Name/Unid: 1. (35 points) Leslie Leroy Irvin bails out of an airplane at the altitude of 16,000 ft, falls freely for 20 s, then opens his parachute. Assuming linear air resistance ρv ft/s

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

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

Finite Difference and Finite Element Methods

Finite Difference and Finite Element Methods Finite Difference and Finite Element Methods Georgy Gimel farb COMPSCI 369 Computational Science 1 / 39 1 Finite Differences Difference Equations 3 Finite Difference Methods: Euler FDMs 4 Finite Element

More information

Logistic Map, Euler & Runge-Kutta Method and Lotka-Volterra Equations

Logistic Map, Euler & Runge-Kutta Method and Lotka-Volterra Equations Logistic Map, Euler & Runge-Kutta Method and Lotka-Volterra Equations S. Y. Ha and J. Park Department of Mathematical Sciences Seoul National University Sep 23, 2013 Contents 1 Logistic Map 2 Euler and

More information

multistep methods Last modified: November 28, 2017 Recall that we are interested in the numerical solution of the initial value problem (IVP):

multistep methods Last modified: November 28, 2017 Recall that we are interested in the numerical solution of the initial value problem (IVP): MATH 351 Fall 217 multistep methods http://www.phys.uconn.edu/ rozman/courses/m351_17f/ Last modified: November 28, 217 Recall that we are interested in the numerical solution of the initial value problem

More information

Section 5.8. Taylor Series

Section 5.8. Taylor Series Difference Equations to Differential Equations Section 5.8 Taylor Series In this section we will put together much of the work of Sections 5.-5.7 in the context of a discussion of Taylor series. We begin

More information

Problem 1 In each of the following problems find the general solution of the given differential

Problem 1 In each of the following problems find the general solution of the given differential VI Problem 1 dt + 2dy 3y = 0; dt 9dy + 9y = 0. Problem 2 dt + dy 2y = 0, y(0) = 1, y (0) = 1; dt 2 y = 0, y( 2) = 1, y ( 2) = Problem 3 Find the solution of the initial value problem 2 d2 y dt 2 3dy dt

More information

Math 128A Spring 2003 Week 12 Solutions

Math 128A Spring 2003 Week 12 Solutions Math 128A Spring 2003 Week 12 Solutions Burden & Faires 5.9: 1b, 2b, 3, 5, 6, 7 Burden & Faires 5.10: 4, 5, 8 Burden & Faires 5.11: 1c, 2, 5, 6, 8 Burden & Faires 5.9. Higher-Order Equations and Systems

More information

Chapter 3. Finite Difference Methods for Hyperbolic Equations Introduction Linear convection 1-D wave equation

Chapter 3. Finite Difference Methods for Hyperbolic Equations Introduction Linear convection 1-D wave equation Chapter 3. Finite Difference Methods for Hyperbolic Equations 3.1. Introduction Most hyperbolic problems involve the transport of fluid properties. In the equations of motion, the term describing the transport

More information

Math 216 Final Exam 14 December, 2012

Math 216 Final Exam 14 December, 2012 Math 216 Final Exam 14 December, 2012 This sample exam is provided to serve as one component of your studying for this exam in this course. Please note that it is not guaranteed to cover the material that

More information

ENGI9496 Lecture Notes State-Space Equation Generation

ENGI9496 Lecture Notes State-Space Equation Generation ENGI9496 Lecture Notes State-Space Equation Generation. State Equations and Variables - Definitions The end goal of model formulation is to simulate a system s behaviour on a computer. A set of coherent

More information

Chapter 9b: Numerical Methods for Calculus and Differential Equations. Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers

Chapter 9b: Numerical Methods for Calculus and Differential Equations. Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers Chapter 9b: Numerical Methods for Calculus and Differential Equations Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers Acceleration Initial-Value Problems Consider a skydiver

More information

1 Systems of First Order IVP

1 Systems of First Order IVP cs412: introduction to numerical analysis 12/09/10 Lecture 24: Systems of First Order Differential Equations Instructor: Professor Amos Ron Scribes: Yunpeng Li, Mark Cowlishaw, Nathanael Fillmore 1 Systems

More information

Math 308 Week 8 Solutions

Math 308 Week 8 Solutions Math 38 Week 8 Solutions There is a solution manual to Chapter 4 online: www.pearsoncustom.com/tamu math/. This online solutions manual contains solutions to some of the suggested problems. Here are solutions

More information

Lecture Notes on Numerical Differential Equations: IVP

Lecture Notes on Numerical Differential Equations: IVP Lecture Notes on Numerical Differential Equations: IVP Professor Biswa Nath Datta Department of Mathematical Sciences Northern Illinois University DeKalb, IL. 60115 USA E mail: dattab@math.niu.edu URL:

More information

10 Numerical Solutions of PDEs

10 Numerical Solutions of PDEs 10 Numerical Solutions of PDEs There s no sense in being precise when you don t even know what you re talking about.- John von Neumann (1903-1957) Most of the book has dealt with finding exact solutions

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

Initial value problems for ordinary differential equations

Initial value problems for ordinary differential equations Initial value problems for ordinary differential equations Xiaojing Ye, Math & Stat, Georgia State University Spring 2019 Numerical Analysis II Xiaojing Ye, Math & Stat, Georgia State University 1 IVP

More information

Numerical method for approximating the solution of an IVP. Euler Algorithm (the simplest approximation method)

Numerical method for approximating the solution of an IVP. Euler Algorithm (the simplest approximation method) Section 2.7 Euler s Method (Computer Approximation) Key Terms/ Ideas: Numerical method for approximating the solution of an IVP Linear Approximation; Tangent Line Euler Algorithm (the simplest approximation

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

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

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

2015 Holl ISU MSM Ames, Iowa. A Few Good ODEs: An Introduction to Modeling and Computation

2015 Holl ISU MSM Ames, Iowa. A Few Good ODEs: An Introduction to Modeling and Computation 2015 Holl Mini-Conference @ ISU MSM Ames, Iowa A Few Good ODEs: An Introduction to Modeling and Computation James A. Rossmanith Department of Mathematics Iowa State University June 20 th, 2015 J.A. Rossmanith

More information

Numerical Methods for the Solution of Differential Equations

Numerical Methods for the Solution of Differential Equations Numerical Methods for the Solution of Differential Equations Markus Grasmair Vienna, winter term 2011 2012 Analytical Solutions of Ordinary Differential Equations 1. Find the general solution of the differential

More information

5.3 SOLVING TRIGONOMETRIC EQUATIONS

5.3 SOLVING TRIGONOMETRIC EQUATIONS 5.3 SOLVING TRIGONOMETRIC EQUATIONS Copyright Cengage Learning. All rights reserved. What You Should Learn Use standard algebraic techniques to solve trigonometric equations. Solve trigonometric equations

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

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

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

More information

Variable Step Size Differential Equation Solvers

Variable Step Size Differential Equation Solvers Math55: Differential Equations 1/30 Variable Step Size Differential Equation Solvers Jason Brewer and George Little Introduction The purpose of developing numerical methods is to approximate the solution

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

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science EAD 115 Numerical Solution of Engineering and Scientific Problems David M. Rocke Department of Applied Science Transient Response of a Chemical Reactor Concentration of a substance in a chemical reactor

More information

A Brief Introduction to Numerical Methods for Differential Equations

A Brief Introduction to Numerical Methods for Differential Equations A Brief Introduction to Numerical Methods for Differential Equations January 10, 2011 This tutorial introduces some basic numerical computation techniques that are useful for the simulation and analysis

More information

Solving systems of ODEs with Matlab

Solving systems of ODEs with Matlab Solving systems of ODEs with Matlab James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University October 20, 2013 Outline 1 Systems of ODEs 2 Setting Up

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

A review of stability and dynamical behaviors of differential equations:

A review of stability and dynamical behaviors of differential equations: A review of stability and dynamical behaviors of differential equations: scalar ODE: u t = f(u), system of ODEs: u t = f(u, v), v t = g(u, v), reaction-diffusion equation: u t = D u + f(u), x Ω, with boundary

More information

Math 361: Homework 1 Solutions

Math 361: Homework 1 Solutions January 3, 4 Math 36: Homework Solutions. We say that two norms and on a vector space V are equivalent or comparable if the topology they define on V are the same, i.e., for any sequence of vectors {x

More information

Applied Calculus I. Lecture 29

Applied Calculus I. Lecture 29 Applied Calculus I Lecture 29 Integrals of trigonometric functions We shall continue learning substitutions by considering integrals involving trigonometric functions. Integrals of trigonometric functions

More information

First In-Class Exam Solutions Math 246, Professor David Levermore Thursday, 20 September 2018

First In-Class Exam Solutions Math 246, Professor David Levermore Thursday, 20 September 2018 First In-Class Exam Solutions Math 246, Professor David Levermore Thursday, 20 September 208 () [6] In the absence of predators the population of mosquitoes in a certain area would increase at a rate proportional

More information

Initial Value Problems for. Ordinary Differential Equations

Initial Value Problems for. Ordinary Differential Equations Initial Value Problems for Ordinar Differential Equations INTRODUCTION Equations which are composed of an unnown function and its derivatives are called differential equations. It becomes an initial value

More information

ODE Background: Differential (1A) Young Won Lim 12/29/15

ODE Background: Differential (1A) Young Won Lim 12/29/15 ODE Background: Differential (1A Copyright (c 2011-2015 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version

More information

Physics 115/242 Comparison of methods for integrating the simple harmonic oscillator.

Physics 115/242 Comparison of methods for integrating the simple harmonic oscillator. Physics 115/4 Comparison of methods for integrating the simple harmonic oscillator. Peter Young I. THE SIMPLE HARMONIC OSCILLATOR The energy (sometimes called the Hamiltonian ) of the simple harmonic oscillator

More information

Section 7.4 Runge-Kutta Methods

Section 7.4 Runge-Kutta Methods Section 7.4 Runge-Kutta Methods Key terms: Taylor methods Taylor series Runge-Kutta; methods linear combinations of function values at intermediate points Alternatives to second order Taylor methods Fourth

More information

Jim Lambers MAT 772 Fall Semester Lecture 21 Notes

Jim Lambers MAT 772 Fall Semester Lecture 21 Notes Jim Lambers MAT 772 Fall Semester 21-11 Lecture 21 Notes These notes correspond to Sections 12.6, 12.7 and 12.8 in the text. Multistep Methods All of the numerical methods that we have developed for solving

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

ζ (s) = s 1 s {u} [u] ζ (s) = s 0 u 1+sdu, {u} Note how the integral runs from 0 and not 1.

ζ (s) = s 1 s {u} [u] ζ (s) = s 0 u 1+sdu, {u} Note how the integral runs from 0 and not 1. Problem Sheet 3. From Theorem 3. we have ζ (s) = + s s {u} u+sdu, (45) valid for Res > 0. i) Deduce that for Res >. [u] ζ (s) = s u +sdu ote the integral contains [u] in place of {u}. ii) Deduce that for

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

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

The Simple Double Pendulum

The Simple Double Pendulum The Simple Double Pendulum Austin Graf December 13, 2013 Abstract The double pendulum is a dynamic system that exhibits sensitive dependence upon initial conditions. This project explores the motion of

More information

Wed Jan Improved Euler and Runge Kutta. Announcements: Warm-up Exercise:

Wed Jan Improved Euler and Runge Kutta. Announcements: Warm-up Exercise: Wed Jan 31 2.5-2.6 Improved Euler and Runge Kutta. Announcements: Warm-up Eercise: 2.5-2.6 Improved Euler and Runge Kutta In more complicated differential equations it is a very serious issue to find relatively

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

Name Class. 5. Find the particular solution to given the general solution y C cos x and the. x 2 y

Name Class. 5. Find the particular solution to given the general solution y C cos x and the. x 2 y 10 Differential Equations Test Form A 1. Find the general solution to the first order differential equation: y 1 yy 0. 1 (a) (b) ln y 1 y ln y 1 C y y C y 1 C y 1 y C. Find the general solution to the

More information

Vector Fields and Solutions to Ordinary Differential Equations using MATLAB/Octave

Vector Fields and Solutions to Ordinary Differential Equations using MATLAB/Octave Vector Fields and Solutions to Ordinary Differential Equations using MATLAB/Octave Andreas Stahel 5th December 27 Contents Vector field for the logistic equation 2 Solutions of ordinary differential equations

More information

Module 6: Implicit Runge-Kutta Methods Lecture 17: Derivation of Implicit Runge-Kutta Methods(Contd.) The Lecture Contains:

Module 6: Implicit Runge-Kutta Methods Lecture 17: Derivation of Implicit Runge-Kutta Methods(Contd.) The Lecture Contains: The Lecture Contains: We continue with the details about the derivation of the two stage implicit Runge- Kutta methods. A brief description of semi-explicit Runge-Kutta methods is also given. Finally,

More information

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 2. Predictor-Corrector Methods

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 2. Predictor-Corrector Methods Numerical Analysis by Dr. Anita Pal Assistant Professor Department of Matematics National Institute of Tecnology Durgapur Durgapur-7109 email: anita.buie@gmail.com 1 . Capter 8 Numerical Solution of Ordinary

More information

4.4 Computing π, ln 2 and e

4.4 Computing π, ln 2 and e 252 4.4 Computing π, ln 2 and e The approximations π 3.1415927, ln 2 0.69314718, e 2.7182818 can be obtained by numerical methods applied to the following initial value problems: (1) y = 4, 1 + x2 y(0)

More information

CS 205b / CME 306. Application Track. Homework 2

CS 205b / CME 306. Application Track. Homework 2 CS 205b / CME 306 Application Track Homework 2 1. ALE An Eulerian formulation of conservation of mass uses control volumes that are fixed in space as material flows freely through the control volumes.

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

UNIVERSITY OF HOUSTON HIGH SCHOOL MATHEMATICS CONTEST Spring 2018 Calculus Test

UNIVERSITY OF HOUSTON HIGH SCHOOL MATHEMATICS CONTEST Spring 2018 Calculus Test UNIVERSITY OF HOUSTON HIGH SCHOOL MATHEMATICS CONTEST Spring 2018 Calculus Test NAME: SCHOOL: 1. Let f be some function for which you know only that if 0 < x < 1, then f(x) 5 < 0.1. Which of the following

More information

Numerical Methods for Partial Differential Equations. CAAM 452 Spring 2005 Lecture 2 Instructor: Tim Warburton

Numerical Methods for Partial Differential Equations. CAAM 452 Spring 2005 Lecture 2 Instructor: Tim Warburton Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 2 Instructor: Tim Warburton Note on textbook for finite difference methods Due to the difficulty some students have experienced

More information

8.8 Applications of Taylor Polynomials

8.8 Applications of Taylor Polynomials 8.8 Applications of Taylor Polynomials Mark Woodard Furman U Spring 2008 Mark Woodard (Furman U) 8.8 Applications of Taylor Polynomials Spring 2008 1 / 14 Outline 1 Point estimation 2 Estimation on an

More information

Chapter 3 Convolution Representation

Chapter 3 Convolution Representation Chapter 3 Convolution Representation DT Unit-Impulse Response Consider the DT SISO system: xn [ ] System yn [ ] xn [ ] = δ[ n] If the input signal is and the system has no energy at n = 0, the output yn

More information

3.5: Euler s Method (cont d) and 3.7: Population Modeling

3.5: Euler s Method (cont d) and 3.7: Population Modeling 3.5: Euler s Method (cont d) and 3.7: Population Modeling Mathematics 3 Lecture 19 Dartmouth College February 15, 2010 Typeset by FoilTEX Example 1 Let s consider a very simple first-order IVP: dy dx =

More information

Problem Sheet 0: Numerical integration and Euler s method. If you find any typos/errors in this problem sheet please

Problem Sheet 0: Numerical integration and Euler s method. If you find any typos/errors in this problem sheet please Problem Sheet 0: Numerical integration and Euler s method If you find any typos/errors in this problem sheet please email jk08@ic.ac.uk. The material in this problem sheet is not examinable. It is merely

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

Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS

Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS The general form of a first order differential equations is = f(x, y) with initial condition y(a) = y a We seek the solution y = y(x) for x > a This is shown

More information

Honors Differential Equations

Honors Differential Equations MIT OpenCourseWare http://ocw.mit.edu 18.034 Honors Differential Equations Spring 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. LECTURE 13. INHOMOGENEOUS

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

Investigation of Godunov Flux Against Lax Friedrichs' Flux for the RKDG Methods on the Scalar Nonlinear Conservation Laws Using Smoothness Indicator

Investigation of Godunov Flux Against Lax Friedrichs' Flux for the RKDG Methods on the Scalar Nonlinear Conservation Laws Using Smoothness Indicator American Review of Mathematics and Statistics December 2014, Vol. 2, No. 2, pp. 43-53 ISSN: 2374-2348 (Print), 2374-2356 (Online) Copyright The Author(s). 2014. All Rights Reserved. Published by American

More information

Second Order Transfer Function Discrete Equations

Second Order Transfer Function Discrete Equations Second Order Transfer Function Discrete Equations J. Riggs 23 Aug 2017 Transfer Function Equations pg 1 1 Introduction The objective of this paper is to develop the equations for a discrete implementation

More information

Defect-based a-posteriori error estimation for implicit ODEs and DAEs

Defect-based a-posteriori error estimation for implicit ODEs and DAEs 1 / 24 Defect-based a-posteriori error estimation for implicit ODEs and DAEs W. Auzinger Institute for Analysis and Scientific Computing Vienna University of Technology Workshop on Innovative Integrators

More information