전자 전기 공학과 최선미 Example 9.2 a) Solve using the forward Euler method using h=0.01 for o this part by hand calculation. b ) Repeat the same for h=0,01,0,001,0,0001.

Slides:



Advertisements
Similar presentations
Courant and all that Consistency, Convergence Stability Numerical Dispersion Computational grids and numerical anisotropy The goal of this lecture is to.
Advertisements

Chapter 6 Differential Equations
MATLAB EXAMPLES Initial-value problems
Modeling Basics: 4. Numerical ODE Solving In Excel 5. Solving ODEs in Mathematica By Peter Woolf University of Michigan Michigan Chemical Process Dynamics.
HAMPIRAN NUMERIK SOLUSI PERSAMAAN DIFERENSIAL (lanjutan) Pertemuan 12 Matakuliah: METODE NUMERIK I Tahun: 2008.
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Prof. Chung-Kuan Cheng 1.
Functions.
PART 7 Ordinary Differential Equations ODEs
CSE245: Computer-Aided Circuit Simulation and Verification Lecture Note 5 Numerical Integration Spring 2010 Prof. Chung-Kuan Cheng 1.
CVEN Computer Applications in Engineering and Construction Dr. Jun Zhang.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 31 Ordinary Differential Equations.
Constrained Fitting Calculation the rate constants for a consecutive reaction with known spectrum of the reactant A = (A A + A B + A C ) + R = C E T =
Euler’s Method Illustrated: A Sleepy Example Narrated by: Eric Gauthier and Kevin Lin.
Higher order ODE’s and systems of ODE’s Recall: any higher ODE a system of first order ODEs How to solve? - same as before only more steps.
CISE301_Topic8L31 SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2,
Numerical Solution of Ordinary Differential Equation
8/8/ Euler Method Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker
PART 7 Ordinary Differential Equations ODEs
Numerical Solutions to ODEs Nancy Griffeth January 14, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis.
Computational Physics Differential Equations
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
Chapter One: Measurement 11.1 Measurements 11.2 Time and Distance 11.3 Converting Measurements 11.4 Working with Measurements.
An Over View of Runge-Kutta Fehlberg and Dormand and Prince Methods. Numerical Methods To Solve Initial Value Problems William Mize.
Scientific Computing Numerical Solution Of Ordinary Differential Equations - Euler’s Method.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. ~ Ordinary Differential Equations ~ Stiffness and Multistep.
Programming assignment #2 Solving a parabolic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 261 Stiffness.
11/16/ Euler Method Electrical Engineering Majors Authors: Autar Kaw, Charlie Barker
11/17/ Shooting Method Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker
Test Corrections You may correct your test. You will get back 1/3 of the points you lost if you submit correct answers. This work is to be done on your.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
Engineering Analysis – Computational Fluid Dynamics –
© Imperial College London Numerical Solution of Differential Equations 3 rd year JMC group project ● Summer Term 2004 Supervisor: Prof. Jeff Cash Saeed.
Circuits Theory Examples Newton-Raphson Method. Formula for one-dimensional case: Series of successive solutions: If the iteration process is converged,
Arclength & Approximating Integrals. Solution: We plot the graph for convenience. We obtain the formula:
Suppose we are given a differential equation and initial condition: Then we can approximate the solution to the differential equation by its linearization.
1 Quadratic formula. y 2 Quadratic formula: Geometric interpretation Solve x 0.
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.
Math 3120 Differential Equations with Boundary Value Problems
Dr. Mujahed AlDhaifallah ( Term 342)
2/28/ Runge 4 th Order Method Computer Engineering Majors Authors: Autar Kaw, Charlie Barker
Why Repetition? Read 8 real numbers and compute their average REAL X1, X2, X3, X4, X5, X6, X7, X8 REAL SUM, AVG READ *, X1, X2, X3, X4, X5, X6, X7, X8.
Solving Ordinary Differential Equations
The exact values can be found by solving the equations simultaneously
Computer Engineering Majors Authors: Autar Kaw, Charlie Barker
nth Roots and Rational Exponents
Mechanical Engineering at Virginia Tech
Naïve Gauss Elimination Pitfalls
Section Euler’s Method
Numerical Approximation
Warmup Solve:
Solving Equations with variables on each side
Finding A Better Final Discretized Equation
Civil Engineering Majors Authors: Autar Kaw, Charlie Barker
Chapter 1: The Nature of Analytical Chemistry
Chapter 2 Section 2.
Ordinary differentiall equations
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L2.
Electrical Engineering Majors Authors: Autar Kaw, Charlie Barker
Assignment 1: due 1/17/19 Estimate all of the zero of x3-x2-2x+1 graphically. Write a MatLab code for Newton’s method. Use your code to refine the graphical.
Using the Quadratic Formula to Solve Quadratic Equations
Exercise Every positive number has how many real square roots? 2.
Numerical Computation and Optimization
Implicit and Explicit Runge-Kutta methods
Chemical Engineering Majors Authors: Autar Kaw, Charlie Barker
Naïve Gauss Elimination Pitfalls
Types of Errors And Error Analysis.
REPETITION Why Repetition?
Presentation transcript:

전자 전기 공학과 최선미 Example 9.2 a) Solve using the forward Euler method using h=0.01 for o this part by hand calculation. b ) Repeat the same for h=0,01,0,001,0,0001 on a computer for Evaluate errors of the three calculations by comparison to the analytical solution given by The Exact Solution is

REAL T,Y,H,EXACT,Error PARAMETER(U=20) PRINT *,'ODE BY Forword EULER METHOD' DATA T,Y,H /0.0,5.0,0.01/ PRINT *,' T Y EXAXCT ERROR' 1 FORMAT(F10.5,F10.5,F10.5,F10.5) OPEN(U,FILE='ANSWER1.TXT') WRITE(U,*)'ODE BY Forword EULER METHOD' WRITE(U,*)' T Y EXACT ERROR' WRITE(U,*)' ' DO 10 N=1,9 Y=Y+H*(7*EXP(-0.5*T)-20*Y) T=T+H EXACT=5*EXP(-20*T)+7/19.5*(EXP(-0.5*T)-EXP(-20*T)) Error=Y-EXACT PRINT 1,T,Y,EXACT,Error WRITE(U,1)T, Y,EXACT,Error 10 CONTINUE STOP END

ODE BY Forword EULER METHOD T Y EXACT ERROR ODE BY Forword EULER METHOD T Y EXACT ERROR ODE BY Forword EULER METHOD T Y EXACT ERROR Forward Euler dt=0.01) Forward Euler dt=0.0001)Forward Euler dt=0.001)

By using Fortran

ErrorAll Figure By using Fortran

By explicit Euler dt=0.0001) By explicit Euler dt=0.0005) By using Mathematica Forward Euler dt=0.01)Forward Euler dt=0.001) Forward Euler dt=0.0001)

ErrorAll Figure By using Mathematica