matlab to solve BVP - Using AD to solve BVPs in Matlab L.F...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
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.
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern