This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Using AD to solve BVPs in Matlab L.F. SHAMPINE Southern Methodist University and ROBERT KETZSCHER and SHAUN A. FORTH Cranfield University (Shrivenham Campus) The Matlab program bvp4c solves two–point boundary value problems (BVPs) of considerable generality. The numerical method requires partial derivatives of several kinds. To make solving BVPs as easy as possible, the default in bvp4c is to approximate these derivatives with finite differences. The solver is more robust and efficient if analytical derivatives are supplied. In this paper we investigate how to use automatic differentiation (AD) to obtain the advantages of analytical derivatives without giving up the convenience of finite differences. In bvp4cAD we have approached this ideal by a careful use of the MAD AD tool and some modification of bvp4c . Categories and Subject Descriptors: G.1.4 [ Quadrature and Numerical Differentiation ]: Automatic differentiation; G.1.7 [ Ordinary Differential Equations ]: Boundary value problems; G.4 [ Mathematical Software ]: Efficiency; G.4 [ Mathematical Software ]: Matlab General Terms: Performance Additional Key Words and Phrases: AD, BVP, Matlab 1. INTRODUCTION The Matlab [Matlab 2000] program bvp4c [Kierzenka and Shampine 2001] solves two–point boundary value problems (BVPs) of considerable generality. In particu- lar, it provides for unknown parameters and general nonlinear boundary conditions that may be non-separated. The collocation method of this program results in a system of nonlinear algebraic equations that is solved by a variant of Newton’s method. This involves a good many partial derivatives of several kinds. To make solving BVPs as easy as possible, bvp4c approximates these partial derivatives with finite differences. There is an option for providing functions to evaluate par- tial derivatives analytically and the documentation [Matlab 2000; Kierzenka and Shampine 2001; Shampine, L., Kierzenka, J. and Reichelt, M. ; Shampine et al. c ACM, (2004). This is the author’s version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in ACM Transactions on Mathematical Software , VOL 31, No. 1 (March 2005), pp79-94 http://doi.acm.org/10.1145/1055531.1055535 Author’s addresses: L.F. Shampine, Mathematics Department, Southern Methodist University, Dallas, TX 75275, U.S.A. Robert Ketzscher and Shaun A. Forth, Applied Mathematics & Opera- tional Research, Engineering Systems, Cranfield University (Shrivenham Campus), Swindon SN6 8LA, U.K. Permission to make digital/hard copy of all or part of this material without fee for personal or classroom use provided that the copies are not made or distributed for profit or commercial advantage, the ACM copyright/server notice, the title of the publication, and its date appear, and notice is given that copying is by permission of the ACM, Inc. To copy otherwise, to republish, to post on servers, or to redistribute to lists requires prior specific permission and/or a fee.to post on servers, or to redistribute to lists requires prior specific permission and/or a fee....
View Full Document
This note was uploaded on 10/16/2010 for the course L.C.SMITH MAE643 taught by Professor Xx during the Spring '10 term at Syracuse.
- Spring '10