A Study on Numerical Exact Solution of Euler, Improved Euler and Runge - Kutta Method

Similar documents
(Part - 1) P. Sam Johnson. April 14, Numerical Solution of. Ordinary Differential Equations. (Part - 1) Sam Johnson. NIT Karnataka.

over The idea is to construct an algorithm to solve the IVP ODE (8.1)

over The idea is to construct an algorithm to solve the IVP ODE (9.1)

ChE 400: Applied Chemical Engineering Calculations Tutorial 6: Numerical Solution of ODE Using Excel and Matlab

Ordinary Differential Equations

Euler s Methods (a family of Runge- Ku9a methods)

Module1: Numerical Solution of Ordinary Differential Equations. Lecture 6. Higher order Runge Kutta Methods

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

Mathematical Methods and Modeling Laboratory class. Numerical Integration of Ordinary Differential Equations

Finite difference methods

ODE IVP. An Ordinary Differential Equation (ODE) is an equation that contains a function having one independent variable:

Ordinary differential equations solving methods

Euler s Method for Approximating Solution Curves

4 Visualization and. Approximation

MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations)

Mathematics for chemical engineers

Computation of Velocity, Pressure and Temperature Distributions near a Stagnation Point in Planar Laminar Viscous Incompressible Flow

The listing says y(1) = How did the computer know this?

Simulation in Computer Graphics. Particles. Matthias Teschner. Computer Science Department University of Freiburg

16.1 Runge-Kutta Method

ODEs occur quite often in physics and astrophysics: Wave Equation in 1-D stellar structure equations hydrostatic equation in atmospheres orbits

Module 2: Single Step Methods Lecture 4: The Euler Method. The Lecture Contains: The Euler Method. Euler's Method (Analytical Interpretations)

Math 133A, September 10: Numerical Methods (Euler & Runge-Kutta) Section 1: Numerical Methods

Approximate Solutions to Differential Equations Slope Fields (graphical) and Euler s Method (numeric) by Dave Slomer

Numerical Methods for Differential Equations Contents Review of numerical integration methods Rectangular Rule Trapezoidal Rule Simpson s Rule How to

Homework 14 solutions

Math 225 Scientific Computing II Outline of Lectures

LAB #8 Numerical Methods

APPROXIMATION AND COMPARISON OF ORDINARY DIFFERENTIAL EQUATION USING BY NEW ITERATION METHODS

MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations)

Homework Set 5 (Sections )

Direction Fields; Euler s Method

Thursday 1/8 1 * syllabus, Introduction * preview reading assgt., chapter 1 (modeling) * HW review chapters 1, 2, & 3

Using Modified Euler Method (MEM) for the Solution of some First Order Differential Equations with Initial Value Problems (IVPs).

Homework Set #2-3, Math 475B

Review Initial Value Problems Euler s Method Summary

MATH2071: LAB 2: Explicit ODE methods

An Educational Rigid-Body Dynamics Physics Engine TJHSST Senior Research Project Proposal Computer Systems Lab

Application 2.4 Implementing Euler's Method

Math Lab 6: Powerful Fun with Power Series Representations of Functions Due noon Thu. Jan. 11 in class *note new due time, location for winter quarter

Dynamic Computation of Runge-Kutta s Fourth-Order Algorithm for First and Second Order Ordinary Differential Equation Using Java

99 International Journal of Engineering, Science and Mathematics

dy = dx y dx Project 1 Consider the following differential equations: I. xy II. III.

Given are two refracting media separated by a spherical surface. From the point O an arbitrary ray OM is emitted (Fig 1). This ray is refracted at

A MIXED QUADRATURE FORMULA USING RULES OF LOWER ORDER

Isn t it Saturday? IMO Trainning Camp NUK, 2004_06_19 2

Unit 3 Functions of Several Variables

Module 4 : Solving Linear Algebraic Equations Section 11 Appendix C: Steepest Descent / Gradient Search Method

From the output we see that the largest eigenvalue of B is about (ii) Use the inverse power method to find the smallest eigenvalue.

The Design and Implementation of a Modeling Package

Mid-Year Report. Discontinuous Galerkin Euler Equation Solver. Friday, December 14, Andrey Andreyev. Advisor: Dr.

Mass-Spring Systems. Last Time?

Modelling and Simulation for Engineers

Exam 2 Review. 2. What the difference is between an equation and an expression?

Euler s Method with Python

Modeling & Simulation of Supersonic Flow Using McCormack s Technique

Keywords: Algorithm, Sieve, Prime Number Mathematics Subject Classification (MSC) 2010 : 11Y11, 11Y16, 65Y04, 65Y20, 68Q25

x n x n stepnumber k order r error constant C r+1 1/2 5/12 3/8 251/720 abs. stab. interval (α,0) /11-3/10

A Deterministic Dynamic Programming Approach for Optimization Problem with Quadratic Objective Function and Linear Constraints

The jello cube. Undeformed cube. Deformed cube

Tangent line problems

Jim Lambers MAT 169 Fall Semester Lecture 33 Notes

Section 1.1 The Distance and Midpoint Formulas

Numerical Integration

Upgraded Swimmer for Computationally Efficient Particle Tracking for Jefferson Lab s CLAS12 Spectrometer

The Jello Cube Assignment 1, CSCI 520. Jernej Barbic, USC

Application 7.6A The Runge-Kutta Method for 2-Dimensional Systems

PDF NUMERICAL METHODS TEMOTHY SOLUTIONS PRODUCT CATALOG

7.1 First-order initial-value problems

POLYMATH Example for the Numerical Solution of ODEs

Excel Scientific and Engineering Cookbook

ORTHOGONAL FAMILIES OF CURVES

Problem Exam Review ER-1. (E & P Exercise 2.4-6, Symbolic Solution)

Suppose we want to find approximate values for the solution of the differential equation

Differentiation. The Derivative and the Tangent Line Problem 10/9/2014. Copyright Cengage Learning. All rights reserved.

Studies of the Continuous and Discrete Adjoint Approaches to Viscous Automatic Aerodynamic Shape Optimization

Workpackage 5 - Ordinary Differential Equations

Excel for Chemists. Second Edition

Image Denoising Using Mean Curvature of Image Surface. Tony Chan (HKUST)

The Bisection Method versus Newton s Method in Maple (Classic Version for Windows)

37 Self-Assessment. 38 Two-stage Runge-Kutta Methods. Chapter 10 Runge Kutta Methods

Numerical Solutions of Differential Equations (1)

Finding the Maximum or Minimum of a Quadratic Function. f(x) = x 2 + 4x + 2.

Linear and quadratic Taylor polynomials for functions of several variables.

GUJARAT TECHNOLOGICAL UNIVERSITY B.E Semester: 4 Information Technology

MGM S JAWAHARLAL NEHRU ENGINEERING COLLEGE N-6, CIDCO, AURANGABAD LAB MANUALS SUB: COMPUTER LAB-II CLASS: S.E.CIVIL

LECTURE 13, THURSDAY APRIL 1, 2004

AP Calculus BC Course Description

Speed of Light in Glass

Analyzing Change: Extrema and Points of Inflection & 5.1 Optimization

Directional Derivatives as Vectors

Solve Non-Linear Parabolic Partial Differential Equation by Spline Collocation Method

Deccan Education Society s

" n=0 n!(2n +1) Homework #2 Due Thursday, October 20, 2011

On the thickness of discontinuities computed by THINC and RK schemes

=.1( sin(2πx/24) y) y(0) = 70.

Euler and improved Euler using SAGE

CHAPTER 6 Parametric Spline Curves

Data Visualization. Fall 2017

Line Drawing Week 6, Lecture 9

Transcription:

A Study on Numerical Exact Solution of Euler, Improved Euler and Runge - Kutta Method Mrs. P. Sampoornam P.K.R Arts College for Women, Gobichettipalayam Abstract: In this paper, I will discuss the Runge Kutta method of solving simple linear differential equations. I start by starting why the Runge Kutta method is idea for solving simple linear differential equations numerically in comparison to move elementary methods. I will then proceed to explain what steps the method actually carries out in solving the differential equation along with the high level programming language code, I used to write a simple Runge Kutta solver and the output of the code, given some basic differential equations. I will then end by discussing the method is used to some examples to illustrate the accuracy and the implementation of the method. Keywords: Euler, Improved Euler, Runge -Kutta. 1. INTRODUCTION [2]Carl David Runge(1856-1927), German mathematician and Physicist, worked for many years in spectroscopy. The analysis of data led him to consider problems in numerical computation, and the Runge Kutta method originated in his paper on the numerical solution of differential equations in 1895. The method was extended to system of equations in 1901 by M.Wilhelm Kutta (1867-1944). Kutta was a German mathematician and aerodynamicist who is also well known for his important contributions to classical airfoil theory. In this work, We have develop High Level Programming Language to solve them to get exact value and approximated value by Euler, improved Euler and Runge Kutta fourth order method. We have then compared the accuracy of the results obtained by Heun s method(improved Euler method) and R-K fourth order method. We have also studied the whether the accuracy obtained by R-K fourth order method can be achieved by Heun s method by increasing the number of intervals. [1] We consider the differential equation With the initial condition y = f(x,y) (1.1) y(x 0 ) = y 0 2. EULER METHOD:[1][2][3] [3] The first attempt to solve a differential equation numerically was made by Euler about 1768.He used what is now called the tangent line method. Since x 0 & y 0 are known the slope of the line tangent to the solution at t = t 0,namely φ (t 0 )=f(t 0, y 0 ), is also known. Hence we can construct the tangent line to the solution at t 0, and then obtain an approximate value y 1 of φ(t 1 ) by moving along the tangent line from t 0 to t 1. Thus y 1 =y 0 + φ (t 0 )(t 1 -t 0 ) =y 0 +f(t 0,y 0 )(t 1 -t 0 ) (1.2) Obtain an approximation value y2 of φ(t 2 ) by moving along the tangent line from t1 to t 2. y 2 =y 1 +f(t 1,y 1 ) (t 2 -t 1 ) (1.3) Page 1

Continuing in this manner,in general formula for the euler approximation is We assume, t n+1 =t n +h We get y n+1 =y n +hf(t n,y n ) y n+1 =y n +f(t n,y n )(t n+1 -t n ) (1.4) =y n +hf n (1.5) Usually, the equ(1.5) is the better one by far, We discusses several algorithms that are vastly superior to the Euler method. In the meantime, It is easy to write a computer program to carry one the calculations required to produce the results in Table 1. The outline of the programmed for euler method is given below. STEP 6: k1 = f(t,y) y = y+h*k 1 Therefore, The calculation result can be displayed in graphical form, there are several excellent software packages that do this automatically, they can be very helpful in visualizing the behavior of solutions of differential equations. Therefore, The analytical solution is not available if a numerical procedure is to be employed. EXAMPLE 1: Result for the numerical solution of y =1-t+4y, y(0)=1.using the Euler method for differential step sizes h. Solution: We consider the Euler formula as, y n+1 =y n +hf n,n=0,1,2. To use high level programming language and derive the exact solution table in Euler method. Table 1 Euler method t h=0.1 h=0.05 h=0.025 h=0.01 Exact 0.1 1.5000000 1.5475000 1.5761188 1.5952901 1.6090418 0.2 2.1900000 2.3249000 2.4080117 2.4644587 2.5053299 0.3 3.1460000 3.4333560 3.6143837 3.7390345 3.8301388 0.4 4.4744000 5.0185326 5.3690304 5.6137120 5.7942260 0.5 6.3241600 7.2901870 7.9264062 8.3766865 8.7120041 0.6 8.9038240 10.550369 11.659058 12.454558 13.052522 0.7 12.505354 15.234032 17.112430 18.478797 19.515518 0.8 17.537495 21.967506 25.085110 27.384136 29.144880 0.9 24.572493 31.652708 36.746308 40.554208 43.497903 1.0 34.411490 45.588400 53.807866 60.037126 64.897803 Page 2

3. IMPROVED EULER METHOD: We have that the Euler method is not sufficiently accurate to be an efficient problem solving procedure, so this method is to develop more accurate methods. Improved Euler method formula: y n+1 =y n +f n + h (2.1) By using computer programming code is to be the outline of the programmed is given below. In the meantime, It is easy to write a computer program to carry one the calculations required to produce the results in Table 2. The Improved Euler method: STEP 6: k 1 = f(t,y) k 2 = f(t+h,y+h*k 1 ) y=y+(h\2)*(k 1 +k 2 ) EXAMPLE 2: A comparison of result using the linear and improved euler methods for the initial value problem y =1-t- 4y, y(0)=1. Solution: Euler Table 2 Improved Euler Method Improved Euler t h=0.05 h=0.025 h=0.1 h=0.05 Exact 0.1 1.5475000 1.5761188 1.5950000 1.6049750 1.6090418 0.2 2.3249000 2.4080117 2.4636000 2.4932098 2.5053299 0.3 3.4333560 3.6143837 3.7371280 3.8030484 3.8301388 0.4 5.0185326 5.3690304 5.6099494 5.7404023 5.7942260 0.5 7.2901870 7.9264062 8.3697252 8.6117498 8.7120041 0.6 10.550369 11.659058 12.442193 12.873253 13.052522 0.7 15.234032 17.112430 18.457446 19.203865 19.515518 0.8 21.967506 25.085110 27.348020 28.614138 29.144880 0.9 31.652708 36.746308 40.494070 42.608178 43.497903 1.0 45.588400 53.807866 59.938223 63.424698 64.897803 This method gives the exact solution, the percentage errors at t=0.5 and t=1.0 are 1.15% & 2.3% respectively. Page 3

4. THE RUNGE- KUTTA METHOD We have introduced the Euler formula, the improved Euler formula, and the three term Taylor formula as ways to solve the initial value numerically as, y =f(t,y),y(t 0 )=y 0 (3.1) Therefore, the Runge- Kutta formula involves the value of f(t,y) at different points in the interval t n t t n+1. It gives, yn+1=yn+ (3.2) Where k n1 =f(t n,y n ), kn2=f(t n + ), k n3 =f(t n +, kn4=f(t n +h,y n +hk n3 ). (3.3) The sum (k n1 +2k n2 +2k n3 +k n4 )/6 is an average slope. k n1 =slope at the left end of the interval k n2 =slope at the midpoint using the Euler formula k n3 =2 nd approximation to the slope at the midpoint k n4 =the slope at t n +h using Euler formula and the slope k n3 to go from t n to t n +h. Clearly the R-K formula equ (3.2) & (3.3), is more complicated than any of the formulas discussed previously.however, it is not hard to write computer program to implement this method. By using same structure as the algorithm for the Euler method. Step 6 in Euler algorithm must be replaced as follows: STEP 6: k 1 = f(t,y) k 2 =f(t+0.5*h,y+0.5*h*k 1 ) k 3 = f(t+0.5*h,y+0.5*h*k 2 ) k 4 =f(t+h,y+h*k 3 ) y=y+(h\6)*(k 1 +2*k 2 +2*k 3 +k 4 ) EXAMPLE 3: A Comparison of result for the numerical solution of the initial value problem y =1-t+4y, y(0)=1. Solution: Taking h=0.2 we ve k 01 =f(0,1)=5 ; hk01=1.0 k 02 =f(0+0.1,1+0.5)=6.9 ; hk02=1.38 k 03 =f(0+0.1,1+0.69)=7.66 ; hk03=1.532 k 04 =f(0+0.2,1+1.532)=10.928 Page 4

Thus y 1 =1+ [5+2(6.9)+2(7.66)+10.928)]=1+1.5016=2.5016 Table 3 Runge Kutta Method Euler Improved Euler Runge Kutta t h=0.1 h=0.1 h=0.2 h=0.1 Exact 0.1 1.5000000 1.5950000 1.6089333 1.6090418 0.2 2.1900000 2.4636000 2.5016000 2.5050062 2.5053299 0.3 3.1460000 3.7371280 3.8294145 3.8301388 0.4 4.4744000 5.6099494 5.7776358 5.7927853 5.7942260 0.5 6.3241600 8.3697252 8.7093175 8.7120041 0.6 8.9038240 12.442193 12.997178 13.047713 13.052522 0.7 12.505354 18.457446 19.507148 19.515518 0.8 17.537495 27.348020 28.980768 29.130609 29.144880 0.9 24.572493 40.494070 43.473954 43.497903 1.0 34.411490 59.938223 64.441579 64.858107 64.897803 Further result using the R-k method with h=0.2 and with h=0.1 give in Table 3. Comparison of the value by Euler & Improved Euler methods are also in Table3.The R-K method yield a value at t=1. (i) (ii) This t value differ from the exact solution by only 10%, the step size is h=0.2 0.06% is the exact solution of h=0.1 only Therefore, the R-K method with 10 steps is better than the improved euler method with 100 steps and also have that for h=0.01 the R-K method yields essentially the exact value of φ(1). 5. CONCLUSION In this paper, We could successfully use the high level programming techniques which make the exact solution of the Runge Kutta method is easy fos us.it does not need thd difficult calculation. REFERENCES [1] B. Rai, D.P. Choudhury, H.I. Freedman, A Course in Ordinary Differential Equations,2002 Narosa Publishing House, Reprint 2004- Revised. [2] William E.Boyce,Richard C.Diprima,Elementary Differential Equations and Boundary value problems,6 th ed, 1997,by John Wiley & Sons,Inc. [3] http://en.wikipedia.org/wiki/runge-kutta. Page 5