Date of this Version
This book introduces elementary programming in Pascal as a tool to solve introductory problems in numerical mathematics at post-compulsory level, i.e. secondary schools, colleges of TAFE, senior colleges, and first-year tertiary. In particular, it covers all the material in the Computer Mathematics (Unit V) course in Queensland high schools. A modern, structured approach to programming has been used throughout the book, and emphasis is placed on problem-solving strategies and algorithm development. Students should eventually appreciate that, in general, the sooner you start coding the solution to a problem, the longer it will take to solve successfully, and that the computer is simply a tool to help solve certain classes of problems.
The textbook has the following goals:
1. To introduce many aspects of programming and problem-solving processes including problem specification and organization, algorithm development, coding, testing and debugging, and documentation of method and results.
2. To demonstrate what is currently considered good programming style.
3. To teach the syntax and semantics of a reasonable subset of a modern dialect of the Pascal language.
4. To show how elegantly some mathematical problems can be expressed in a precise algorithmic language, and also finally solved on a digital computer.
5. To allow students to use an experimental approach to computer mathematics by providing examples for each major algorithm both in the text and on diskette. The supplied programs can be run as is, or modified to illustrate different points or examples. Indeed, a number of the exercises require students to extend or change a program in the text.
The emphasis throughout is on mathematics, and not programming, however, it will be appreciated by teachers that a proper treatment of mathematical material in a computing context requires the same attention to detail and accuracy that they would customarily use in other mathematics units. With this in mind, we have included four chapters on the nature of computers and information in general, with some treatment of the Pascal language. The general approach of the book is to draw on topics from many areas of mathematics. Some brief revision of key concepts is presented, but in general, no attempt has been made to 're-teach' basic material. In a number of cases, we have endeavoured also to use the computer to give further insight into some important theoretical concepts. On the whole, however, it has been assumed that students are familiar with some of the basic principles of trigonometry, polynomials, differential calculus, functional notation, and coordinate geometry.
The Pascal language was chosen in preference to the ubiquitous but archaic BASIC because of the very good teaching tools such as Turbo Pascal that are now becoming available on IBM and compatible machines at very reasonable prices. These products serve as excellent vehicles for the illustration of principles of both computer mathematics and sound programming techniques. Further, the recent release of powerful document processing products such as Lotus Manuscript (on which this work was developed), and mathematical typesetting software (such as Donald Knuth's TEX), have made possible the creation of mathematical equations on a computer. Only those parts of Pascal which are necessary to properly develop the programs relevant to the syllabus are covered in this text. Of course, teachers may extend the coverage of the language as they see fit; however our aim has been to present a minimal, but reasonably thorough treatment of the Pascal language which is adequate for the development and coding of mathematical algorithms. No peculiarities of the Turbo Pascal dialect are used, however some graphics support and other routines provided in Turbo Pascal have been used to advantage. For the most part, students should be able to run the programs supplied on the optional diskette with little or no changes. We have planned the book with a view to minimising the tedium that is so often associated with teaching a subject involving some elements of practical computing. In order to save the time needed to key the programs, these are supplied on the optional examples diskette, and solutions to selected exercises (marked * in the text) also available.