1550078481-Ordinary_Differential_Equations__Roberts_

(jair2018) #1

508 Ordinary Differential Equations


The four computer programs GRAPH, DIRFIELD, SOLVEIVP, and
SOLVESYS contained in CSODE require you to enter one or more functions.
The functions must be entered using the syntax of the language BASIC. The
following table summarizes the algebraic operations in BASIC. Except for
exponentiation, the symbols used for operators in BASIC are the same or
similar to those used in mathematics.


ALGEBRA I C BASIC MATHEMATICAL
OPERAT OR SYMBOL EXAMPLE REPRESENTAT IONS

Exponentiation KB ab


Multiplication
* A*B
a x b or a · b or ab

Division I A/B


a
a/b or a...;-b or b

Addition + A+B a+b


Subtraction A-B a - b

In algebraic expressions which contain no parentheses, the operation of
exponentiation is performed first. Multiple exponentiations are performed
from left to right. So AA BAG written with no parentheses is evaluated as
(KBtC which, in mathematical notation, is (AB)C =ABC. To write AB
0


in BASIC you must write AA(BAC). In an expression with no parentheses,
after all operations of exponentiation have been performed, the computer
performs all multiplications and divisions from left to right. So A/ B C is
evaluated as (A/ B)
C which, in mathematical notation, is AJj. To write
BAG in BASIC you must write A/(B * C) or A/ B/C. In an expression with
no parentheses, the operations of addition and subtraction are performed last
and from left to right. So A - B - C is evaluated as (A - B) - C.


In algebraic expressions which contain parentheses, all the operations ap-
pearing inside the innermost set of parentheses are performed first according
to the rules for evaluating algebraic expressions with no parentheses. Next,
the operations in the next innermost set of parentheses are performed and so
on. When writing algebraic expressions in BASIC or any similar computer
language, it is a good idea to include as many sets of parentheses as neces-
sary to indicate to the computer exactly how you want the expression to be
evaluated.


BASIC includes the "built-in" or intrinsic functions shown in Table A.l.
Free download pdf