[ ] is a vector of size p.

Size: px
Start display at page:

Download "[ ] is a vector of size p."

Transcription

1 Lecture 11 Copyright by Hongyun Wang, UCSC Recap: General form of explicit Runger-Kutta methods for solving y = F( y, t) k i = hfy n + i1 j =1 c ij k j, t n + d i h, i = 1,, p + p j =1 b j k j A Runge-Kutta method is completely specified by 4 items (p, c, d and b). p: the number of stages (a scalar) c 11 c 1 p c = c p1 c pp d = d 1 d p is a p p matrix. [ ] is a vector of size p. [ ] is a vector of size p. b = b 1 b p Numerical error estimation in solving ODEs y N ( h): numerical approximation of y( Nh) obtained with time step h ( h) y N ( h) y( Nh) Global error: E N The global error is estimated as E N y N ( h) h ( h) y 2N p y N h ( h) y N p is NOT good! - 1 -

2 High order ODEs and first order ODE systems Example: A damped pendulum (Draw a pendulum with, L and mg) Newton s second law: () ml t MassAcceleration () = cl t mgsin t Drag sin ( ( t )) ( ()) Gravity ==> ( t) = c m ( t) g L This is a second order non-linear ODE. To solve it numerically, we need to convert it to a first order ODE system. Question: How to convert a second order ODE into a first order ODE system? Answer: We treat both the function and the derivative as unknowns. We introduce two unknown functions: () t and v()= t () t We have t = vt = ( t) = c m v t ( t) g L sin ( ( t )) = c m vt g L sin ( ( t ) ==> d dt () t vt () = vt () c m vt () g L sin () t This is a first order ODE system. It is in the form of W ( t) = F W ( t), t where W t = ( t) vt F W ( t), t = vt c m vt g L sin ( t ) - 2 -

3 Example: van der Pol equation y + μ y 2 1 y + y = 0 This is a second order non-linear ODE. (Go through the physical background and limit cycle of van der Pol equation) We compare van der Pol equation with damped pendulum. + c m Dissipation + g L sin ( )= 0 In van der Pol equation, the dissipation coefficient is μ( y 2 1). When y is large, the dissipation is positive (oscillation is damped). When y is small, the dissipation is negative (energy is injected to magnify oscillation). Thus, the oscillation converges to the steady state amplitude that balances the positive dissipation and the negative dissipation. This is called a limit cycle. We will see detailed behavior of limit cycle when we solve van der Pol equation in numerical demonstration. (Then skip the rest of the example in lecture) To solve it numerically, we need to convert it to a first order ODE system. We introduce two unknown functions: yt () and v()= t y() t We have y ( t) = vt v ( t) = y ( t) = μ y 2 ( t)1 d yt () ==> dt vt () = vt () μ( y 2 () t 1)vt This is a first order ODE system. We can write it in the form. W ( t) = F W ( t), t where W t = yt vt F W ( t), t = vt μ ( y 2 ( t)1)vt yt y ( t) yt = μ ( y 2 ( t)1)vt yt ()yt () - 3 -

4 Next, we look at how to implement Runge-Kutta methods to solve W = F ( W, t). sample code calc_srk4.m in directory ODE_sys_RK clear m=2; w0=[1, 0]; h=0.1; nstep=40/h; w=zeros(nstep+1,m); t=zeros(nstep+1,1); t(1)=0; w(1,1:m)=w0; p=4; d=[0, 1/2, 1/2, 1]; c=[0, 0, 0, 0; 1/2, 0, 0, 0; 0, 1/2, 0, 0; 0, 0, 1, 0]; b=[1/6, 1/3, 1/3, 1/6]; k=zeros(p,m); for j=1:nstep, for i=1:p, k(i,1:m)=h*f_sys(w(j,1:m)+c(i,1:i-1)*k(1:i-1,1:m), t(j)+d(i)*h); end w(j+1,1:m)=w(j,1:m)+b*k; t(j+1)=t(j)+h; end - 4 -

5 save data_srk4 sample code f_sys.m in directory ODE_sys_RK (for damped pendulum) function [z]=f_sys(w,t) mass=1.0; c=0.1; g=10; L=10; z=zeros(1,2); theta=w(1); v=w(2); z(1)=v; z(2)= -c/mass*v - g/l*sin(theta); Sample code f_sys.m for van der Pol oscillator. (Skip it in lecture) function [z]=f_sys(w,t) mu=0.1; z=zeros(1,2); y=w(1); v=w(2); z(1)=v; z(2)=-mu*(y^2-1)*v - y; - 5 -

6 Implicit Runge-Kutta methods We describe briefly the general form of implicit Runge-Kutta methods. k i = hf( y n + c i1 k 1 + c i 2 k 2 ++ c ip k p, t n + d i h), i = 1,, p Or in the summation notation k i = hfy n + p j =1 c ij k j, t n + d i h, + b 1 k 1 + b 2 k b p k p Or in the summation notation + b j k j p j =1 i = 1,, p Below we write the two implicit methods we learned so far (backward Euler method and trapezoidal method) in the form of implicit Runger-Kutta methods. Backward Euler method: + hf y n +1, t n +1 Let k 1 = hf(, t n+1 ). We have k 1 = hf( y n + k 1, t n + h) + k 1 In terms of p, c, d, b, backward Euler method is specified by p = 1, c = (), 1 d = (), 1 b = () 1 Trapezoidal method: + h 2 Fy n, t n ( + Fy ( n +1, t n +1 )) Let k 1 = hf( y n, t n ) and k 2 = hf(, t n+1 ). We have k 1 = hf( y n, t n ) k 2 = hf y n k k 2, t n + h - 6 -

7 + 1 2 k k 2 In terms of p, c, d, b, trapezoidal method is specified by 0 0 p = 2, c = 1 1, d = ( 0, 1), b = , 1 2 Stiff problems and advantages of implicit methods Although implicit methods are difficult to implement numerically, in some situations it is necessary to use implicit methods. Question: What happens if we use Euler method to solve y = ( y cos() t ), = 10 8? y( 0)= 0 To answer this question, let us first look at a simpler model problem. A model problem: y = y, > 0 and is large Exact solution: yt = y( 0)e t 0 as t The numerical solution should follow the general trend of the exact solution. We require that y n be bounded as n. Behavior of Euler method: + hf y n,t n ==> hy n ==> = ( 1 h)y n ==> y n = ( 1 h) n y 0 y n is bounded if and only if 1 h 1 iff 1 h 1 1 iff 0 h 2-7 -

8 iff h 2 For large, time step h has to be very small. = 10 8 ==> h 2 = ==> To reach t final = 10, we need N = t final h = steps. That is, we need 500 million steps! Summary of Euler method applied to y = y, > 0 If the exponential decay is resolved (when time step h is small enough), then the numerical solution is good. If the exponential decay is not resolve (when time step h is not small enough), then the numerical solution blows up. In other words, the numerical solution is well behaved only if the exponential decay is resolved. Behavior of backward Euler method: + hf,t n +1 ==> hy n +1 ==> + h ==> = h y n 1 ==> y n = 1 + h n y 0 ==> y n 0 as n for any value of h. Summary of backward Euler method applied to y = y, > 0 Even if the exponential decay is not resolved (when time step h is not small enough), the numerical solution retains the property that y n 0 as n. In other words, the numerical solution is always well behaved even if the exponential decay is not resolved. We are ready to study the original problem - 8 -

9 y = ( y cos() t ), = 10 8 y( 0)= 0 Exact solution: yt = cos( t) sin t e t (See Appendix for the derivation of the exact solution) The system has two very different time scales: fast decay of e t and slow evolution of cos(). t ==> It is a stiff problem (see the definition below). Definition of stiff problem: A problem is called stiff if it has (at least) two very different time scales. Behavior of Euler method for solving y = ( y cos() t ): + hf ( y n,t n ) ==> h ( y n cos( t n )) y n is bounded if and only if h 2. When we use Euler method or other explicit methods to solve this problem, we are constrained by two requirements: we need to use h 2 to keep y n bounded (due to the fast decay of e t ) we need to run the simulation to t final > 2 to see the evolution of cos t (due to the slow evolution of cos()) t Together these two requirements imply that N = t final h > 2 2 = > That is, we need 300 million steps! In general, when we use an explicit method to solve a stiff problem, ()

10 we need to use time step h small enough to resolve the fast time evolution we need to run simulation to a final time large enough to capture the slow time evolution ==> It is very expensive to solve a stiff problem using an explicit method. Behavior of backward Euler method for solving y = ( y cos() t ): + hf(,t n+1 ) ==> h ( y n +1 cos( t n +1 )) ==> + h + h cos t n +1 1 ==> = 1 + h y + h cos t n ( n+1) y n is bounded for any value of h. In general, when we use an implicit method to solve a stiff problem, the numerical solution is always well behaved even if the fast time evolution is not resolved. Appendix: y = y cos( t) Exact solution of y( 0) = 0 First, moving y to the left, we have y + y = cos( t) Multiplying by e t, we get y e t + ye t = cos( t)e t ==> ( ye t ) = cos( t)e t Integrating from t = 0 to t = s yields ys e s y 0 s = cos t 0 e t dt

11 ==> ys = e s cos t s 0 e t dt Here we have used the initial condition y( 0) = 0. Using the integration formula e ax cos( bx)dx = eax ( acos( bx) + bsin( bx) ) + C a 2 + b 2 we have s cos ( t )e t dt = et cos( t) + sin( t) = e s [ ] [ cos( s) + sin( s) ] Substituting this into the expression of ys, we obtain ys = cos( s) sin s e s t =s t =0-11 -

{ } is an asymptotic sequence.

{ } is an asymptotic sequence. AMS B Perturbation Methods Lecture 3 Copyright by Hongyun Wang, UCSC Recap Iterative method for finding asymptotic series requirement on the iteration formula to make it work Singular perturbation use

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

Numerical solution of ODEs

Numerical solution of ODEs Numerical solution of ODEs Arne Morten Kvarving Department of Mathematical Sciences Norwegian University of Science and Technology November 5 2007 Problem and solution strategy We want to find an approximation

More information

AMS 147 Computational Methods and Applications Lecture 09 Copyright by Hongyun Wang, UCSC. Exact value. Effect of round-off error.

AMS 147 Computational Methods and Applications Lecture 09 Copyright by Hongyun Wang, UCSC. Exact value. Effect of round-off error. Lecture 09 Copyrigt by Hongyun Wang, UCSC Recap: Te total error in numerical differentiation fl( f ( x + fl( f ( x E T ( = f ( x Numerical result from a computer Exact value = e + f x+ Discretization error

More information

Solving Ordinary Differential equations

Solving Ordinary Differential equations Solving Ordinary Differential equations Taylor methods can be used to build explicit methods with higher order of convergence than Euler s method. The main difficult of these methods is the computation

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

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

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

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

AMS 212A Applied Mathematical Methods I Lecture 14 Copyright by Hongyun Wang, UCSC. with initial condition

AMS 212A Applied Mathematical Methods I Lecture 14 Copyright by Hongyun Wang, UCSC. with initial condition Lecture 14 Copyright by Hongyun Wang, UCSC Recap of Lecture 13 Semi-linear PDE a( x, t) u t + b( x, t)u = c ( x, t, u ) x Characteristics: dt d = a x, t dx d = b x, t with initial condition t ( 0)= t 0

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

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9 Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T. Heath Chapter 9 Initial Value Problems for Ordinary Differential Equations Copyright c 2001. Reproduction

More information

Ordinary differential equation II

Ordinary differential equation II Ordinary Differential Equations ISC-5315 1 Ordinary differential equation II 1 Some Basic Methods 1.1 Backward Euler method (implicit method) The algorithm looks like this: y n = y n 1 + hf n (1) In contrast

More information

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

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

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

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 9 Initial Value Problems for Ordinary Differential Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign

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

Part IB Numerical Analysis

Part IB Numerical Analysis Part IB Numerical Analysis Definitions Based on lectures by G. Moore Notes taken by Dexter Chua Lent 206 These notes are not endorsed by the lecturers, and I have modified them (often significantly) after

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

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

Computational Physics (6810): Session 8

Computational Physics (6810): Session 8 Computational Physics (6810): Session 8 Dick Furnstahl Nuclear Theory Group OSU Physics Department February 24, 2014 Differential equation solving Session 7 Preview Session 8 Stuff Solving differential

More information

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of Scientific Computing with Case Studies SIAM Press, 2009 http://www.cs.umd.edu/users/oleary/sccswebpage Lecture Notes for Unit V Solution of Differential Equations Part 1 Dianne P. O Leary c 2008 1 The

More information

AMS 147 Computational Methods and Applications Lecture 17 Copyright by Hongyun Wang, UCSC

AMS 147 Computational Methods and Applications Lecture 17 Copyright by Hongyun Wang, UCSC Lecture 17 Copyright by Hongyun Wang, UCSC Recap: Solving linear system A x = b Suppose we are given the decomposition, A = L U. We solve (LU) x = b in 2 steps: *) Solve L y = b using the forward substitution

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

Initial value problems for ordinary differential equations

Initial value problems for ordinary differential equations AMSC/CMSC 660 Scientific Computing I Fall 2008 UNIT 5: Numerical Solution of Ordinary Differential Equations Part 1 Dianne P. O Leary c 2008 The Plan Initial value problems (ivps) for ordinary differential

More information

Ordinary Differential Equations

Ordinary Differential Equations CHAPTER 8 Ordinary Differential Equations 8.1. Introduction My section 8.1 will cover the material in sections 8.1 and 8.2 in the book. Read the book sections on your own. I don t like the order of things

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

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

Numerical Methods for Differential Equations

Numerical Methods for Differential Equations Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Linear Multistep methods Gustaf Söderlind and Carmen Arévalo Numerical Analysis, Lund University Textbooks: A First Course in the

More information

Chaotic motion. Phys 750 Lecture 9

Chaotic motion. Phys 750 Lecture 9 Chaotic motion Phys 750 Lecture 9 Finite-difference equations Finite difference equation approximates a differential equation as an iterative map (x n+1,v n+1 )=M[(x n,v n )] Evolution from time t =0to

More information

Ordinary Differential Equations: Initial Value problems (IVP)

Ordinary Differential Equations: Initial Value problems (IVP) Chapter Ordinary Differential Equations: Initial Value problems (IVP) Many engineering applications can be modeled as differential equations (DE) In this book, our emphasis is about how to use computer

More information

AMS 147 Computational Methods and Applications Lecture 13 Copyright by Hongyun Wang, UCSC

AMS 147 Computational Methods and Applications Lecture 13 Copyright by Hongyun Wang, UCSC Lecture 13 Copyright y Hongyun Wang, UCSC Recap: Fitting to exact data *) Data: ( x j, y j ), j = 1,,, N y j = f x j *) Polynomial fitting Gis phenomenon *) Cuic spline Convergence of cuic spline *) Application

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

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 18. HW 7 is posted, and will be due in class on 4/25.

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 18. HW 7 is posted, and will be due in class on 4/25. Logistics Week 12: Monday, Apr 18 HW 6 is due at 11:59 tonight. HW 7 is posted, and will be due in class on 4/25. The prelim is graded. An analysis and rubric are on CMS. Problem du jour For implicit methods

More information

Simple Harmonic Motion

Simple Harmonic Motion Physics 7B-1 (A/B) Professor Cebra Winter 010 Lecture 10 Simple Harmonic Motion Slide 1 of 0 Announcements Final exam will be next Wednesday 3:30-5:30 A Formula sheet will be provided Closed-notes & closed-books

More information

Lecture V: The game-engine loop & Time Integration

Lecture V: The game-engine loop & Time Integration Lecture V: The game-engine loop & Time Integration The Basic Game-Engine Loop Previous state: " #, %(#) ( #, )(#) Forces -(#) Integrate velocities and positions Resolve Interpenetrations Per-body change

More information

CS520: numerical ODEs (Ch.2)

CS520: numerical ODEs (Ch.2) .. CS520: numerical ODEs (Ch.2) Uri Ascher Department of Computer Science University of British Columbia ascher@cs.ubc.ca people.cs.ubc.ca/ ascher/520.html Uri Ascher (UBC) CPSC 520: ODEs (Ch. 2) Fall

More information

Ordinary differential equations - Initial value problems

Ordinary differential equations - Initial value problems Education has produced a vast population able to read but unable to distinguish what is worth reading. G.M. TREVELYAN Chapter 6 Ordinary differential equations - Initial value problems In this chapter

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 9 Implicit Methods for Linear and Nonlinear Systems of ODEs

Chapter 9 Implicit Methods for Linear and Nonlinear Systems of ODEs Chapter 9 Implicit Methods for Linear and Nonlinear Systems of ODEs In the previous chapter, we investigated stiffness in ODEs. Recall that an ODE is stiff if it exhibits behavior on widelyvarying timescales.

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

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations Introduction: first order ODE We are given a function f(t,y) which describes a direction field in the (t,y) plane an initial point (t 0,y 0 ) We want to find a function

More information

10.34: Numerical Methods Applied to Chemical Engineering. Lecture 19: Differential Algebraic Equations

10.34: Numerical Methods Applied to Chemical Engineering. Lecture 19: Differential Algebraic Equations 10.34: Numerical Methods Applied to Chemical Engineering Lecture 19: Differential Algebraic Equations 1 Recap Differential algebraic equations Semi-explicit Fully implicit Simulation via backward difference

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

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

Differential Equations FMNN10 Graded Project #1 c G Söderlind 2017

Differential Equations FMNN10 Graded Project #1 c G Söderlind 2017 Differential Equations FMNN10 Graded Project #1 c G Söderlind 2017 Published 2017-10-30. Instruction in computer lab 2017-11-02/08/09. Project report due date: Monday 2017-11-13 at 10:00. Goals. The goal

More information

Robotics. Dynamics. Marc Toussaint U Stuttgart

Robotics. Dynamics. Marc Toussaint U Stuttgart Robotics Dynamics 1D point mass, damping & oscillation, PID, dynamics of mechanical systems, Euler-Lagrange equation, Newton-Euler recursion, general robot dynamics, joint space control, reference trajectory

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

Solutions to Math 53 Math 53 Practice Final

Solutions to Math 53 Math 53 Practice Final Solutions to Math 5 Math 5 Practice Final 20 points Consider the initial value problem y t 4yt = te t with y 0 = and y0 = 0 a 8 points Find the Laplace transform of the solution of this IVP b 8 points

More information

Introduction to First Order Equations Sections

Introduction to First Order Equations Sections A B I L E N E C H R I S T I A N U N I V E R S I T Y Department of Mathematics Introduction to First Order Equations Sections 2.1-2.3 Dr. John Ehrke Department of Mathematics Fall 2012 Course Goals The

More information

Cyber-Physical Systems Modeling and Simulation of Continuous Systems

Cyber-Physical Systems Modeling and Simulation of Continuous Systems Cyber-Physical Systems Modeling and Simulation of Continuous Systems Matthias Althoff TU München 29. May 2015 Matthias Althoff Modeling and Simulation of Cont. Systems 29. May 2015 1 / 38 Ordinary Differential

More information

Final 09/14/2017. Notes and electronic aids are not allowed. You must be seated in your assigned row for your exam to be valid.

Final 09/14/2017. Notes and electronic aids are not allowed. You must be seated in your assigned row for your exam to be valid. Final 09/4/207 Name: Problems -5 are each worth 8 points. Problem 6 is a bonus for up to 4 points. So a full score is 40 points and the max score is 44 points. The exam has 6 pages; make sure you have

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

Chaotic motion. Phys 420/580 Lecture 10

Chaotic motion. Phys 420/580 Lecture 10 Chaotic motion Phys 420/580 Lecture 10 Finite-difference equations Finite difference equation approximates a differential equation as an iterative map (x n+1,v n+1 )=M[(x n,v n )] Evolution from time t

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

Lesson 14: Van der Pol Circuit and ode23s

Lesson 14: Van der Pol Circuit and ode23s Lesson 4: Van der Pol Circuit and ode3s 4. Applied Problem. A series LRC circuit when coupled via mutual inductance with a triode circuit can generate a sequence of pulsing currents that have very rapid

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

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

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

Multistep Methods for IVPs. t 0 < t < T

Multistep Methods for IVPs. t 0 < t < T Multistep Methods for IVPs We are still considering the IVP dy dt = f(t,y) t 0 < t < T y(t 0 ) = y 0 So far we have looked at Euler s method, which was a first order method and Runge Kutta (RK) methods

More information

Ordinary Differential Equations I

Ordinary Differential Equations I Ordinary Differential Equations I CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations I 1 / 32 Theme of Last Few

More information

Oscillations. Phys101 Lectures 28, 29. Key points: Simple Harmonic Motion (SHM) SHM Related to Uniform Circular Motion The Simple Pendulum

Oscillations. Phys101 Lectures 28, 29. Key points: Simple Harmonic Motion (SHM) SHM Related to Uniform Circular Motion The Simple Pendulum Phys101 Lectures 8, 9 Oscillations Key points: Simple Harmonic Motion (SHM) SHM Related to Uniform Circular Motion The Simple Pendulum Ref: 11-1,,3,4. Page 1 Oscillations of a Spring If an object oscillates

More information

M A : Ordinary Differential Equations

M A : Ordinary Differential Equations M A 2 0 5 1: Ordinary Differential Equations Essential Class Notes & Graphics D 19 * 2018-2019 Sections D07 D11 & D14 1 1. INTRODUCTION CLASS 1 ODE: Course s Overarching Functions An introduction to the

More information

Chapter 13. F =!kx. Vibrations and Waves. ! = 2" f = 2" T. Hooke s Law Reviewed. Sinusoidal Oscillation Graphing x vs. t. Phases.

Chapter 13. F =!kx. Vibrations and Waves. ! = 2 f = 2 T. Hooke s Law Reviewed. Sinusoidal Oscillation Graphing x vs. t. Phases. Chapter 13 Vibrations and Waves Hooke s Law Reviewed F =!k When is positive, F is negative ; When at equilibrium (=0, F = 0 ; When is negative, F is positive ; 1 2 Sinusoidal Oscillation Graphing vs. t

More information

Lecture 9: Eigenvalues and Eigenvectors in Classical Mechanics (See Section 3.12 in Boas)

Lecture 9: Eigenvalues and Eigenvectors in Classical Mechanics (See Section 3.12 in Boas) Lecture 9: Eigenvalues and Eigenvectors in Classical Mechanics (See Section 3 in Boas) As suggested in Lecture 8 the formalism of eigenvalues/eigenvectors has many applications in physics, especially in

More information

Dynamics and Time Integration. Computer Graphics CMU /15-662, Fall 2016

Dynamics and Time Integration. Computer Graphics CMU /15-662, Fall 2016 Dynamics and Time Integration Computer Graphics CMU 15-462/15-662, Fall 2016 Last Quiz: IK (and demo) Last few classes Keyframing and motion capture - Q: what can one NOT do with these techniques? The

More information

Initial-Value Problems for ODEs. Introduction to Linear Multistep Methods

Initial-Value Problems for ODEs. Introduction to Linear Multistep Methods Initial-Value Problems for ODEs Introduction to Linear Multistep Methods Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University

More information

dt 2 The Order of a differential equation is the order of the highest derivative that occurs in the equation. Example The differential equation

dt 2 The Order of a differential equation is the order of the highest derivative that occurs in the equation. Example The differential equation Lecture 18 : Direction Fields and Euler s Method A Differential Equation is an equation relating an unknown function and one or more of its derivatives. Examples Population growth : dp dp = kp, or = kp

More information

Differential Equations and Linear Algebra Exercises. Department of Mathematics, Heriot-Watt University, Edinburgh EH14 4AS

Differential Equations and Linear Algebra Exercises. Department of Mathematics, Heriot-Watt University, Edinburgh EH14 4AS Differential Equations and Linear Algebra Exercises Department of Mathematics, Heriot-Watt University, Edinburgh EH14 4AS CHAPTER 1 Linear second order ODEs Exercises 1.1. (*) 1 The following differential

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

Ordinary Differential Equations I

Ordinary Differential Equations I Ordinary Differential Equations I CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations I 1 / 27 Theme of Last Three

More information

Chapter 6 - Ordinary Differential Equations

Chapter 6 - Ordinary Differential Equations Chapter 6 - Ordinary Differential Equations 7.1 Solving Initial-Value Problems In this chapter, we will be interested in the solution of ordinary differential equations. Ordinary differential equations

More information

Computational Techniques Prof. Dr. Niket Kaisare Department of Chemical Engineering Indian Institute of Technology, Madras

Computational Techniques Prof. Dr. Niket Kaisare Department of Chemical Engineering Indian Institute of Technology, Madras Computational Techniques Prof. Dr. Niket Kaisare Department of Chemical Engineering Indian Institute of Technology, Madras Module No. # 07 Lecture No. # 04 Ordinary Differential Equations (Initial Value

More information

Outline. Calculus for the Life Sciences. What is a Differential Equation? Introduction. Lecture Notes Introduction to Differential Equa

Outline. Calculus for the Life Sciences. What is a Differential Equation? Introduction. Lecture Notes Introduction to Differential Equa Outline Calculus for the Life Sciences Lecture Notes to Differential Equations Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu 1 Department of Mathematics and Statistics Dynamical Systems Group Computational

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

Basic Theory of Differential Equations

Basic Theory of Differential Equations page 104 104 CHAPTER 1 First-Order Differential Equations 16. The following initial-value problem arises in the analysis of a cable suspended between two fixed points y = 1 a 1 + (y ) 2, y(0) = a, y (0)

More information

The integrating factor method (Sect. 1.1)

The integrating factor method (Sect. 1.1) The integrating factor method (Sect. 1.1) Overview of differential equations. Linear Ordinary Differential Equations. The integrating factor method. Constant coefficients. The Initial Value Problem. Overview

More information

The Chemical Kinetics Time Step a detailed lecture. Andrew Conley ACOM Division

The Chemical Kinetics Time Step a detailed lecture. Andrew Conley ACOM Division The Chemical Kinetics Time Step a detailed lecture Andrew Conley ACOM Division Simulation Time Step Deep convection Shallow convection Stratiform tend (sedimentation, detrain, cloud fraction, microphysics)

More information

Numerical Algorithms for ODEs/DAEs (Transient Analysis)

Numerical Algorithms for ODEs/DAEs (Transient Analysis) Numerical Algorithms for ODEs/DAEs (Transient Analysis) Slide 1 Solving Differential Equation Systems d q ( x(t)) + f (x(t)) + b(t) = 0 dt DAEs: many types of solutions useful DC steady state: state no

More information

Math 308 Exam I Practice Problems

Math 308 Exam I Practice Problems Math 308 Exam I Practice Problems This review should not be used as your sole source of preparation for the exam. You should also re-work all examples given in lecture and all suggested homework problems..

More information

Solution. Your sketch should show both x and y axes marked from 5 to 5 and circles of radius 1, 3, and 5 centered at the origin.

Solution. Your sketch should show both x and y axes marked from 5 to 5 and circles of radius 1, 3, and 5 centered at the origin. Solutions of the Sample Problems for the First In-Class Exam Math 246, Fall 208, Professor David Levermore () (a) Sketch the graph that would be produced by the following Matlab command. fplot(@(t) 2/t,

More information

S#ff ODEs and Systems of ODEs

S#ff ODEs and Systems of ODEs S#ff ODEs and Systems of ODEs Popula#on Growth Modeling Let the number of individuals in a given area at time t be. At time the number is so that is the number of individuals that have arrived in the area

More information

The Finite Element Method for the Analysis of Non-Linear and Dynamic Systems. Prof. Dr. Eleni Chatzi Lecture 6-5 November, 2015

The Finite Element Method for the Analysis of Non-Linear and Dynamic Systems. Prof. Dr. Eleni Chatzi Lecture 6-5 November, 2015 The Finite Element Method for the Analysis of Non-Linear and Dynamic Systems Prof. Dr. Eleni Chatzi Lecture 6-5 November, 015 Institute of Structural Engineering Method of Finite Elements II 1 Introduction

More information

Time scales. Notes. Mixed Implicit/Explicit. Newmark Methods [ ] [ ] "!t = O 1 %

Time scales. Notes. Mixed Implicit/Explicit. Newmark Methods [ ] [ ] !t = O 1 % Notes Time scales! For using Pixie (the renderer) make sure you type use pixie first! Assignment 1 questions?! [work out]! For position dependence, characteristic time interval is "!t = O 1 % $ ' # K &!

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

DON T PANIC! If you get stuck, take a deep breath and go on to the next question. Come back to the question you left if you have time at the end.

DON T PANIC! If you get stuck, take a deep breath and go on to the next question. Come back to the question you left if you have time at the end. Math 307, Midterm 2 Winter 2013 Name: Instructions. DON T PANIC! If you get stuck, take a deep breath and go on to the next question. Come back to the question you left if you have time at the end. There

More information

Differential Equations

Differential Equations Pysics-based simulation xi Differential Equations xi+1 xi xi+1 xi + x x Pysics-based simulation xi Wat is a differential equation? Differential equations describe te relation between an unknown function

More information

Robotics. Dynamics. University of Stuttgart Winter 2018/19

Robotics. Dynamics. University of Stuttgart Winter 2018/19 Robotics Dynamics 1D point mass, damping & oscillation, PID, dynamics of mechanical systems, Euler-Lagrange equation, Newton-Euler, joint space control, reference trajectory following, optimal operational

More information

Solutions of the Sample Problems for the First In-Class Exam Math 246, Fall 2017, Professor David Levermore

Solutions of the Sample Problems for the First In-Class Exam Math 246, Fall 2017, Professor David Levermore Solutions of the Sample Problems for the First In-Class Exam Math 246, Fall 207, Professor David Levermore () (a) Give the integral being evaluated by the following Matlab command. int( x/(+xˆ4), x,0,inf)

More information

ENGR 2405 Chapter 8. Second Order Circuits

ENGR 2405 Chapter 8. Second Order Circuits ENGR 2405 Chapter 8 Second Order Circuits Overview The previous chapter introduced the concept of first order circuits. This chapter will expand on that with second order circuits: those that need a second

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

Math 216 Final Exam 24 April, 2017

Math 216 Final Exam 24 April, 2017 Math 216 Final Exam 24 April, 2017 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

Calculus for the Life Sciences

Calculus for the Life Sciences Improved Calculus for the Life Sciences ntial Equations Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research Center

More information

Math 2a Prac Lectures on Differential Equations

Math 2a Prac Lectures on Differential Equations Math 2a Prac Lectures on Differential Equations Prof. Dinakar Ramakrishnan 272 Sloan, 253-37 Caltech Office Hours: Fridays 4 5 PM Based on notes taken in class by Stephanie Laga, with a few added comments

More information

Differential Equations & Separation of Variables

Differential Equations & Separation of Variables Differential Equations & Separation of Variables SUGGESTED REFERENCE MATERIAL: As you work through the problems listed below, you should reference Chapter 8. of the recommended textbook (or the equivalent

More information

ODEs. September 7, Consider the following system of two coupled first-order ordinary differential equations (ODEs): A =

ODEs. September 7, Consider the following system of two coupled first-order ordinary differential equations (ODEs): A = ODEs September 7, 2017 In [1]: using Interact, PyPlot 1 Exponential growth and decay Consider the following system of two coupled first-order ordinary differential equations (ODEs): d x/dt = A x for the

More information

q t = F q x. (1) is a flux of q due to diffusion. Although very complex parameterizations for F q

q t = F q x. (1) is a flux of q due to diffusion. Although very complex parameterizations for F q ! Revised Tuesday, December 8, 015! 1 Chapter 7: Diffusion Copyright 015, David A. Randall 7.1! Introduction Diffusion is a macroscopic statistical description of microscopic advection. Here microscopic

More information

Ordinary Differential Equations

Ordinary Differential Equations Chapter 7 Ordinary Differential Equations Differential equations are an extremely important tool in various science and engineering disciplines. Laws of nature are most often expressed as different equations.

More information

Applications of Second-Order Differential Equations

Applications of Second-Order Differential Equations Applications of Second-Order Differential Equations ymy/013 Building Intuition Even though there are an infinite number of differential equations, they all share common characteristics that allow intuition

More information