Algebraic Biology 005 151 Mathematical Models with Maple Tetsu YAMAGUCHI Applied System nd Division, Cybernet Systems Co., Ltd., Otsuka -9-3, Bunkyo-ku, Tokyo 11-001, Japan tetsuy@cybernet.co.jp Abstract In this paper, we introduce the fundamental capability of well-known computer algebra system called Maple. Using with this Maple system, we investigated on how computer algebra system can work for research and development study in the biology. In particular, we present a review of Maple s functional role in the development of mathematical models. 1. Introduction The Maple system has been originally developed on 1980, by SCG (Symbolic Computation Group) in University of Waterloo, Canada. The basic aspect of the system was compact, but powerful computer algebra system with fundamental algebraic computation capabilities []. Throughout many significant contributions from researchers in computer algebra world for the past 5 years, it has recently released the latest version called Maple 10 on 005 from Maplesoft, a division of Waterloo Maple Inc, which has established for the purpose of marketing, supporting and distributing the software. Recent research and development work in designing and modeling requires the stable and the flexible mathematical models which can describe the system. In this purpose, researchers and engineers also requires high-level mathematical knowledge such as transformation of various differential equations and its related analytical operation so that numerical simulation can t handle the problem with unified and coordinated methodology. The computer algebra system can handle to state the system by exact and can convert its expression into an equivalent another form with analytical transformation and simplification by implementing thousands of mathematical formulae. Using with computer algebra system, we can develop the mathematical model which has less amount of calculation, for example. In Section, we introduce the fundamental capability of Maple system. In particular, we reviewed about basic functionality for ordinary and partial differential equations (ODE, PDE) so that Maple is well-known for solving and evaluating of various differential equations. Section 3 discusses a typical model development and its classic flow on Maple system. As a specific understanding of Maple system, we show steps to solve the differential equation for epidemics. Finally, the paper ends with a brief summary referencing some applications of Maple in various area. pp. 151 155 c 005 by Universal Academy Press, Inc. / Tokyo, Japan
15 Fig 1. Embedded interactive components in Maple Worksheet. Fundamental Capability of Maple system Recent computer algebra system including Maple has following common capabilities; Symbolic Computation: Polynomial Operations (GCD, Factorization, Root-Finding, Gröbner Base), Symbolic-Differentiation/Integration, Solving Algebraic Equation, Exact Solution for ODEs/PDEs, Formula Conversion, Series Expansion. Numerical Computation: Approximation, Arbitrary Precision Computation, Numerical Integration, Interval Arithmetic, Statistical Computation (Probability Computation, Descriptive Statistics, Tabulation, Data Manipulation/Smoothing, Hypothesis Testing, Regression/ Estimation), Interpolation/Fitting, Integral/Discrete Transformation. Visualization: D/3D Graphics, Animation, Density Plot, Contour Plot, D/3D Implicit Plot, Statistical Plot, Interactive Operation for Graphics, Exporting to other formats. Miscellaneous: Code Conversion (L A TEX, C, Fortran, Visual Basic, Java, MATLAB), API (C, VB, Java), Educational Contents, GUI, Unit Arithmetic, Objective Programming. In addition, Maple has an intuitive Graphical User Interface (GUI) called Worksheet for entering mathematical expression, and also enables us to author a mathematical document and interactive operation with embedded component such as slider, text field, plot area and command button (see Fig. 1). Internal expressions in the worksheet are stored as Maple-based XML format, so we can easily convert any kind of mathematical expression to an appropriate MathML expression or other structured expression. As listed above, Maple also has various functionalities based on symbolic and numeric algorithms for solving of differential equation. Basically, we can use two typical commands implemented in Maple as dsolve for ODE and pdsolve for PDE, respectively. We can select a lot of algorithm for solving ODE(s) symbolically such that Lie symmetries, classification, integration factors, integral transformations and series expansion at given point. Furthermore, optional functions for applying enhanced operation to given ODE as following can be available by loading the DEtools package; Commands for simplifying ODE(s) with integrability condition.
153 Commands for constructing closed-form solution. Commands for classifying ODE(s). Commands for Visualization. Commands for Conversion. Using with this DE solver, we discuss a typical mathematical model development and its general flow on Maple system in the next section. On the other hand, Maple can also handle the PDE(s) with both of symbolic and numeric for finding solution. For the symbolic PDE solving, Maple takes a phased procedure automatically for rewriting the system which can simply express in form of polynomial by using an approach with differential algebraic equation. With some verifications such as integrability conditions in the system, it also produces to divide subsystems of given PDE, and then tries to obtain a solution on one variable. After iteration of finding all possible solutions, Maple performs a set of solutions for given PDE system. In addition, we can compute, if exists, a Traveling Wave Solution (TWS) as a power series in tanh function or several (special) mathematical functions. For the numeric computation to solve PDE system, we can take 11 classical methods such as Euler, Backward-Euler, Crank-Nicholson, and so on. The numerically computed result from PDE solver is a form of intermediate expression of the approximate solution. Hence, for example, we can indicate some of step size to construct an approximate value as free and can estimate of errors. For instance, let us consider a simple one-way wave equation as u (x, t) = u (x, t) t x with a boundary condition of {u (x, 0) = sin ( π x), u (0, t) = sin ( π t)}. After constructing an intermediate expression of the solution and its error function, we can see the band difference between each step size in time and space: 1/16 for the left side and 1/3 for right side, respectively, in Fig.. Fig. Error estimations for PDE solution As we introduced the fundamental functionalities in this section, we can analyze the mathematical model described by differential equation using with Maple.
154 3. Typical Model development on Maple system In this section, we review the typical strategy with respect to mathematical model development using with Maple system by solving differential equation. Let us consider the case in biology with famous mathematical model of epidemics [3]. We use a following first-order ordinary differential equation system which describes on infection model for the number of infected patients denoted by P (t), carrier patients denoted by C(t) and removed patients denoted by R(t). S(t), C(t) and R(t) satisfy Ṡ = r S P, (1) P = r S P γ P, Ṙ = γp. where r and γ are positive constants for infection rate and cull rate, respectively. Note that d(s + P + R)/dt = 0. That is, S(t) + P (t) + R(t) = N () where N is a constant which means a total population in that area. Since equation () and (), we can derive a single differential equation for the number of removed patients as follows; Ṙ = γ(n R S 0 e R/ρ ) (3) where ρ = γ/r and S 0 = S(t 0 ). After this formulation, we can get the following implicit solution by applying dsolve command for given differential equation. R(t) ( ) t + γ 1 N + a + S 0 e a 1 ρ d a + C1 = 0 (4) where a and C1 are generated by Maple automatically as internal variables. To obtain an explicit solution of the differential equation (3), we need to replace e R/ρ to its 3-rd order taylor series in case that R(t) 1. ρ In Maple, we can get taylor series expansion of e x by taylor command with specified order, and can substitute x = R(t)/ρ by subs command. Thus, equation (3) can be expanded as following expression; Ṙ = γ N γ R (t) γ S 0 + γ S 0R (t) ρ 1 γ S 0 (R (t)) (5) ρ Again, we can get the solution of differential equation (5) by dsolve command with an initial condition R(0) = N. ( ( ( ρ 1 S 0 ρ + tan tγ ( )) ) ) ρ φ ρ 1 arctan ρ + 1 S 0 + 1 φ ρ ρ φ ρ R (t) = φ (6) S 0 where φ = ρ S 0 ρ + S 0 N S 0. However, we have to mention here that expression of Maple s solution (6) is not automatically collected terms s.t. rhs of φ. User sometimes needs to indicate explicitly each rules to abbreviation or term replacement.
155 Theoretically, according to the paper [3], it can be a form of [ S0 ρ 1 + α tanh R(t) = ρ S 0 ( 1 αγ t φ )] (7) where [ (S0 ) ] 1 α = ρ 1 + S 0(N S 0 ), ρ ( ) φ = tanh 1 1 S0 α ρ 1. To summarize of section, we must point out that computer algebra system, however, can specify a determinate transformation which is based on user own strategy and enables us to measure what kind of expression is the most efficient in that context by applying algebraic operations. After obtaining an explicit form of the solution for given differential equation, we can then process to identify specific values in unknown coefficients by taking the linear and/or nonlinear least square fitting or other symbolic-numeric methods. 4. Summary We have reviewed the fundamentals of Maple system in the viewpoint of evaluation for the mathematical model which is expressed by differential equation. Recently, Maple and other computer algebra system are required to identify more comprehensive model so that dynamic simulation by only numerical computation can t handle instability and uncertainty of the system. Meanwhile, it still exists a lot of computation cost in almost computer algebraic algorithms. Hence, we need to develop symbolic-numeric mixed type of algorithm in the application area too. References [1] M. Braun, Differential Equation and Their Applications (1983) Springer-Verlag, New York. [] B.W. Char, K.O. Geddes, W.M. Gentleman and G.H. Gonnet, The design of Maple: A compact, portable, and powerful computer algebra system. (1983) Computer Algebra (Proc. of EUROCAL 83), No.16, Springer-Verlag, Berlin, 101. [3] W.O. Kermack and A.G. McKendrick, Contributions to the mathematical theory of epidemics, Proc. Roy. Stat. Soc. A, 115 (197) 700. [4] L. Ljung, System Identification: Theory for the User (1987) Prentice-Hall. [5] M.B. Monagan, K.O. Geddes, K.M. Heal, G. Labahn et al., Maple Advanced Programming Guide (005) [6] T. Yabe, F. Xiao and T. Utsumi, The Constrained Interpolation Profile Method for Multiphase Analysis, Journal of Comp. Physics 169 (001) 556.