6.6 Euler's Method

Total Page:16

File Type:pdf, Size:1020Kb

6.6 Euler's Method 6.6 Euler’s Method Leonhard Euler made a huge number of contributions to mathematics, almost half after he was totally blind. (When this portrait was made he had already lost most of the sight in his right eye.) Leonhard Euler 1707 - 1783 Greg Kelly, Hanford High School, Richland, Washington It was Euler who originated the following notations: f x (function notation) e (base of natural log) (pi) i 1 (summation) y (finite change) Leonhard Euler 1707 - 1783 There are many differential equations that can not be solved. We can still find an approximate solution. Goal: to find an approximate solution curve for a differential equation that can’t be solved exactly. dy Notation update: f(,) x y dx Recall our Linearization formula (with new notation): L( x ) y y0 f ( x 0 , y 0 )( x x 0 ) Logic: Starting with an initial point (that is given), use linearizations (tangent lines) to find subsequent points on the approximate solution curve. y f( x0 ) f ( x 0 , y 0 )( x x 0 ) y1 y 0 f( x 0 , y 0 )( x 1 x 0 ) y1 y 0 f(,) x 0 y 0 dx y2 y 1 f(,) x 1 y 1 dx yn1 y n f(,) x n y n dx The procedure is known as Euler’s Method x0 x1 x2 x3 x4 dy Example: 1 y , y (0) 1, dx .1 dx x y The program EULER will generate the entire table for a specified number of steps – try it now for the same problem with 5 steps. The program EULER will generate the entire table for a specified number of steps – try it now for the same problem with 5 steps. The actual solution curve is y = 2ex – 1. Graph this along with the approximate solution from EULER. Draw the slope field for the same differential equation to see how the approximate solution and the actual solution compare to the slope field (keep the same window from when you used EULER.) Example: Approximate f(-1) using Euler’s Method and two steps of equal size. dy 2x 3 y , y (0) 1 x y dx .
Recommended publications
  • Introduction to Differential Equations
    Introduction to Differential Equations Lecture notes for MATH 2351/2352 Jeffrey R. Chasnov k kK m m x1 x2 The Hong Kong University of Science and Technology The Hong Kong University of Science and Technology Department of Mathematics Clear Water Bay, Kowloon Hong Kong Copyright ○c 2009–2016 by Jeffrey Robert Chasnov This work is licensed under the Creative Commons Attribution 3.0 Hong Kong License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/hk/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. Preface What follows are my lecture notes for a first course in differential equations, taught at the Hong Kong University of Science and Technology. Included in these notes are links to short tutorial videos posted on YouTube. Much of the material of Chapters 2-6 and 8 has been adapted from the widely used textbook “Elementary differential equations and boundary value problems” by Boyce & DiPrima (John Wiley & Sons, Inc., Seventh Edition, ○c 2001). Many of the examples presented in these notes may be found in this book. The material of Chapter 7 is adapted from the textbook “Nonlinear dynamics and chaos” by Steven H. Strogatz (Perseus Publishing, ○c 1994). All web surfers are welcome to download these notes, watch the YouTube videos, and to use the notes and videos freely for teaching and learning. An associated free review book with links to YouTube videos is also available from the ebook publisher bookboon.com. I welcome any comments, suggestions or corrections sent by email to [email protected].
    [Show full text]
  • 3 Runge-Kutta Methods
    3 Runge-Kutta Methods In contrast to the multistep methods of the previous section, Runge-Kutta methods are single-step methods — however, with multiple stages per step. They are motivated by the dependence of the Taylor methods on the specific IVP. These new methods do not require derivatives of the right-hand side function f in the code, and are therefore general-purpose initial value problem solvers. Runge-Kutta methods are among the most popular ODE solvers. They were first studied by Carle Runge and Martin Kutta around 1900. Modern developments are mostly due to John Butcher in the 1960s. 3.1 Second-Order Runge-Kutta Methods As always we consider the general first-order ODE system y0(t) = f(t, y(t)). (42) Since we want to construct a second-order method, we start with the Taylor expansion h2 y(t + h) = y(t) + hy0(t) + y00(t) + O(h3). 2 The first derivative can be replaced by the right-hand side of the differential equation (42), and the second derivative is obtained by differentiating (42), i.e., 00 0 y (t) = f t(t, y) + f y(t, y)y (t) = f t(t, y) + f y(t, y)f(t, y), with Jacobian f y. We will from now on neglect the dependence of y on t when it appears as an argument to f. Therefore, the Taylor expansion becomes h2 y(t + h) = y(t) + hf(t, y) + [f (t, y) + f (t, y)f(t, y)] + O(h3) 2 t y h h = y(t) + f(t, y) + [f(t, y) + hf (t, y) + hf (t, y)f(t, y)] + O(h3(43)).
    [Show full text]
  • Runge-Kutta Scheme Takes the Form   K1 = Hf (Tn, Yn);  K2 = Hf (Tn + Αh, Yn + Βk1); (5.11)   Yn+1 = Yn + A1k1 + A2k2
    Approximate integral using the trapezium rule: h Y (t ) ≈ Y (t ) + [f (t ; Y (t )) + f (t ; Y (t ))] ; t = t + h: n+1 n 2 n n n+1 n+1 n+1 n Use Euler's method to approximate Y (tn+1) ≈ Y (tn) + hf (tn; Y (tn)) in trapezium rule: h Y (t ) ≈ Y (t ) + [f (t ; Y (t )) + f (t ; Y (t ) + hf (t ; Y (t )))] : n+1 n 2 n n n+1 n n n Hence the modified Euler's scheme 8 K1 = hf (tn; yn) > h <> y = y + [f (t ; y ) + f (t ; y + hf (t ; y ))] , K2 = hf (tn+1; yn + K1) n+1 n 2 n n n+1 n n n > K1 + K2 :> y = y + n+1 n 2 5.3.1 Modified Euler Method Numerical solution of Initial Value Problem: dY Z tn+1 = f (t; Y ) , Y (tn+1) = Y (tn) + f (t; Y (t)) dt: dt tn Use Euler's method to approximate Y (tn+1) ≈ Y (tn) + hf (tn; Y (tn)) in trapezium rule: h Y (t ) ≈ Y (t ) + [f (t ; Y (t )) + f (t ; Y (t ) + hf (t ; Y (t )))] : n+1 n 2 n n n+1 n n n Hence the modified Euler's scheme 8 K1 = hf (tn; yn) > h <> y = y + [f (t ; y ) + f (t ; y + hf (t ; y ))] , K2 = hf (tn+1; yn + K1) n+1 n 2 n n n+1 n n n > K1 + K2 :> y = y + n+1 n 2 5.3.1 Modified Euler Method Numerical solution of Initial Value Problem: dY Z tn+1 = f (t; Y ) , Y (tn+1) = Y (tn) + f (t; Y (t)) dt: dt tn Approximate integral using the trapezium rule: h Y (t ) ≈ Y (t ) + [f (t ; Y (t )) + f (t ; Y (t ))] ; t = t + h: n+1 n 2 n n n+1 n+1 n+1 n Hence the modified Euler's scheme 8 K1 = hf (tn; yn) > h <> y = y + [f (t ; y ) + f (t ; y + hf (t ; y ))] , K2 = hf (tn+1; yn + K1) n+1 n 2 n n n+1 n n n > K1 + K2 :> y = y + n+1 n 2 5.3.1 Modified Euler Method Numerical solution of Initial Value Problem: dY Z tn+1 =
    [Show full text]
  • The Original Euler's Calculus-Of-Variations Method: Key
    Submitted to EJP 1 Jozef Hanc, [email protected] The original Euler’s calculus-of-variations method: Key to Lagrangian mechanics for beginners Jozef Hanca) Technical University, Vysokoskolska 4, 042 00 Kosice, Slovakia Leonhard Euler's original version of the calculus of variations (1744) used elementary mathematics and was intuitive, geometric, and easily visualized. In 1755 Euler (1707-1783) abandoned his version and adopted instead the more rigorous and formal algebraic method of Lagrange. Lagrange’s elegant technique of variations not only bypassed the need for Euler’s intuitive use of a limit-taking process leading to the Euler-Lagrange equation but also eliminated Euler’s geometrical insight. More recently Euler's method has been resurrected, shown to be rigorous, and applied as one of the direct variational methods important in analysis and in computer solutions of physical processes. In our classrooms, however, the study of advanced mechanics is still dominated by Lagrange's analytic method, which students often apply uncritically using "variational recipes" because they have difficulty understanding it intuitively. The present paper describes an adaptation of Euler's method that restores intuition and geometric visualization. This adaptation can be used as an introductory variational treatment in almost all of undergraduate physics and is especially powerful in modern physics. Finally, we present Euler's method as a natural introduction to computer-executed numerical analysis of boundary value problems and the finite element method. I. INTRODUCTION In his pioneering 1744 work The method of finding plane curves that show some property of maximum and minimum,1 Leonhard Euler introduced a general mathematical procedure or method for the systematic investigation of variational problems.
    [Show full text]
  • Numerical Stability; Implicit Methods
    NUMERICAL STABILITY; IMPLICIT METHODS When solving the initial value problem 0 Y (x) = f (x; Y (x)); x0 ≤ x ≤ b Y (x0) = Y0 we know that small changes in the initial data Y0 will result in small changes in the solution of the differential equation. More precisely, consider the perturbed problem 0 Y"(x) = f (x; Y"(x)); x0 ≤ x ≤ b Y"(x0) = Y0 + " Then assuming f (x; z) and @f (x; z)=@z are continuous for x0 ≤ x ≤ b; −∞ < z < 1, we have max jY"(x) − Y (x)j ≤ c j"j x0≤x≤b for some constant c > 0. We would like our numerical methods to have a similar property. Consider the Euler method yn+1 = yn + hf (xn; yn) ; n = 0; 1;::: y0 = Y0 and then consider the perturbed problem " " " yn+1 = yn + hf (xn; yn ) ; n = 0; 1;::: " y0 = Y0 + " We can show the following: " max jyn − ynj ≤ cbj"j x0≤xn≤b for some constant cb > 0 and for all sufficiently small values of the stepsize h. This implies that Euler's method is stable, and in the same manner as was true for the original differential equation problem. The general idea of stability for a numerical method is essentially that given above for Eulers's method. There is a general theory for numerical methods for solving the initial value problem 0 Y (x) = f (x; Y (x)); x0 ≤ x ≤ b Y (x0) = Y0 If the truncation error in a numerical method has order 2 or greater, then the numerical method is stable if and only if it is a convergent numerical method.
    [Show full text]
  • Leonhard Euler: His Life, the Man, and His Works∗
    SIAM REVIEW c 2008 Walter Gautschi Vol. 50, No. 1, pp. 3–33 Leonhard Euler: His Life, the Man, and His Works∗ Walter Gautschi† Abstract. On the occasion of the 300th anniversary (on April 15, 2007) of Euler’s birth, an attempt is made to bring Euler’s genius to the attention of a broad segment of the educated public. The three stations of his life—Basel, St. Petersburg, andBerlin—are sketchedandthe principal works identified in more or less chronological order. To convey a flavor of his work andits impact on modernscience, a few of Euler’s memorable contributions are selected anddiscussedinmore detail. Remarks on Euler’s personality, intellect, andcraftsmanship roundout the presentation. Key words. LeonhardEuler, sketch of Euler’s life, works, andpersonality AMS subject classification. 01A50 DOI. 10.1137/070702710 Seh ich die Werke der Meister an, So sehe ich, was sie getan; Betracht ich meine Siebensachen, Seh ich, was ich h¨att sollen machen. –Goethe, Weimar 1814/1815 1. Introduction. It is a virtually impossible task to do justice, in a short span of time and space, to the great genius of Leonhard Euler. All we can do, in this lecture, is to bring across some glimpses of Euler’s incredibly voluminous and diverse work, which today fills 74 massive volumes of the Opera omnia (with two more to come). Nine additional volumes of correspondence are planned and have already appeared in part, and about seven volumes of notebooks and diaries still await editing! We begin in section 2 with a brief outline of Euler’s life, going through the three stations of his life: Basel, St.
    [Show full text]
  • Calculus Terminology
    AP Calculus BC Calculus Terminology Absolute Convergence Asymptote Continued Sum Absolute Maximum Average Rate of Change Continuous Function Absolute Minimum Average Value of a Function Continuously Differentiable Function Absolutely Convergent Axis of Rotation Converge Acceleration Boundary Value Problem Converge Absolutely Alternating Series Bounded Function Converge Conditionally Alternating Series Remainder Bounded Sequence Convergence Tests Alternating Series Test Bounds of Integration Convergent Sequence Analytic Methods Calculus Convergent Series Annulus Cartesian Form Critical Number Antiderivative of a Function Cavalieri’s Principle Critical Point Approximation by Differentials Center of Mass Formula Critical Value Arc Length of a Curve Centroid Curly d Area below a Curve Chain Rule Curve Area between Curves Comparison Test Curve Sketching Area of an Ellipse Concave Cusp Area of a Parabolic Segment Concave Down Cylindrical Shell Method Area under a Curve Concave Up Decreasing Function Area Using Parametric Equations Conditional Convergence Definite Integral Area Using Polar Coordinates Constant Term Definite Integral Rules Degenerate Divergent Series Function Operations Del Operator e Fundamental Theorem of Calculus Deleted Neighborhood Ellipsoid GLB Derivative End Behavior Global Maximum Derivative of a Power Series Essential Discontinuity Global Minimum Derivative Rules Explicit Differentiation Golden Spiral Difference Quotient Explicit Function Graphic Methods Differentiable Exponential Decay Greatest Lower Bound Differential
    [Show full text]
  • Calculus Formulas and Theorems
    Formulas and Theorems for Reference I. Tbigonometric Formulas l. sin2d+c,cis2d:1 sec2d l*cot20:<:sc:20 +.I sin(-d) : -sitt0 t,rs(-//) = t r1sl/ : -tallH 7. sin(A* B) :sitrAcosB*silBcosA 8. : siri A cos B - siu B <:os,;l 9. cos(A+ B) - cos,4cos B - siuA siriB 10. cos(A- B) : cosA cosB + silrA sirrB 11. 2 sirrd t:osd 12. <'os20- coS2(i - siu20 : 2<'os2o - I - 1 - 2sin20 I 13. tan d : <.rft0 (:ost/ I 14. <:ol0 : sirrd tattH 1 15. (:OS I/ 1 16. cscd - ri" 6i /F tl r(. cos[I ^ -el : sitt d \l 18. -01 : COSA 215 216 Formulas and Theorems II. Differentiation Formulas !(r") - trr:"-1 Q,:I' ]tra-fg'+gf' gJ'-,f g' - * (i) ,l' ,I - (tt(.r))9'(.,') ,i;.[tyt.rt) l'' d, \ (sttt rrJ .* ('oqI' .7, tJ, \ . ./ stll lr dr. l('os J { 1a,,,t,:r) - .,' o.t "11'2 1(<,ot.r') - (,.(,2.r' Q:T rl , (sc'c:.r'J: sPl'.r tall 11 ,7, d, - (<:s<t.r,; - (ls(].]'(rot;.r fr("'),t -.'' ,1 - fr(u") o,'ltrc ,l ,, 1 ' tlll ri - (l.t' .f d,^ --: I -iAl'CSllLl'l t!.r' J1 - rz 1(Arcsi' r) : oT Il12 Formulas and Theorems 2I7 III. Integration Formulas 1. ,f "or:artC 2. [\0,-trrlrl *(' .t "r 3. [,' ,t.,: r^x| (' ,I 4. In' a,,: lL , ,' .l 111Q 5. In., a.r: .rhr.r' .r r (' ,l f 6. sirr.r d.r' - ( os.r'-t C ./ 7. /.,,.r' dr : sitr.i'| (' .t 8. tl:r:hr sec,rl+ C or ln Jccrsrl+ C ,f'r^rr f 9.
    [Show full text]
  • A Brief Introduction to Numerical Methods for Differential Equations
    A Brief Introduction to Numerical Methods for Differential Equations January 10, 2011 This tutorial introduces some basic numerical computation techniques that are useful for the simulation and analysis of complex systems modelled by differential equations. Such differential models, especially those partial differential ones, have been extensively used in various areas from astronomy to biology, from meteorology to finance. However, if we ignore the differences caused by applications and focus on the mathematical equations only, a fundamental question will arise: Can we predict the future state of a system from a known initial state and the rules describing how it changes? If we can, how to make the prediction? This problem, known as Initial Value Problem(IVP), is one of those problems that we are most concerned about in numerical analysis for differential equations. In this tutorial, Euler method is used to solve this problem and a concrete example of differential equations, the heat diffusion equation, is given to demonstrate the techniques talked about. But before introducing Euler method, numerical differentiation is discussed as a prelude to make you more comfortable with numerical methods. 1 Numerical Differentiation 1.1 Basic: Forward Difference Derivatives of some simple functions can be easily computed. However, if the function is too compli- cated, or we only know the values of the function at several discrete points, numerical differentiation is a tool we can rely on. Numerical differentiation follows an intuitive procedure. Recall what we know about the defini- tion of differentiation: df f(x + h) − f(x) = f 0(x) = lim dx h!0 h which means that the derivative of function f(x) at point x is the difference between f(x + h) and f(x) divided by an infinitesimal h.
    [Show full text]
  • 4.1 AP Calc Antiderivatives and Indefinite Integration.Notebook November 28, 2016
    4.1 AP Calc Antiderivatives and Indefinite Integration.notebook November 28, 2016 4.1 Antiderivatives and Indefinite Integration Learning Targets 1. Write the general solution of a differential equation 2. Use indefinite integral notation for antiderivatives 3. Use basic integration rules to find antiderivatives 4. Find a particular solution of a differential equation 5. Plot a slope field 6. Working backwards in physics Intro/Warm­up 1 4.1 AP Calc Antiderivatives and Indefinite Integration.notebook November 28, 2016 Note: I am changing up the procedure of the class! When you walk in the class, you will put a tally mark on those problems that you would like me to go over, and you will turn in your homework with your name, the section and the page of the assignment. Order of the day 2 4.1 AP Calc Antiderivatives and Indefinite Integration.notebook November 28, 2016 Vocabulary First, find a function F whose derivative is . because any other function F work? So represents the family of all antiderivatives of . The constant C is called the constant of integration. The family of functions represented by F is the general antiderivative of f, and is the general solution to the differential equation The operation of finding all solutions to the differential equation is called antidifferentiation (or indefinite integration) and is denoted by an integral sign: is read as the antiderivative of f with respect to x. Vocabulary 3 4.1 AP Calc Antiderivatives and Indefinite Integration.notebook November 28, 2016 Nov 28­9:38 AM 4 4.1 AP Calc Antiderivatives and Indefinite Integration.notebook November 28, 2016 ∫ Use basic integration rules to find antiderivatives The Power Rule: where 1.
    [Show full text]
  • Oscillation-Free Method for Semilinear Diffusion Equations Under
    Oscillation-free method for semilinear diffusion equations under noisy initial conditions R. C. Harwooda,∗, Likun Zhangb, V. S. Manoranjanc aDepartment of Mathematics, George Fox University, Newberg, OR 97132, USA bDepartment of Physics and Center for Nonlinear Dynamics, University of Texas at Austin, Austin, TX 78712, USA cDepartment of Mathematics, Washington State University, Pullman, WA 99164, USA Abstract Noise in initial conditions from measurement errors can create unwanted oscillations which propagate in numerical solutions. We present a technique of prohibiting such oscillation errors when solving initial-boundary-value problems of semilinear diffusion equations. Symmetric Strang splitting is applied to the equation for solving the linear diffusion and nonlinear remainder separately. An oscillation-free scheme is developed for overcoming any oscillatory behavior when numerically solving the linear diffusion portion. To demonstrate the ills of stable oscillations, we compare our method using a weighted implicit Euler scheme to the Crank-Nicolson method. The oscillation-free feature and stability of our method are analyzed through a local linearization. The accuracy of our oscillation-free method is proved and its usefulness is further verified through solving a Fisher-type equation where oscillation-free solutions are successfully produced in spite of random errors in the initial conditions. Keywords: numerical oscillations, splitting methods, finite difference, Euler method, reaction-diffusion, semilinear parabolic partial differential equation arXiv:1607.07433v1 [math.NA] 23 Jul 2016 1. Introduction Before analyzing numerical methods for stability it is necessary that the equations they solve be well-posed and stable themselves. In this paper, we consider the ∗Corresponding author Email addresses: [email protected] (R.
    [Show full text]
  • The Legacy of Leonhard Euler: a Tricentennial Tribute (419 Pages)
    P698.TP.indd 1 9/8/09 5:23:37 PM This page intentionally left blank Lokenath Debnath The University of Texas-Pan American, USA Imperial College Press ICP P698.TP.indd 2 9/8/09 5:23:39 PM Published by Imperial College Press 57 Shelton Street Covent Garden London WC2H 9HE Distributed by World Scientific Publishing Co. Pte. Ltd. 5 Toh Tuck Link, Singapore 596224 USA office: 27 Warren Street, Suite 401-402, Hackensack, NJ 07601 UK office: 57 Shelton Street, Covent Garden, London WC2H 9HE British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library. THE LEGACY OF LEONHARD EULER A Tricentennial Tribute Copyright © 2010 by Imperial College Press All rights reserved. This book, or parts thereof, may not be reproduced in any form or by any means, electronic or mechanical, including photocopying, recording or any information storage and retrieval system now known or to be invented, without written permission from the Publisher. For photocopying of material in this volume, please pay a copying fee through the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, USA. In this case permission to photocopy is not required from the publisher. ISBN-13 978-1-84816-525-0 ISBN-10 1-84816-525-0 Printed in Singapore. LaiFun - The Legacy of Leonhard.pmd 1 9/4/2009, 3:04 PM September 4, 2009 14:33 World Scientific Book - 9in x 6in LegacyLeonhard Leonhard Euler (1707–1783) ii September 4, 2009 14:33 World Scientific Book - 9in x 6in LegacyLeonhard To my wife Sadhana, grandson Kirin,and granddaughter Princess Maya, with love and affection.
    [Show full text]