Numeriska beräkningar i Naturvetenskap och Teknik 1. Numerical differentiation and quadrature Discrete differentiation and integration Trapezoidal and.

Slides:



Advertisements
Similar presentations
Ordinary Differential Equations
Advertisements

Chapter 6 Differential Equations
Today’s topic: Some Celestial Mechanics F Numeriska beräkningar i Naturvetenskap och Teknik.
The topic: Least squares method Numeriska beräkningar i Naturvetenskap och Teknik.
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L8&9 KFUPM.
Numeriska beräkningar i Naturvetenskap och Teknik Today’s topic: Some Celestial Mechanics F.
Numeriska beräkningar i Naturvetenskap och Teknik 1.Solving equations.
Numeriska beräkningar i Naturvetenskap och Teknik Today’s topic: Approximations Least square method Interpolations Fit of polynomials Splines.
Ordinary Differential Equations
Lecture 18 - Numerical Differentiation
11 September 2007 KKKQ 3013 PENGIRAAN BERANGKA Week 10 – Ordinary Differential Equations 11 September am – 9.00 am.
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.
Numerical Solutions of Ordinary Differential Equations
NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS
Differential Equations and Boundary Value Problems
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Numerical Solution of Ordinary Differential Equation
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 10. Ordinary differential equations. Initial value problems.
-S.SIVARAJA Dept of MATHEMATICS.  N-NUMERICAL  M-METHODS EASY TO LEARN & EASY TO SCORE.
Professor Walter W. Olson Department of Mechanical, Industrial and Manufacturing Engineering University of Toledo Solving ODE.
1 Numerical Analysis Lecture 12 Numerical Integration Dr. Nader Okasha.
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
AP Calculus 2005: 240,000 Currently growing at ~13,000/year.
Introduction to the Runge-Kutta algorithm for approximating derivatives PHYS 361 Spring, 2011.
Solving Linear Systems by Substitution
PHY 301: MATH AND NUM TECH Contents Chapter 10: Numerical Techniques I. Integration A.Intro B.Euler  Recall basic  Predictor-Corrector C. Runge-Kutta.
Today’s class Ordinary Differential Equations Runge-Kutta Methods
Ordinary Differential Equations
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.
Lecture 39 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Ordinary Differential Equations (ODEs). Objectives of Topic  Solve Ordinary Differential Equations (ODEs).  Appreciate the importance of numerical methods.
Quadrature – Concepts (numerical integration) Don Allen.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 21 Numerical Differentiation.
Part 7 - Chapter 25.
NUMERICAL DIFFERENTIATION Forward Difference Formula
Integrators of higher order
Ordinary Differential Equations
Advanced Numerical Methods (S. A. Sahu) Code: AMC 51151
Numerical Solution of Ordinary Differential Equation
525602:Advanced Numerical Methods for ME
Class Notes 18: Numerical Methods (1/2)
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L4&5.
Class Notes 19: Numerical Methods (2/2)
Section Euler’s Method
Solve a system of linear equation in two variables
Numerical Analysis Lecture 45.
Civil Engineering Majors Authors: Autar Kaw, Charlie Barker
Ordinary differential equaltions:
Part 7 - Chapter 25.
Numerical Integration:
WELCOME TO MY CLASS NUMERICAL METHOD Name : Masduki
Numerical Analysis Lecture 37.
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L2.
Numerical Analysis Lecture 38.
Numerical solution of first-order ordinary differential equations
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L6.
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L3 KFUPM.
Electrical Engineering Majors Authors: Autar Kaw, Charlie Barker
Numerical Computation and Optimization
Chemical Engineering Majors Authors: Autar Kaw, Charlie Barker
MATH 2140 Numerical Methods
CISE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L1 KFUPM.
Numerical solution of first-order ordinary differential equations 1. First order Runge-Kutta method (Euler’s method) Let’s start with the Taylor series.
CISE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L6 KFUPM.
Presentation transcript:

Numeriska beräkningar i Naturvetenskap och Teknik 1. Numerical differentiation and quadrature Discrete differentiation and integration Trapezoidal and Simpson’s rules 2. Ordinary differential equations Euler’s method, Runge-Kutta methods 3. Systems of differential equations 4. Initial value and boundary problem Shooting method

Numerical differentiation och quadratur Numeriska beräkningar i Naturvetenskap och Teknik Function f(x) in three points:x 0 -h, x 0, x 0 +h

Numeriska beräkningar i Naturvetenskap och Teknik Derivative f in the points: x 0 ±h Taylor expansion around x 0 =0 gives Maclaurin:

Numeriska beräkningar i Naturvetenskap och Teknik Derivative with Taylor expansion Difference Derivative in three point form Local error

Numeriska beräkningar i Naturvetenskap och Teknik “Forward difference” Compare to the defintion of the derivative : Local error In the same way:

Numeriska beräkningar i Naturvetenskap och Teknik Quadrature: Trapetzoidal rule Linear interpolation

Numeriska beräkningar i Naturvetenskap och Teknik Trapetzoidal rule Area between x-h and x+h hh f -1 f1f1 f0f0

Numeriska beräkningar i Naturvetenskap och Teknik Trapetzoidal rule with error estimate: f -1 f0f0 f1f1 h h

Numeriska beräkningar i Naturvetenskap och Teknik f -1 f0f0 f1f1 h h Simpson’s rule: Approximate by Taylor expansion Integrated over x gives 0

Numeriska beräkningar i Naturvetenskap och Teknik Ordinary differential equations An ordinary differential equation is defined as: First order Second order

Numeriska beräkningar i Naturvetenskap och Teknik Euler’s method, discrete solution of first order ordinary diff. equations Based on the “forward difference” given above: which gives:

Numeriska beräkningar i Naturvetenskap och Teknik Runge-Kutta methods Start by integrating between step n and n+1 Taylor series for f(x,y) around the central point n+1/2 Integrate:

Numeriska beräkningar i Naturvetenskap och Teknik i.e.

Numeriska beräkningar i Naturvetenskap och Teknik Now one needs an estimate of f n+1/2 in the expression: Use Euler! At half way between points: i.e. with: Runge-Kutta of order 2 is given by:

Numeriska beräkningar i Naturvetenskap och Teknik Runge-Kutta of order 2 y n+1 to order h 3 at the cost of calculating f(x,y) in two points. Geometrical picture: x y

Numeriska beräkningar i Naturvetenskap och Teknik Runge-Kutta error of order 4 > rk3

Numeriska beräkningar i Naturvetenskap och Teknik Runge-Kutta error of order 5 > rk4

Numeriska beräkningar i Naturvetenskap och Teknik Higher order ordinary differential equations Can be solved as a system of first order equations by substitution: So, an ordinary differential equation of order n can be solved numerically by e.g. RK4 as defined for a first order ordinary differential equation.

Numeriska beräkningar i Naturvetenskap och Teknik condition on y’ Conditions A differential equation of order n is completely determined only if n conditions are are given for the solution. Compare to the simple differential equation: Initial value problems condition on y Conditions given for the same value of the independent variable. An example for the case above is: y’(0)=2, y(0)=0. In classical mechanics this could e.g. correspond to knowing the position and velocity at a given time.

Numeriska beräkningar i Naturvetenskap och Teknik Boundary value problems In this case one knows the value of the function (and/or its derivatives) for different values of the independent variable. An exemple from physics is the case of a second order differential equation : There are several ways of solving this problem numerically. A simple method is to transfer the problem to become an initial value problem: and find values for γ that gives solutions that ”shoot over” or ”under” the boundary value in point b. The value forγ which gives a value for y(b) within a given accuracy from βis then solved for. This method is called the “shooting method”. See page 329…

Numeriska beräkningar i Naturvetenskap och Teknik Bounary value problem

Numeriska beräkningar i Naturvetenskap och Teknik Boundary value problem dvs

Numeriska beräkningar i Naturvetenskap och Teknik Boundary value problem

Numeriska beräkningar i Naturvetenskap och Teknik Exemple; solve with Euler’s method and RK4 and study precision Note that the solution is: …possibly another function

Numeriska beräkningar i Naturvetenskap och Teknik Example, second order equation transferred to system

Numeriska beräkningar i Naturvetenskap och Teknik Exemple, boundary value problem