Presentation on theme: "Dr. Jie Zou PHY 33201 Chapter 9 Ordinary Differential Equations: Initial-Value Problems Lecture (I) 1 1 Besides the main textbook, also see Ref.: “Applied."— Presentation transcript:
Dr. Jie Zou PHY 33201 Chapter 9 Ordinary Differential Equations: Initial-Value Problems Lecture (I) 1 1 Besides the main textbook, also see Ref.: “Applied Numerical Methods with MATLAB for Engineers and Scientists”, Steven Chapra, 2nd ed., Ch. 20, McGraw Hill, 2008.
Dr. Jie Zou PHY 33202 Outline Introduction: Some definitions Engineering and Scientific Applications One-step Runge-Kutta (RK) Methods (1) Euler’s Method The method (algorithm) Error analysis (next lecture) Stability (next lecture)
Dr. Jie Zou PHY 33203 Introduction: Some definitions Differential equation: An equation involving the derivatives or differentials of the dependent variable. Ordinary differential equation: A differential equation involving only one independent variable. Example: For the bungee jumper, Partial differential equation: A differential equation involving two or more independent variables (with partial derivatives). Order of a differential equation: The order of the highest derivative in the equation. Example: For an unforced mass-spring system with damping-a second-order equation:
4 Introduction: Some definitions (cont.) For an nth-order differential equation, n conditions are required to obtain a unique solution. Initial-value problem: All conditions are specified at the same value of the independent variable (e.g., at x or t = 0). Example: For the bungee jumper, Boundary-value problem: Conditions are specified at different values of the independent variable. Example: Particle in an infinite square well Initial Condition Fig. PT6.3 (Ref. by Chapra): Solutions for dy/dx = -2x 3 + 12x 2 – 20x + 8.5 with different constants of integration, C. Boundary Conditions
Dr. Jie Zou PHY 33205 Engineering and scientific applications Fig. PT6.1 (Ref. by Chapra): The sequence of events in the development and solution of ODEs for engineering and science.
6 Euler’s method Let’s look at the Bungee-Jumper’s example: Solve an ODE-initial-value problem (1) Step 1: Finite-difference approximation for dv/dt (2) Step 2: Substitute Eq. (2) in Eq. (1) (3) Step 3: Notice that dv/dt at t i = g- c d v(t i ) 2 /m, (3) becomes Euler’s method (a one-step method) Fig. 1.4 (Ref. by Chapra): Numerical solution by Euler’s method.
Dr. Jie Zou PHY 33207 Another look at Euler’s method Solving ODE: dy/dt = f(t,y) All one-step methods (Runge-Kutta methods) have the general form: : an increment function for extrapolating from an old value y i to a new value y i+1. One-step methods: use information from one pervious point i to extrapolate to a new value. h: Step size = t i+1 – t i. Euler’s method: = f(t i,y i ), the 1 st derivate of y at t i y i+1 = y i + f(t i,y i )h Fig. 20.1 (Ref. by Chapra): Euler’s method
Dr. Jie Zou PHY 33208 Example: Euler’s method Example 20.1 (Ref.): Use Euler’s method to integrate y’ = 4e 0.8t – 0.5y from t = 0 to t = 4 with a step size of 1. The initial condition at t = 0 is y = 2. Note that the exact solution can be determined analytically as y = (4/1.3)(e 0.8t – e -0.5t ) + 2e -0.5t
Dr. Jie Zou PHY 33209 Results ty true y Euler | t | (%) 02.00000 ---- 16.194635.0000019.28 214.8439211.4021623.19 333.6771725.5132124.24 475.3389656.8493124.54 Fig. 20.2 (Ref. by Chapra) Table 20.1 (Ref. by Chapra)