Outline. Remaining Course Schedule. Review Systems of ODEs. Example. Example Continued. Other Algorithms for Ordinary Differential Equations

Similar documents
Basic Concepts in Numerical Analysis November 6, 2017

Outline. Review Numerical Approach. Schedule for April and May. Review Simple Methods. Review Notation and Order

Introduction to Numerical Differentiation and Interpolation March 10, !=1 1!=1 2!=2 3!=6 4!=24 5!= 120

ME 501A Seminar in Engineering Analysis Page 1

A Conventional Approach for the Solution of the Fifth Order Boundary Value Problems Using Sixth Degree Spline Functions

General Method for Calculating Chemical Equilibrium Composition

Numerical Differentiation

Ordinary Differential Equations. Orientation. Lesson Objectives. Ch. 25. ODE s. Runge-Kutta Methods. Motivation Mathematical Background

Some Different Perspectives on Linear Least Squares

Numerical Analysis Formulae Booklet

PGE 310: Formulation and Solution in Geosystems Engineering. Dr. Balhoff. Interpolation

NUMERICAL DIFFERENTIAL 1

2/20/2013. Topics. Power Flow Part 1 Text: Power Transmission. Power Transmission. Power Transmission. Power Transmission

Initial-Value Problems for ODEs. numerical errors (round-off and truncation errors) Consider a perturbed system: dz dt

A New Method for Solving Fuzzy Linear. Programming by Solving Linear Programming

ORDINARY DIFFERENTIAL EQUATIONS EULER S METHOD

Numerical Differentiation

7.0 Equality Contraints: Lagrange Multipliers

CS 2750 Machine Learning. Lecture 7. Linear regression. CS 2750 Machine Learning. Linear regression. is a linear combination of input components x

Outline. Numerical Heat Transfer. Review All Black Surfaces. Review View Factor, F i j or F ij. Review Gray Diffuse Opaque II

Derivation of the Modified Bi-quintic B-spline Base Functions: An Application to Poisson Equation

Fourth Order Four-Stage Diagonally Implicit Runge-Kutta Method for Linear Ordinary Differential Equations ABSTRACT INTRODUCTION

Lecture 12 APPROXIMATION OF FIRST ORDER DERIVATIVES

Rectilinear motion. Lecture 2: Kinematics of Particles. External motion is known, find force. External forces are known, find motion

Chapter 5. Curve fitting

Algorithms behind the Correlation Setting Window

4 Round-Off and Truncation Errors

d y f f dy Numerical Solution of Ordinary Differential Equations Consider the 1 st order ordinary differential equation (ODE) . dx

Rao Transforms: Application to the Restoration of Shift-Variant Blurred Images

Solutions to problem set ); (, ) (

Given a table of data poins of an unknown or complicated function f : we want to find a (simpler) function p s.t. px (

E91: Dynamics. E91: Dynamics. Numerical Integration & State Space Representation

3.1 Introduction to Multinomial Logit and Probit

16 Homework lecture 16

Johns Hopkins University Department of Biostatistics Math Review for Introductory Courses

Johns Hopkins University Department of Biostatistics Math Review for Introductory Courses

ME 501A Seminar in Engineering Analysis Page 1

Mechanics of Materials CIVL 3322 / MECH 3322

lecture 35: Linear Multistep Mehods: Truncation Error

THE ROYAL STATISTICAL SOCIETY 2016 EXAMINATIONS SOLUTIONS HIGHER CERTIFICATE MODULE 5

Assignment 7/MATH 247/Winter, 2010 Due: Friday, March 19. Powers of a square matrix

KURODA S METHOD FOR CONSTRUCTING CONSISTENT INPUT-OUTPUT DATA SETS. Peter J. Wilcoxen. Impact Research Centre, University of Melbourne.

ENHANCING THE COMPUTATIONAL PERFORMANCE OF NEWTON- RAPHSON POWER FLOW CODES IN POWER SYSTEM PROBLEMS

Homework Assignment Number Eight Solutions

DATA DOMAIN DATA DOMAIN

Idea is to sample from a different distribution that picks points in important regions of the sample space. Want ( ) ( ) ( ) E f X = f x g x dx

1 0, x? x x. 1 Root finding. 1.1 Introduction. Solve[x^2-1 0,x] {{x -1},{x 1}} Plot[x^2-1,{x,-2,2}] 3

PRACTICAL CONSIDERATIONS IN HUMAN-INDUCED VIBRATION

Laboratory I.10 It All Adds Up

The Application of the Hybrid Method to Solving the Volterra Integro-differential Equation

2006 Jamie Trahan, Autar Kaw, Kevin Martin University of South Florida United States of America

Lecture Notes 2. The ability to manipulate matrices is critical in economics.

1 Proving the Fundamental Theorem of Statistical Learning

Lecture 26 Finite Differences and Boundary Value Problems

3D Reconstruction from Image Pairs. Reconstruction from Multiple Views. Computing Scene Point from Two Matching Image Points

Derivation of 3-Point Block Method Formula for Solving First Order Stiff Ordinary Differential Equations

The Modified Bi-quintic B-spline Base Functions: An Application to Diffusion Equation

9.1 Introduction to the probit and logit models

Power Flow S + Buses with either or both Generator Load S G1 S G2 S G3 S D3 S D1 S D4 S D5. S Dk. Injection S G1

. The set of these sums. be a partition of [ ab, ]. Consider the sum f( x) f( x 1)

ANALYSIS ON THE NATURE OF THE BASIC EQUATIONS IN SYNERGETIC INTER-REPRESENTATION NETWORK

Objectives of Multiple Regression

Maximum Likelihood Estimation

Chapter 5 Properties of a Random Sample

L5 Polynomial / Spline Curves

Midterm Exam 1, section 2 (Solution) Thursday, February hour, 15 minutes

Supervised learning: Linear regression Logistic regression

A New Mathematical Approach for Solving the Equations of Harmonic Elimination PWM

Analyzing Control Structures

Mu Sequences/Series Solutions National Convention 2014

Polyphase Filters. Section 12.4 Porat

FREQUENCY ANALYSIS OF A DOUBLE-WALLED NANOTUBES SYSTEM

Shuai Dong. Isaac Newton. Gottfried Leibniz

Functions of Random Variables

The Derivation of Implicit Second Derivative Method for Solving Second-Order Stiff Ordinary Differential Equations Odes.

Chapter 3. Differentiation 3.3 Differentiation Rules

Spring Ammar Abu-Hudrouss Islamic University Gaza

COMP4630: λ-calculus

Numerical Solution of Ordinary Differential Equations

( t) ( t) ( t) ρ ψ ψ. (9.1)

Third handout: On the Gini Index

Chapter Two. An Introduction to Regression ( )

D. L. Bricker, 2002 Dept of Mechanical & Industrial Engineering The University of Iowa. CPL/XD 12/10/2003 page 1

The Modified Bi-quintic B-Splines for Solving the Two-Dimensional Unsteady Burgers' Equation

Data Processing Techniques

Chapter 2 Supplemental Text Material

b) Choose one o f the graphs in part a that did b) is the atomic number o f

Multiple Choice Test. Chapter Adequacy of Models for Regression

X X X E[ ] E X E X. is the ()m n where the ( i,)th. j element is the mean of the ( i,)th., then

1 Onto functions and bijections Applications to Counting

Computational Geometry

Chapter Simpson s 1/3 Rule of Integration. ( x)

On Pfaff s solution of the Pfaff problem

Asymptotic Formulas Composite Numbers II

Review of Linear Algebra

MMJ 1113 FINITE ELEMENT METHOD Introduction to PART I

( ) 2 2. Multi-Layer Refraction Problem Rafael Espericueta, Bakersfield College, November, 2006

Lecture 5: Interpolation. Polynomial interpolation Rational approximation

The equation is sometimes presented in form Y = a + b x. This is reasonable, but it s not the notation we use.

Chapter 7. Solution of Ordinary Differential Equations

Transcription:

ter Nuercal DE Algorts Aprl 8 0 ter Algorts or rdar Deretal Equatos Larr aretto Mecacal Egeerg 09 Nuercal Aalss o Egeerg Sstes Aprl 8 0 utle Scedule Revew sstes o DEs Sprg-ass-daper proble wt two asses as eaple Usg DE solvers MATLAB ter approaces or solvg te tal value proble Multstep etods Iplct etods Etrapolato etods Reag ourse Scedule Aprl 8 toda More o DEs; prograg assget s due Aprl 0 Last quz o DEs. Fal lecture o uercal solutos o DEs Ma 5 Revew or al ad prograg eas; prograg assget seve due Ma 7 Prograg ea Ma Fal ea 8 0 p Revew Sstes o DEs a covert t order DE to rstorder DEs a appl algorts or oe rst-order DE to sstes o rst-order DEs Must ave tal coos o all varables overtg a t order DE to rst-order DEs gves dervatve DEs wose tal values we eed Must appl eac step o algorts to all DEs beore gog o to et step Eaple Two asses joed b a sprg/daper rgal DEs or eac ass Dee veloctes Rewrte orgal DEs usg veloctes d d d c F d d d c F d v d v dv c F v v dv c F v v = sprg costat N/ c = dapg coecet g/s 5 Eaple otued Replace v v equatos below b d v dv c v v d v dv c v v d d F F Result s stadard-or sste: d / = d F c d F c 6 ME 09 Nuercal Aalss o Egeerg Sstes

ter Nuercal DE Algorts Aprl 8 0 MATLAB Dervatve Fucto ucto = sprgmassdapert =; =; c = 0.5; = ; = zeros; = ; = ; = c*-+*-/; = c*-+*-/; Ed >>[t ] = ode5@sprgmassdaper [0 ] [ - 0 0] 7 Geeral Sste For Have N DEs wt coo or: Eac a deped o t ad all Equatos or ters o t ad all values deped o proble descrpto Appl usual algorts + = + avg to eac equato: + = + avg s value o at t = t or = Must do eac step/substep to all equatos beore tag et step/substep t - t - t t + t + t + d 8 How to ode Ts For a algort eac step ust be doe or all equatos All equatos ave te or d / = User-deed ucto = Subt coputes all values or put t Eac step eac algort s a loop over all equatos gettg approprate updates Fourt-order Ruge Kutta RK Uses our dervatve evaluatos per step t t 6 t Loo at code or t ts algort te see cages t to appl to a sste o equatos t oo te value or all to copute t - t - t t + t + t + 9 0 RK ode oe DE = ted - tstart/steps t = depedet varable at start o step = t For step = To Steps t = tstart + * step - = Fctt tal values = * Use Applcato.Ru Fct t VBA = Fctt + / + / = * = Fctt + / + / = * = Fctt + + = + + * + * + * / 6 Net step Use sae progra varable or + ad RK or N DEs s s value o t varable at t t 6 t t t t t - t - t t + t + t + t Vector otato or ad sows tat ca deped o all values ad eac calculato requres all values to be updated ME 09 Nuercal Aalss o Egeerg Sstes

ter Nuercal DE Algorts Aprl 8 0 RK ode Multple DEs = Ed - Start / Steps For step = To Steps = Start + * step - = Fct tal values For = To N Use Applcato. Ru Fct t VBA = * Tep = + 0.5 * Net = Fct + / Tep For = To N = * Tep = + 0.5 * Eaple: t -order Ruge-Kutta all Fct + / Tep For = To N = * Tep = + 0.5 * Net = Fct + / Tep For = To N = * Tep = + Net = Fct + Tep Eaple: t -order Ruge-Kutta Use sae progra varable or + ad = Fct + Tep For = To N Net Net step = * = + + * _ + * + * / 6 Tese ew values are used at start o loop to beg et step Sae stateets adle ucto put values or 5 DE Solvers MATLAB Several deret solvers For tal value probles te geeral ucto call s [t ] = solvernae dervatvef tspa 0 optos were t s a colu vector o te pots output b te calculato s te output atr or te soluto olu o s te soluto or varable Eac row o s te soluto o all or te te pot te sae row o t 6 DE Solvers MATLAB II dervatvef s te adle or a ucto tat evaluates te dervatves t I dervatveft t s a scalar te ad s a colu vector o te depedet varables Te ucto returs a colu vector or Te user as to wrte ts ucto to dee te proble beg solved Te tspa arguet s a row atr tat ust gve at least te tal ad al te MATLAB uses te s as te ae o te depedet varable wc ca be a quatt 7 DE Solvers MATLAB III I tere are ol te u o two pots start ad ed solvers wll gve output or eac te depedet varable used calculato Voluous output good or soot plots I tree or ore pots are used put ol tese put tes wll appear output Te 0 arguet s a vector or tal coos o te depedet varables Y0 = [ 5 -] gves 0 = 0 = 5 Te optos arguet allows te user to overrde oral deaults te solver See MATLAB elp or ore optos orato 8 ME 09 Nuercal Aalss o Egeerg Sstes

ter Nuercal DE Algorts Aprl 8 0 DE Solvers MATLAB Solver aes: ode5 ode ode ode5s odes odet odetb ode5 sould be rst coce Ts s a Ruge-Kutta procedure tat uses a ourt ad t order epressos called te Dorad-Prce par to adjust step sze ode s a ultstep algort based o te Adas-Basort-Moulto approac Applcato orato or solvers ro MATLAB elp o et slde 9 Solver MATLAB Solver Help Proble Tpe rder o Accurac We to Use ode5 Nost Medu Most o te te. Ts sould be te rst solver ou tr ode Nost Low Probles wt crude error toleraces or or solvg oderatel st probles ode Nost Low to g ode5s St Low to edu Probles wt strget error toleraces or coputatoall tesve probles I ode5 s slow because te proble s st odes St Low Wt crude error toleraces to solve st sstes ass atr s costat odet Moderatel St Low Moderatel st probles ou eed a soluto wtout uercal dapg. odetb St Low I usg crude error toleraces to solve st sstes. 0 MATLAB ode5 Eaple >> tpe odef. ucto = odef t %odef -- saple ode dervatve route = zeros; = -*/; %Use se = -**/^; %colos = -**; %to avod prts ed >> ts = [0....6.8 ]; %Te data >> 0 = [ ]'; %Ital values >> [t ] = ode5@odefts0 %use solver %utput te t ad soluto o et %slde MATLAB ode5 Eaple II t = 0 0.000 0.000 0.000 0.6000 0.8000.0000 =.0000.0000.0000 0.908 0.887 0.708 0.887 0.670 0.588 0.670 0.9 0.0 0.588 0.0 0.65 0.9 0.09 0.0907 0.679 0.5 0.098 %Results sow ol or speced tes %I t arra were etered as [0 ] results % or all tes would be dsplaed %I eact soluto Eact ow errors % uercal solutos or all tes are >> err = abs[ Eact] Nuercal DE Approaces Have see eplct sgle-step etods le Ruge-Kutta tat solve or + usg ol values at step Iplct etods use orato about pot + algort or + ; soe sort o approato requred Multstep etods use orato ro steps etc. Etrapolato etods Iplct Metods Metods dscussed prevousl are called eplct a d + ters o values at Use predctors to estate values betwee ad + Iplct etods use + algort Usuall requre approate soluto a use larger values wt ore wor per step copared to eplct etods Trapezod etod s a eaple ME 09 Nuercal Aalss o Egeerg Sstes

ter Nuercal DE Algorts Aprl 8 0 ME 09 Nuercal Aalss o Egeerg Sstes 5 5 Trapezod Metod I Basc plct result or ts etod Have to copute partal dervatves Need wa to copute + we we do ot ow + Frst approac: replace + b Talor seres 6 Trapezod Metod II Aoter approac to usg + algort to solve or te uow + Use a eplct approac to get a tal approato or + Iterate o plct etod E.g.: Euler step or rst approato o + 0 7 Trapezod Metod III Use Newto-Rapso terato or + Solve g = 0 b terato + = g / g g + = + / + + / g + = + 0 0 // 8 Trapezod Metod Dervato Subtract seres epaso or about + ro seres or + about ' ' ' ' ' ' 9 Trapezod Metod Dervato II ollect ters s last equato ad substtute + = + + ' 0 Trapezod Metod Eaple Loo at saple equato d/d = = -a Here = -a / = 0 ad / = -a a a a a a a a 0 So + = G wt G = a/ + a Wll use ts later stablt dscusso

ter Nuercal DE Algorts Aprl 8 0 Multstep Metods Prevous etods used ol orato ro ost recet step ad Too teredate steps betwee ad + to prove accurac Multstep etods use orato ro prevous steps or proved accurac wt less wor ta sgle step etods Need startg procedure tat s a sgle step etod Multstep Metod Dervato Uses terpolato poloal tat passes troug prevous pots Poloal s tegrated ro to + Resultg epresso gves + ters o values ad dervatves o prevous steps Leads to process ow as predctorcorrector wt two epressos or + ad a error cotrol epresso Adas-Basort-Moulto Predctor corrector etod Predctor equato uses dervatve values ro our pots P 55 59 7 9 orrector equato uses our pots cludg pot + wt predcted P P 9 9 5 Adas-Basort-Moulto II Use derece betwee predctor ad corrector results to get error estate P 55 59 7 9 P 9 9 5 Dervato result et two sldes gves error estate ters o P + v P E 9 5 9 70 70 Derve Error Equato Fro a error aalss o te tegrated terpolato poloals we ca d P 5 5 v P 70 9 5 70 v P 5 5 9 5 9 v 5 0 P 5 v 5 v 0 P 70 70 70 70 70 5 v v P Neglect v P - v. Subtract equatos. Subtract ad add v ter 5 9 5 v 70 70 5 P Derve Error Equato Solve or E te 9 5 E corrector error 70 P 5 9 5 v 70 5 v 70 70 70 6 v P 9 5 v 9 9 P 70 70 70 70 70 Error estate gves step sze cotrol How to cage ultstep etod? E ME 09 Nuercal Aalss o Egeerg Sstes 6

ter Nuercal DE Algorts Aprl 8 0 Step Sze otrol Establs e ad e a to aceve desred proble accurac I e E e a do ot cage I E < e double step sze I E > e a al step sze arr etra steps to be read or stepsze doublg Iterpolate data s cut al 7 Grd alvg error too large Noral operato o step sze cage - - - + old step --------- --------- --------- --------- --------- ew - - - + Error too large: Hal grd sze ad repeat step - - - + old step ----o---- ----o---- ----o---- ----o---- repeated - - - + terpolated pots 8 Grd doublg or ver sall error Noral operato o step sze cage -5 - - - - + old step o-----o-----o-----o-----o-----o-----o-----o -5 - - - - + ew Error ver sall: Double grd sze -5 - - - - + old step -----o----- -----o----- -----o----- ----------- - - - + Grd Halvg ad Doublg Keep etra values - ad -5 eor to be read or grd doublg -ew = -5 ; -ew = - ; -ew = - ; ew = + Grd alvg requres terpolato or ssg values old grd -ew = - ; ew = ew 5 8 70 0 5 8 ew 6 5 6 Retaed to use or doublg 9 0 Use o Multstep Metods Ma deret equatos possble wt deret orders ad errors Used or g accurac coputato requreets wt less coputer te Used g-accurac MATLAB solver ode Ruge-Kutta tpe etods easer to appl ad ca ave error cotrol or lower accurac requreets Etrapolato Metods Use Rcardso etrapolato or better estate ro results o two values o ostruct large step H betwee two values ad + H Subdvde H to saller steps = H/ opute teredate approatos to called z or te substep de Use Rcardso etrapolato or deret s Bulrsc-Stoer etod uses etrapolato ad ratoal ucto approato ME 09 Nuercal Aalss o Egeerg Sstes 7