Ordinary Differential Equations (ODE) Using Euler's Technique And

Ordinary Differential Equations (ODE) Using Euler's Technique And

Mathematical Models and Methods in Modern Science Ordinary Differential Equations (ODE) using Euler’s Technique and SCILAB Programming ZULZAMRI SALLEH Applied Sciences and Advance Technology Universiti Kuala Lumpur Malaysian Institute of Marine Engineering Technology Bandar Teknologi Maritim Jalan Pantai Remis 32200 Lumut, Perak MALAYSIA [email protected] http://www.mimet.edu.my Abstract: - Mathematics is very important for the engineering and scientist but to make understand the mathematics is very difficult if without proper tools and suitable measurement. A numerical method is one of the algorithms which involved with computer programming. In this paper, Scilab is used to carter the problems related the mathematical models such as Matrices, operation with ODE’s and solving the Integration. It remains true that solutions of the vast majority of first order initial value problems cannot be found by analytical means. Therefore, it is important to be able to approach the problem in other ways. Today there are numerous methods that produce numerical approximations to solutions of differential equations. Here, we introduce the oldest and simplest such method, originated by Euler about 1768. It is called the tangent line method or the Euler method. It uses a fixed step size h and generates the approximate solution. The purpose of this paper is to show the details of implementing of Euler’s method and made comparison between modify Euler’s and exact value by integration solution, as well as solve the ODE’s use built-in functions available in Scilab programming. Key-Words: - Numerical Methods, Scilab programming, Euler methods, Ordinary Differential Equation. 1 Introduction availability of digital computers has led to a Numerical methods are techniques by which veritable explosion in the use and development of mathematical problems are formulated so that they numerical methods [1]. At first, this growth was can be solved with arithmetic operations. Although somewhat limited by the cost of access to large there are many kinds of numerical methods, they mainframe computers, and, consequently, many have one common characteristic: they invariably engineers continued to use simple analytical involve large numbers of tedious arithmetic approaches in a significant portion of their work. calculations. It is little wonder that with the development of fast, efficient digital computers, the role of numerical methods in engineering problem 2 Background solving has increased dramatically in recent years. Today, computers and numerical methods provide 2.1 Benefit of Numerical Methods an alternative for such complicated calculations. Numerical methods are extremely powerful Using computer power to obtain solutions directly, problem-solving tools. They are capable of handling it can approach these calculations without recourse large systems of equations, nonlinearities, and to simplifying assumptions or time-intensive complicated geometries that are not uncommon in techniques. Although analytical solutions are still engineering practice and that are often impossible to extremely valuable both for problem solving and for solve analytically. As such, they greatly enhance providing insight, numerical methods represent your problem-solving skills. During engineer alternatives that greatly enlarge your capabilities to careers, it might be often have occasion to use confront and solve problems. As a result, more time commercially available pre-packaged, or “canned,” is available for the use of your creative skills. Thus, computer programs that involve numerical methods. more emphasis can be placed on problem The intelligent use of these programs is often formulation and solution interpretation and the predicated on knowledge of the basic theory incorporation of total system, or “holistic” underlying the methods. Many problems cannot be awareness. Since the late 1940s the widespread approached using canned programs. It is well known ISBN: 978-1-61804-106-7 264 Mathematical Models and Methods in Modern Science that an effective way to learn programming is to The Scilab also provided an editor to edit script actually write computer programs. Because easily. The editor can be accessed from the menu of numerical methods are for the most part designed the console, under the Application> Editor menu or for implementation on computers, they are ideal for from the console [4]. The Fig. 2 shows the Scilab this purpose. Further, they are especially well-suited Text Editor. This editor allows managing several to illustrate the power and the limitations of files at the same time. The following example, the computers. Numerical methods provide a vehicle for function display is used in interactive mode to print you to reinforce your understanding of mathematics. the string ‘Hello World!’. Because one function of numerical methods is to reduce higher mathematics to basic arithmetic operations, they get at the “nuts and bolts” of some otherwise obscure topics. Enhanced understanding and insight can result from this alternative perspective. 2.2 Introduction to Scilab Programming Scilab is a programming language associated with a rich collection of numerical algorithms covering many aspects of scientific computing problems. Scilab can also be used for statistical analysis such as estimation of parameters in Gompertz curve using Gauss-Newton method of least squares [2]. From the software point of view Scilab is an Figure 2: Overview Scilab Text Editor (SciNote) interpreted language. Scilab language allows dynamically compiling and linking other languages 2.3 Introduction to Iterative ODE’s such as FOTRAN, MATLAB, C++ if they were a Study the Numerical methods always involve with part of built-in features [3]. Scilab also interface the topics related to generate the Matrices which are with LabVIEW, a platform and development solving the linear equation, ODE’s Ordinary environment for visual programming languages Differential Equation and Numerical Integration. from National Instruments. Cost for Scilab is free Numerical methods use mathematical modelling source software and no need to pay for license forms an important part of many tertiary courses in because it is provided under the Cecill license. mathematics and engineering [5]. Numerical Scilab comes with many features and rapidly the methods are commonly used for solving number of features extended to cover many areas of mathematical problems that are formulated in scientific computing. The following is a short list of science and engineering where it is difficult or even its capabilities for Scilab such as Matrices, impossible to obtain exact solutions. Only a limited Polynomials, Linear equation, Signal processing, number of differential equations can be solved Ordinary Differential Equation and statistic. The analytically. Numerical methods, on the other hand, Scilab console for the windows mode shows at Fig. can give an approximate solution to (almost) any 1. equation. An ordinary differential equation (ODE) is an equation that contains an independent variable, a dependent variable, and derivatives of the dependent variable. In recent times, it has gained more attention and awareness in other fields such as bioengineering, economics, biology, epidemiology and the medical sciences [6]. Traditionally, the techniques used and skills involved are confined to deterministic models based on concepts from algebra, vector calculus, regression, differential equations, etc. In fact Scilab’s numerical application is more than capable at solving ODE’s [7]. In this paper, we discuss the common topics that involved in engineering solving and basic conceptual using Scilab programming. An equation that involves one Figure 1: Overview of Scilab console or more derivatives of the unknown function is ISBN: 978-1-61804-106-7 265 Mathematical Models and Methods in Modern Science called an ordinary differential equation, abbreviated f(x )= f(x ) + hf '(x ) as ODE. The order of the equation is determined by 1 0 0 the order of the highest derivative. For example, if f(xi+ 1)= f(xi ) + hf(xi y, i ) the first derivative is the only derivative, the equation is called a first-order ODE. In the same f(x2 )= f(x1) + hf(x1 y, 1) way, if the highest derivative is second order, the f(x )= f(x ) + hf(x y, ) equation is called a secondorder ODE. The 3 2 2 2 problems of solving an ODE are classified into . initial-value problems (IVP) and boundary value . problems (BVP), depending on how the conditions at the endpoints of the domain are specified [8]. For . integration of ODE, Gauss-Legendre-Quadrate f(xn )= f(x )+ hf(xn y, n ) formula can be utilized especially for Taylor’s series n− 1 [9]. The final answer of Euler can be more accurately 2.3 Euler’s Methods and more stable if modify it by using the slope of the function at the estimated midpoints of The Euler methods are simple methods of solving (xi y, i ) first-order ODE, particularly suitable for quick and (x y, ) [8] to approximate y . Again programming because of their great simplicity, i+1 i +1 i+1 although their accuracy is not high. Euler’s can be we used the Euler’s equation . derived from the Taylor’s series expansion f(xi+1)= f(xi ) + hf(xi y, i ) f '' (x ) x + x y + y ' i 2 y =y + f i i+ 1 , i i+ 1 h f(xi+ 1)= f(xi ) + f (xi )h + h + ... Then i+ 1 i 2 2 2 rewrite or re-arrange only the first order forward 2xi + (xi+ 1 − xi ) 2yi + (yi+ 1 − yi ) ' f(xi+ 1)− f(xi ) =y + f , h difference will give them f (x ) ≈ i 2 2 i h and consider as Equation 1 and use h as step size =yi +f( xi +h/2, yi + y/2) ...............(3) . (xi+1 − xi ) Where ∆y is the estimated incremental value of y ' f(xi+ 1)− f(xi ) from yi and can be obtain using Euler’s formula as; f (x ) ≈ ..................(1) i h y= hf(x i y, i ) ' f(x )= f(x ) + f (x )h Then, equation (3) can be written as, i+ 1 i i y =y +hf( x +h/2, y + h/2f(x y, )) ..............(4) ' i+1 i i i i i Let consider f (x )= f(x y, ) therefore equation 1 i i i Use m1 and m2; can be written as; h m h and m =f x +y, + 1 m1 = f(xi y, i ) 2 i i 2 2 f(xi+1)= f(xi ) + hf(xi y, i ).............(2) then equation (4) become, Equation (2) is called as Euler’s method.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    6 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us