Modeling and simulation of systems Numerical methods for solving of differential equations Slovak University of Technology Faculty of Material Science.

Slides:



Advertisements
Similar presentations
Chapter 6 Differential Equations
Advertisements

Basic Derivatives The Math Center Tutorial Services Brought To You By:
Numeriska beräkningar i Naturvetenskap och Teknik 1. Numerical differentiation and quadrature Discrete differentiation and integration Trapezoidal and.
Computational Methods in Physics PHYS 3437
Ordinary Differential Equations
Chapter 7 Numerical Differentiation and Integration
1cs542g-term Notes  Notes for last part of Oct 11 and all of Oct 12 lecture online now  Another extra class this Friday 1-2pm.
COMPUTER MODELS IN BIOLOGY Bernie Roitberg and Greg Baker.
Total Recall Math, Part 2 Ordinary diff. equations First order ODE, one boundary/initial condition: Second order ODE.
PART 7 Ordinary Differential Equations ODEs
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 32 Ordinary Differential Equations.
Numerical Integration CSE245 Lecture Notes. Content Introduction Linear Multistep Formulae Local Error and The Order of Integration Time Domain Solution.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 31 Ordinary Differential Equations.
Initial-Value Problems
8-1 Chapter 8 Differential Equations An equation that defines a relationship between an unknown function and one or more of its derivatives is referred.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW III.
TRANSCENDENTAL FUNCTIONS
Section 8.3 Slope Fields; Euler’s Method.  Calculus,10/E by Howard Anton, Irl Bivens, and Stephen Davis Copyright © 2009 by John Wiley & Sons, Inc. All.
Numerical Solutions of Ordinary Differential Equations
NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS
Math 3C Euler’s Method Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB.
CISE301_Topic8L31 SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2,
Numerical Solutions of Differential Equations Taylor Methods.
Numerical Solution of Ordinary Differential Equation
PART 7 Ordinary Differential Equations ODEs
Calculus and Analytic Geometry II Cloud County Community College Spring, 2011 Instructor: Timothy L. Warkentin.
Section 6.1: Euler’s Method. Local Linearity and Differential Equations Slope at (2,0): Tangent line at (2,0): Not a good approximation. Consider smaller.
A Numerical Technique for Building a Solution to a DE or system of DE’s.
Professor Walter W. Olson Department of Mechanical, Industrial and Manufacturing Engineering University of Toledo Solving ODE.
A Numerical Technique for Building a Solution to a DE or system of DE’s.
Boyce/DiPrima 9th ed, Ch 8.4: Multistep Methods Elementary Differential Equations and Boundary Value Problems, 9th edition, by William E. Boyce and Richard.
Simpson’s 1/3 rd Rule of Integration. What is Integration? Integration The process of measuring the area under a.
1 Simpson’s 1/3 rd Rule of Integration. 2 What is Integration? Integration The process of measuring the area under a curve. Where: f(x) is the integrand.
Erin Catto Blizzard Entertainment Numerical Integration.
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
Introduction This chapter gives you several methods which can be used to solve complicated equations to given levels of accuracy These are similar to.
Numerical Methods Applications of Loops: The power of MATLAB Mathematics + Coding 1.
5.1.  When we use the midpoint rule or trapezoid rule we can actually calculate the maximum error in the calculation to get an idea how much we are off.
Solving equations numerically The sign - change rule If the function f(x) is continuous for an interval a  x  b of its domain, if f(a) and f(b) have.
CHAPTER Continuity Euler’s Method Euler’s idea was to improve on linear approximation by proceeding only a short distance along the tangent line.
Numerical Solutions of ODE
OPERATIONS WITH DERIVATIVES. The derivative of a constant times a function Justification.
CHAPTER 3 NUMERICAL METHODS
Numerical Analysis – Differential Equation
Suppose we are given a differential equation and initial condition: Then we can approximate the solution to the differential equation by its linearization.
1 6.1 Slope Fields and Euler's Method Objective: Solve differential equations graphically and numerically.
Finding Linear Equations Section 1.5. Lehmann, Intermediate Algebra, 4ed Section 1.5Slide 2 Using Slope and a Point to Find an Equation of a Line Find.
Ch 8.2: Improvements on the Euler Method Consider the initial value problem y' = f (t, y), y(t 0 ) = y 0, with solution  (t). For many problems, Euler’s.
Linearization, Newton’s Method
Lecture 40 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
Ms. Battaglia AP Calculus. Estimate y(4) with a step size h=1, where y(x) is the solution to the initial value problem: y’ – y = 0 ; y(0) = 1.
Sec 21: Generalizations of the Euler Method Consider a differential equation n = 10 estimate x = 0.5 n = 10 estimate x =50 Initial Value Problem Euler.
1/14  5.2 Euler’s Method Compute the approximations of y(t) at a set of ( usually equally-spaced ) mesh points a = t 0 < t 1
Lecture 39 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
Dr. Mubashir Alam King Saud University. Outline Ordinary Differential Equations (ODE) ODE: An Introduction (8.1) ODE Solution: Euler’s Method (8.2) ODE.
Problem of the Day - Calculator Let f be the function given by f(x) = 2e4x. For what value of x is the slope of the line tangent to the graph of f at (x,
This chapter is concerned with the problem in the form Chapter 6 focuses on how to find the numerical solutions of the given initial-value problems. Main.
CISE301_Topic8L71 CISE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2,
Prepared by Vince Zaccone
Class Notes 18: Numerical Methods (1/2)
Class Notes 19: Numerical Methods (2/2)
Slope Fields; Euler’s Method
Local Linearity and Approximation
2.4 The Chain Rule.
Section Euler’s Method
Solutions to Systems of Equations
2-4: Writing Linear Equations Using Slope Intercept Form
Systems of Equations Solve by Graphing.
Reading Between the Lines!
Presentation transcript:

Modeling and simulation of systems Numerical methods for solving of differential equations Slovak University of Technology Faculty of Material Science and Technology in Trnava

Euler´s method we solve simple differential equation of first order y ’ = f(x,y),y(x 0 ) = y 0 when we know the value y n = y(x n ) solutions at the point x n and f(x n,y n ) = y ’ (x n ) is the directive of tangent to graph of solution at the point (x n,y n ) we can substitute the graph of solution by the line segment with directive f(x n,y n ) it means y n+1 = y(x n+1 ) = y n + h f(x n,y n ) for small? h on the interval  x n,x n +h 

Euler´s method y = e x Lack of Euler´s method – little precision.

Method of Runge-Kutta The enlargement of the precision of Euler´s method in the method of Runge-Kutta lies in searching of increasing of at several points on the interval  x n,x n+1  A = (x n,y n ) slope at A k 1 = h f(x n,y n ) B = (x n + h/2, y n + k 1 /2) slope at B k 2 = h f (x n + h/2, y n + k 1 /2) C = (x n + h/2, y n + k 2 /2) slope at C k 3 = h f (x n + h/2, y n + k 2 /2) D = (x n + h, y n + k 3 ) slope at D k 4 = h f (x n + h, y n + k 3 )

k1k1 k2k2 k3k3 k4k4 xnxn x n + h/2 x n+1 x n+1 + h/2 x n+2 A B C D Method of Runge-Kutta

Method of Runge-Kutta makes the increase – the value y n+1 as a linear combination k 1,k 2, k 3,k 4 Slope of function n = y n+1 - y n n = 1/6 (k 1 +2k 2 +2 k 3 +k 4 ) Accumulated error is not bigger than constant multiple h 5

Predictor-corrector method For the precise/exact value is in force: It is also necessary to know values of solution in several previous point, this follows from the formula. Let´s substitute integral for closed trapezoid formula : 1

Predictor-corrector method Let´s subsitute integral for opened trapezoid formula: 2 The first formula is more precise but is in implicit state. First of all we calculate the predictive value y n+1, 0 by help of the second formula. Then we set y ’ n+1,0 and finally we calculate reconstructive value y n+1, 1 according to relation 1. This method repeats until the difference of two calculated values is smaller than determined accuracy.

Prediction of value y n+1,0 Calculation y ‘ n+1,0 = f(x n+1, y n+1,0 ) 0j0j Calculation y ‘ n+1,j+1 = f(x n+1, y n+1,j ) Calculation of corrected value y n+1,j+1 y ‘ n+1,j+1 - y ‘ n+1,j  y n+1 = y n+1,j+1 y ‘ n+1 = y ‘ n+1,j+1 j+1  j A N Predictor-corrector method

Comparison of methods of numerical integration The method R-K does not call for additional primary values. There is the possibility to change the step of integration randomly. The methods P-C call for others primary values. It is generally needed to calculate the primary conditions for the new step at the change of the step of integration. The accuracy of both methods is approximately the same, often R-K are more precise than P-C of the same rule R-K needs at each step so much calculation of value f(x,y) as the rule of method. The methods P-C of the fourth rule usually demand two calculation – prediction and correction. That is why we can say that they are about faster twice as R-K of the same order.

The usage of methods of numerical integration How big is the local defect (error of method, rounding error...) How influence has the local error upon the results in the next step. Then it is necessary to notify the stability of the method. The necessity to know the primary conditions The speed of method

Example Calculate the value(1.5) of solution of differential equation y ’ =y x, if y(1)=2 and select step 0,1. y 0 =y(1) a y 1 =y(1.1) k 1 = h f(x 0,y 0 )= 0.1*2 1 =0.2

Example k 4 =h*f(x 0 +h,y 0 +k 3 )=0.1*( ) = y 1 =y 0 +1/6*(k 1 +2k 2 +2k 3 +k 4 )=...=2.219