Copyleft  2005 by Media Lab 1 11 1 Ordinary Differential Equations Boundary Value Problems.

Slides:



Advertisements
Similar presentations
Partial Differential Equations
Advertisements

SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L8&9 KFUPM.
Chapter 8 Elliptic Equation.
Chapter 2: Second-Order Differential Equations
Ordinary Differential Equations
Total Recall Math, Part 2 Ordinary diff. equations First order ODE, one boundary/initial condition: Second order ODE.
PART 7 Ordinary Differential Equations ODEs
Dr. Jie Zou PHY Chapter 9 Ordinary Differential Equations: Initial-Value Problems Lecture (I) 1 1 Besides the main textbook, also see Ref.: “Applied.
Chapter 4 Roots of Equations
Ch 5.2: Series Solutions Near an Ordinary Point, Part I
Part 6 Chapter 22 Boundary-Value Problems PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference Chapter 6 Basics of Finite Difference.
Lecture 34 - Ordinary Differential Equations - BVP CVEN 302 November 28, 2001.
Boundary-value Problems and Finite-difference Equations Douglas Wilhelm Harder, M.Math. LEL Department of Electrical and Computer Engineering University.
Math 3120 Differential Equations with Boundary Value Problems
Ordinary Differential Equations Final Review Shurong Sun University of Jinan Semester 1,
Ordinary Differential Equations S.-Y. Leu Sept. 21,28, 2005.
Solve the differential equation. y'' - 10y' + 74y = 0
Solve the differential equation. y'' - 6y' + 45y = 0
Warm Up Solve each equation for x. 1. y = x y = 3x – 4
Differential Equations and Boundary Value Problems
1 Chapter 6 Numerical Methods for Ordinary Differential Equations.
Algebra 1: Solving Equations with variables on BOTH sides.
The Finite Difference Method This section presents a quick overview bout the finite difference method. This method can be used to solve any partial differential.
Today’s class Boundary Value Problems Eigenvalue Problems
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
The Shooting Method for Boundary-value Problems
Lecture 35 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
Scientific Computing Partial Differential Equations Introduction and
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Scientific Computing Partial Differential Equations Implicit Solution of Heat Equation.
Boundary-Value Problems Boundary-value problems are those where conditions are not known at a single point but rather are given at different values of.
Numerical Methods for Solving ODEs Euler Method. Ordinary Differential Equations  A differential equation is an equation in which includes derivatives.
Introduction Examples of differential equations and related problems Analytical versus numerical solutions Ideas of numerical representations of solutions.
Boundary Value Problems l Up to this point we have solved differential equations that have all of their initial conditions specified. l There is another.
Numerical Methods.
Modelling & Simulation of Chemical Engineering Systems Department of Chemical Engineering King Saud University 501 هعم : تمثيل الأنظمة الهندسية على الحاسب.
Engineering Analysis – Computational Fluid Dynamics –
CHAPTER 3 NUMERICAL METHODS
Finite Deference Method
Numerical methods 1 An Introduction to Numerical Methods For Weather Prediction by Mariano Hortal office 122.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 271 Boundary-Value.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 27.
Advanced Engineering Mathematics, 7 th Edition Peter V. O’Neil © 2012 Cengage Learning Engineering. All Rights Reserved. CHAPTER 4 Series Solutions.
Section 4.1 Initial-Value and Boundary-Value Problems
1 Chapter 1 Introduction to Differential Equations 1.1 Introduction The mathematical formulation problems in engineering and science usually leads to equations.
Today’s class Ordinary Differential Equations Runge-Kutta Methods
Lecture 40 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
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.
UDS MTH:311 Differential Equations 1 ST TRIMESTER 2012/13 DR. Y. I. SEINI 2012.
Objective: Use factoring to solve quadratic equations. Standard(s) being met: 2.8 Algebra and Functions.
MA2213 Lecture 10 ODE. Topics Importance p Introduction to the theory p Numerical methods Forward Euler p. 383 Richardson’s extrapolation.
Substitution Method: Solve the linear system. Y = 3x + 2 Equation 1 x + 2y=11 Equation 2.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 / Chapter 5.
EEE 431 Computational Methods in Electrodynamics
Ordinary Differential Equations
1.5 Linear ODEs. Bernoulli Equation. Population Dynamics
Advanced Engineering Mathematics 6th Edition, Concise Edition
Chapter 3 Techniques of Differentiation
Advanced Numerical Methods (S. A. Sahu) Code: AMC 51151
Numerical Solutions of Ordinary Differential Equations
Boundary-Value Problems for ODE )בעיות הגבול(
Chapter 27.
Ch 5.2: Series Solutions Near an Ordinary Point, Part I
Numerical Analysis Lecture 37.
Numerical Analysis Lecture 38.
Numerical Methods on Partial Differential Equation
6th Lecture : Numerical Methods
Presentation transcript:

Copyleft  2005 by Media Lab Ordinary Differential Equations Boundary Value Problems

Copyleft  2005 by Media Lab Shooting Method for Solving Linear BVPs We investigate the second-order, two-point boundary-value problem of the form with Dirichlet boundary conditions Or Neuman boundary conditions Or mixed boundary condition

Copyleft  2005 by Media Lab Shooting Method for Solving Linear BVPs Simple Boundary Conditions The approach is to solve the two IVPs If the solution of the original two-point BVP is given by y(x) = u(x) + Av(x) is found from the requirement that y(b) = u(b) + Av(b) = y b 

Copyleft  2005 by Media Lab Shooting Method for Solving Linear BVPs EX14.1 convert to the pair of initial-value problems

Copyleft  2005 by Media Lab Shooting Method for Solving Linear BVPs General Boundary Condition at x = b The condition at x=b involves a linear combination of y(b) and y’(b) The approach is to solve the two IVPs If there is a unique solution, given by

Copyleft  2005 by Media Lab Shooting Method for Solving Linear BVPs General Boundary Condition at Both Ends of the Interval the approach is to solve two IVPs If, there is a unique solution, given by

Copyleft  2005 by Media Lab Shooting Method for Solving Linear BVPs Ex 14.4  Ex 14.5 

Copyleft  2005 by Media Lab Shooting Method for Solving NonLinear BVPs Nonlinear Shooting Based on the Secant Method use an iterative process based on the secant method presented in Chapter 2 the initial slope ‘t’, begin with u’(a) = t(1) = 0, error is m(1) Unless the absolute value of m(1) is less than the tolerance, we continue by solving eq.

Copyleft  2005 by Media Lab Shooting Method for Solving NonLinear BVPs EX 14.6  y = 1/(x+1)

Copyleft  2005 by Media Lab Shooting Method for Solving NonLinear BVPs Nonlinear Shooting Using Newton’s Method begin by solving the initial-value problem Check for convergence: if |m| < tol, stop; Otherwise, update t:

Copyleft  2005 by Media Lab Shooting Method for Solving NonLinear BVPs EX 14.8

Copyleft  2005 by Media Lab Finite Difference Method for Solving Linear BVPs Replace the derivatives in the differential equation by finite-difference approximations (discussed in Chapter 11). We now consider the general linear two-point boundary-value problem with boundary conditions To solve this problem using finite-differences, we divide the interval [a, b] into n subintervals, so that h=(b-a)/n. To approximate the function y(x) at the points we use the central difference formulas from Chapter 11:

Copyleft  2005 by Media Lab 13 Finite Difference Method for Solving Linear BVPs Substituting these expressions into the BVP and writing as ____ as and as gives Further algebraic simplification leads to a tridiagonal system for the unknowns viz. where and.

Copyleft  2005 by Media Lab 14 Finite Difference Method for Solving Linear BVPs Expanding this expression into the full system gives

Copyleft  2005 by Media Lab 15 Example 14.9 A Finite-Difference Problem Use the finite-difference method to solve the problem with y(0)=y(4)=0 and n=4 subintervals. Using the central difference formula for the second derivative, we find that the differential equation becomes the system. For this example, h = 1,i =1, y = 0, and i = 3, y = 0. Substituting this values, we obtain

Copyleft  2005 by Media Lab 16 Example 14.9 A Finite-Difference Problem Combining like terms and simplifying gives Solving, we find that y_1=13/7, y_2 = 18/7, and y_3 = 13/7. We note for comparison that the exact solution of this problem is

Copyleft  2005 by Media Lab 17 Example 14.9 A Finite-Difference Problem

Copyleft  2005 by Media Lab 18 Example A Matlab Script for a Linear FDP. The Matlab script that follows solves the BVP. function S_linear_FD aa = 0; bb = 3; n = 300; p = 2*ones(1, n-1); q = -2*ones(1, n-1); r = zeros(1, n-1); ya = 0.1; yb = 0.1*exp(3)*cos(3); h = (bb-aa)/n; h2 = h/2; hh= h*h; x = linspace(aa+h, bb, n); a = zeros(1, n-1); b = a; a(1:n-2) = 1 - p(1, 1:n-2)*h2; d = -(2 + hh*q); b(2:n-1) = 1 + p(1, 2:n-1)*h2; c(1) = hh*r(1) - (1+p(1)*h2)*ya; c(2:n-2) = hh*r(2:n-2); c(n-1) = hh*r(n-1) - (1 - p(n-1)*h2)*yb; y = Thomas(a, d, b, c) xx = [aa x]; yy = [ya y yb]; out = [xx' yy']; disp(out) plot(xx, yy), grid on, hold on plot(xx, 0.1*exp(xx).*cos(xx)) hold off

Copyleft  2005 by Media Lab 19 Example A Matlab Script for a Linear FDP.

Copyleft  2005 by Media Lab FDM for Solving Nonlinear BVPs We consider the nonlinear ODE-BVP of the form Assume that there are constants and such that Use a finite-difference grid with spacing and let denote the result of evaluating at using for. The ODE then becomes the system An explicit iteration scheme, analogous to the SOR method where and The process will converge for

Copyleft  2005 by Media Lab 21 Example Solving a Nonlinear BVP by Using FDM Consider again the nonlinear BVP We illustrate the use of the iterative procedure just outlined by taking a grid with h = ¼. The general form of the difference equation is where

Copyleft  2005 by Media Lab 22 Example Solving a Nonlinear BVP by Using FDM Substituting the rightmost expression for f_i into the equation for y_i, we obtain The computed solution after 10 iterations agrees very closely with the exact solution. function S_nonlinear_FD ya = 1; yb = 2; a = 0; b = 1; max_it = 10; n = 4; w = 0.1; ww = 1/(2*(1+w)); h = (b-a)/n y(1:n-1) = 1 for k = 1:max_it y(1) = ww*(ya+2*w*y(1)+y(2)+(ya^2-2*ya*y(2)+y(2)^2)/(4*y(1))); y(2) = ww*(y(1)+2*w*y(2)+y(3)+(y(1)^2-2*y(1)*y(3)+y(3)^2)/(4*y(2))); y(3) = ww*(y(2)+2*w*y(3)+yb+(y(2)^2-2*y(2)*yb+yb^2)/(4*y(3))); end x = [ a a+h a+2*h a+3*h b ]; z = [ ya y yb ]; plot(x, z), hold on, zz = sqrt(3*x+1); plot(x, zz), hold off

Copyleft  2005 by Media Lab 23 Example Solving a Nonlinear BVP by Using FDM