Maple Lecture 1. Introduction to Computer Algebra

Similar documents
MCS 563 Spring 2014 Analytic Symbolic Computation Wednesday 9 April. Hilbert Polynomials

Maple Quick Start. Introduction. Talking to Maple. Using [ENTER] 3 (2.1)

Calculator Notes for the TI-Nspire and TI-Nspire CAS

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage

Solving Rational Equations

VISUAL ALGEBRA FOR COLLEGE STUDENTS. Laurie J. Burton Western Oregon University

2 SYSTEM DESCRIPTION TECHNIQUES

Properties of Real Numbers

Parallel Computing with Mathematica UVACSE Short Course

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science

Numerical Analysis. Professor Donna Calhoun. Fall 2013 Math 465/565. Office : MG241A Office Hours : Wednesday 10:00-12:00 and 1:00-3:00

Creating, Solving, and Graphing Systems of Linear Equations and Linear Inequalities

Big Ideas in Mathematics

Advanced Operating Systems CS428

CALIBRATION OF A ROBUST 2 DOF PATH MONITORING TOOL FOR INDUSTRIAL ROBOTS AND MACHINE TOOLS BASED ON PARALLEL KINEMATICS

TestManager Administration Guide

Clovis Community College Core Competencies Assessment Area II: Mathematics Algebra

Numerical integration of a function known only through data points

Part 1 Expressions, Equations, and Inequalities: Simplifying and Solving

High School Algebra Reasoning with Equations and Inequalities Solve systems of equations.

Prentice Hall: Middle School Math, Course Correlated to: New York Mathematics Learning Standards (Intermediate)

MATH 0110 Developmental Math Skills Review, 1 Credit, 3 hours lab

Quickstart for Desktop Version

Lecture Notes on Polynomials

Indiana State Core Curriculum Standards updated 2009 Algebra I

UNIT PLAN: EXPONENTIAL AND LOGARITHMIC FUNCTIONS

Real Roots of Univariate Polynomials with Real Coefficients

MATH 60 NOTEBOOK CERTIFICATIONS

Curriculum Alignment Project

This activity will show you how to draw graphs of algebraic functions in Excel.

SCHOOL OF ADVANCED TECHNOLOGIES, ENGINEERING AND SCIENCE (SATES) PROGRAM: CTech in Electrical and Electronic Engineering

Job Scheduler User Guide IGSS Version 11.0

3. Mathematical Induction

Objectives. Materials

Elementary Math Models: College Algebra Topics and a Liberal Arts Approach

MATH 590: Meshfree Methods

Introduction to the TI-Nspire CX

CREATING FORMAL REPORT. using MICROSOFT WORD. and EXCEL

Back-up Server DOC-OEMSPP-S/2014-BUS-EN-10/12/13

Standards for Mathematical Practice: Commentary and Elaborations for 6 8

Giac/Xcas, a swiss knife for mathematics

Grade 6 Mathematics Assessment. Eligible Texas Essential Knowledge and Skills

CHICAGO PUBLIC SCHOOLS (ILLINOIS) MATH & SCIENCE INITIATIVE COURSE FRAMEWORK FOR ALGEBRA Course Framework: Algebra

Module 9. User Interface Design. Version 2 CSE IIT, Kharagpur

Programming Languages & Tools

A teaching experience through the development of hypertexts and object oriented software.

Excel 2007 Basic knowledge

096 Professional Readiness Examination (Mathematics)

Learning Module 4 - Thermal Fluid Analysis Note: LM4 is still in progress. This version contains only 3 tutorials.

Chapter 4. Polynomial and Rational Functions. 4.1 Polynomial Functions and Their Graphs

Sources: On the Web: Slides will be available on:

Lesson Plan. Parallel Resistive Circuits Part 1 Electronics

Current California Math Standards Balanced Equations

THE AIT BUSINESS SCHOOL (ABS) PROGRAM: CTech in Business Administration and IT

This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.

Overview. Essential Questions. Precalculus, Quarter 4, Unit 4.5 Build Arithmetic and Geometric Sequences and Series

M E M O R A N D U M. Faculty Senate Approved April 2, 2015

Pre-Algebra Academic Content Standards Grade Eight Ohio. Number, Number Sense and Operations Standard. Number and Number Systems

Problem of the Month: Perfect Pair

Numerical Matrix Analysis

Polynomial Operations and Factoring

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Instructor Özgür ZEYDAN BEU Dept. of Enve. Eng. CIV 112 Computer Programming Lecture Notes (1)

LAYOUT OF THE KEYBOARD

MACMILLAN/McGRAW-HILL. MATH CONNECTS and IMPACT MATHEMATICS WASHINGTON STATE MATHEMATICS STANDARDS. ESSENTIAL ACADEMIC LEARNING REQUIREMENTS (EALRs)

Web site:

Accentuate the Negative: Homework Examples from ACE

The University of Connecticut. School of Engineering COMPUTER SCIENCE GUIDE TO COURSE SELECTION AY Revised July 27, 2015.

Backup Server DOC-OEMSPP-S/6-BUS-EN

7.6 Approximation Errors and Simpson's Rule

imc FAMOS 6.3 visualization signal analysis data processing test reporting Comprehensive data analysis and documentation imc productive testing

Argus Direct add-in for spreadsheets - Installation Guide

Guide to Leaving Certificate Mathematics Ordinary Level

CS 326e F2002 Lab 1. Basic Network Setup & Ethereal Time: 2 hrs

CORRELATED TO THE SOUTH CAROLINA COLLEGE AND CAREER-READY FOUNDATIONS IN ALGEBRA

AP Calculus AB Syllabus

Precalculus Orientation and FAQ

What math do students need for college success?

Sequence of Mathematics Courses

Programme Specification (Undergraduate) Date amended: 27 February 2012

Lecture 2 Mathcad Basics

Chapter 11 Compound Documents in Windows 3.1

Network/Floating License Installation Instructions

Lab Experience 17. Programming Language Translation

Stephanie A. Mungle TEACHING PHILOSOPHY STATEMENT

Basic Algorithms In Computer Algebra

What s New In Maple. Maple 17: By the Numbers. The Möbius Project TM. Embedded Video. new commands for mathematical problem-solving

Outline: Operating Systems

Classroom Tips and Techniques: The Student Precalculus Package - Commands and Tutors. Content of the Precalculus Subpackage

EQUATIONS and INEQUALITIES

Review of Fundamental Mathematics

Grade 6 Mathematics Performance Level Descriptors

Tennessee Mathematics Standards Implementation. Grade Six Mathematics. Standard 1 Mathematical Processes

36 CHAPTER 1. LIMITS AND CONTINUITY. Figure 1.17: At which points is f not continuous?

Circles in Triangles. This problem gives you the chance to: use algebra to explore a geometric situation

POLYNOMIAL FUNCTIONS

3. Logical Reasoning in Mathematics

Square Roots and Other Radicals

Chapter 3. Distribution Problems. 3.1 The idea of a distribution The twenty-fold way

South Carolina College- and Career-Ready (SCCCR) Algebra 1

Transcription:

Maple Lecture 1. Introduction to Computer Algebra In this first lecture we define computer algebra and sketch the organization of the course. This corresponds to the first chapter of [6]. The most important aspect of this lecture is the design and organization of worksheets. 1.1 What is Computer Algebra? Computer Algebra is the discipline that studies the algorithms for Symbolic Computation. In Symbolic Computation, one computes with symbols, rather than with numbers. In this course we are mostly concerned with the practical aspects of Symbolic Computation, in particular its implementation and its application to solve practical mathematical problems. The lecture notes on computer algebra are organized in four parts: First steps with Maple: We start out using Maple as a calculator, where numbers are not limited to the hardware integers or floating-point numbers, and can be made up of symbols, which is useful to calculate in field extensions. Polynomials and rational expressions: Computer algebra packages are essentially equation crunchers (in analogy with, or contrast to, the number crunching algorithms of numerical analysis). Therefore it is worthwhile to look into the internal data representations and basic expression manipulation facilities. Calculus: Integration is one of the highlights of computer algebra. The killer application which has made Maple into a commercial success is indeed calculus teaching. But we will do more than automating calculus. In Maple we can write procedures which take procedures as input and return procedures. Advanced Maple: Maple has many composite data types. differential and linear equations with Maple. Besides plotting, we can solve polynomial, Maple is available as a symbolic computing toolbox in MATLAB. MATLAB is another software system for scientific computation, originally designed for and still primarily used for numerical calculations. The fifth part of the course is an introduction to MATLAB ([7] is an excellent guide). 1.2 Computer Algebra Systems We divide computer algebra systems into general and special purpose systems. Maple [9] is a general purpose system, designed to handle a wide variety of problems. Another general purpose computer algebra system is Mathematica [11]. Whereas Maple and Mathematica are commercial, Axiom [8] is free software. Special purpose systems are created to solve problems in a specific branch of mathematics, physics or engineering. For example, CoCoA [1], SINGULAR [5] and Macaulay [4] are three special purpose systems in the field of computational algebraic geometry. See [3] and [10] for an overview of other systems. Computer algebra systems are interactive and emphasize on exactness in their calculations, or when that cannot be achieved, on high precision calculations. Other properties are the facilities to manipulate expressions, the wealth of algorithms available, and the plotting capabilities. For instance, [> plot(exp(-x^2)*sin(pi*x^3),x=-2..2); Imagine the struggle for plotting this by hand. The goal of Computer Algebra is to automate tedious calculations (but not to replace reasoning by calculation). Maple gives you access to advanced mathematical tools. Rather than struggling to implement the mathematical techniques in some lower level language, Maple offers a nice interface to its kernel and library. In this lecture we learn how to create Maple worksheets. With some effort and discipline, these worksheets can be used very efficiently and effectively to do mathematics. Sometimes you have to assist Maple to arrive at good results. Another problem is expression swell. We give an example, testing the fundamental theorem of calculus: integration is antidifferentiation. Jan Verschelde, January 17, 2007 UIC, Dept of Math, Stat & CS Maple Lecture 1, page 1

Let us type in the following commands: [> formula := (x^2+1)^25; [> integrand := diff(formula,x); [> integral := Int(integrand,x); [> answer := value(integral); The answer is not quite as expected. Observe that there is no constant term in the expression above. The problem is in the choice of the integration constant. [> factor(answer+1); The example above is also an illustration of expression swell in the intermediate answers of a calculation. The result of the integration can be represented by a compact formula, with a right choice of the integration constant. 1.3 Using Maple in Worksheet and Command Line Mode A first version of these lecture notes was written using Maple 8. The current version of Maple is Maple 10. Whenever necessary, we will indicate the differences in the releases. In worksheet mode, we have the choice at least on PCs running Windows between the Classic Worksheet (orange icon) and the newer Standard Worksheet (red icon). The Standard Worksheet is a more advanced graphical user interface, you will notice the Palettes, but requires more memory. Compared to the Classic Worksheet, launching Maple in Standard Worksheet mode is noticeably slower on most current computers. For this course, we will almost always use Maple with Classic Worksheets. A new feature of Maple 10 is the Document Mode. This mode gives a Maple worksheet the same look as any mathematical text on paper, but still with access to the full mathematical engine, so that the document is still very much alive like a computer program. At any time, the user can switch between the Worksheet and the Document mode. At the opposite end of the possible ways to use Maple is the command line mode. After opening a Command Prompt window, one can launch Maple by typing cmaple10. Note that, for this to work, it may be necessary to adjust the PATH variable in the environment. This command line mode could be very useful when running Maple on a remote server, say via a slow telephone line, when the graphical user interface would become too expensive to use. Another application of the command line mode is the running of batch jobs which do not require any user interaction. 1.4 Design of Maple and Worksheets Maple consists of four parts: kernel, interface, library, and share library. The share library collects user contributions, available online at the Maple Application Center, visit http://www.mapleapps.com. While for efficiency reasons most kernel routines are written in C, the procedures in the library are written in the language of Maple and can be viewed: [> interface(verboseproc=3); # to show Maple code [> print(factor); One of the strongest features of Maple is the worksheet. A worksheet can be viewed as a regular text document, but enhanced with computational features like a spreadsheet, or with layers and links like hypertext. Organization: We organize a worksheet in sections and subsections as we would structure a technical report. With the insert menu we place headings for sections and subsections. Jan Verschelde, January 17, 2007 UIC, Dept of Math, Stat & CS Maple Lecture 1, page 2

Text and Commands: When Maple waits for a command, we see the prompt: [> # waiting for a command If instead of a command, we want to insert text, we can remove the > with the backspace to obtain [ # waiting for text We can format texts via the options of the format menu. Execution Groups: Like a paragraph of text is a collection of sentences to be read and understood in the same context, an execution group in Maple is a sequence of instructions to be executed as one. With the Split or Join option in the edit menu we can respectively break or make execution groups. Order of Execution: When we load an existing Maple worksheet into memory (see the options in the file menu), the worksheet is considered as plain text. We must execute the instructions (via Execute from the edit menu) to give values to the variables. The worksheets we make will follow the rules of good worksheet hygiene [2, pages 26-27]. Following is a brief adaptation of these rules: 1. Always begin a worksheet with a restart command. When executing an entire worksheet, the restart will ensure that all variables are freed from any previous values and settings. 2. While commands in a worksheet may be executed in any order, we will always use a strict linear topdown order of the commands in the worksheet. The execution of an entire worksheet is then similar to running a program. 3. Think of a worksheet as a research paper and use titles, sections, and subsections to give a meaningful structure to the order of computations. A typical structure could for example be the derivation of the equations governing a mathematical model, an appropriate choice of algorithm(s), results of running the algorithm(s) on various data, plots visualizing the results, ending with conclusions. 4. Use text to explain what the assumptions and goals are of your computations. 5. Instead of loading an entire package into the worksheet, use the long form, e.g.: plots[display](...) when only the display command from the plots package is needed. One of the main goals in this course is to learn how to exploit the features of Maple worksheet to design scientific programs at a level as close as possible to mathematical modeling. Jan Verschelde, January 17, 2007 UIC, Dept of Math, Stat & CS Maple Lecture 1, page 3

1.5 Assignments 1. Follow the New User s Tour (accessible as the third item from the help menu). Copy to a separate classic(!) Maple worksheet those instructions you need to plot the following: 2. How can you see in Maple whether a function is part of the kernel, or written in the language of Maple? Hint: try viewing the code for the Maple commands diff and int. 3. Explain the difference between int and Int. Illustrate with an example. 4. Visit http://www.mapleapps.com and download one worksheet. Execute it and report on your experiences, answering the following questions: why did you choose this worksheet and what did you learn after executing the worksheet? 5. Make a worksheet with the content of this note. The worksheet must contain all section headings and all the Maple instructions in this note. 6. The command kernelopts(bytesalloc) returns the total number of bytes allocated by the Maple mathematical kernel. Execute this command in a Standard Worksheet, in a Classic Worksheet, and in the command line version of Maple. Compare the three values returned by this command and use these to explain why launching Maple in the Standard Worksheet mode is much slower. Jan Verschelde, January 17, 2007 UIC, Dept of Math, Stat & CS Maple Lecture 1, page 4

References [1] CoCoATeam. CoCoA: a system for doing Computations in Commutative Algebra. Available at http://cocoa.dima.unige.it. [2] R.M. Corless. Essential Maple 7. An introduction for Scientific Programmers. Springer-Verlag, 2002. [3] J. Grabmeier, E. Kaltofen, and V. Weispfennig, editors. Computer Algebra Handbook. Foundations, Applications, Systems. Springer-Verlag, 2003. [4] Daniel R. Grayson and Michael E. Stillman. Macaulay 2, a software system for research in algebraic geometry. Available at http://www.math.uiuc.edu/macaulay2/. [5] G.-M. Greuel, G. Pfister, and H. Schönemann. Singular 2.0. A Computer Algebra System for Polynomial Computations, Centre for Computer Algebra, University of Kaiserslautern, 2001. http://www.singular.uni-kl.de. [6] A. Heck. Introduction to Maple. Springer-Verlag, third edition, 2003. [7] D.J. Higham and N.J. Higham. MATLAB Guide. SIAM, 2000. [8] R.D. Jenks and R.S. Sutor. AXIOM. The Scientific Computation Systems. Springer Verlag, 1992. Download a free version of AXIOM via http://www.nongnu.org/axiom. [9] Maplesoft. Maple 10. Getting Started Guide. Maplesoft, 2005. Available for download via http://www.maplesoft.com. [10] M.J. Wester, editor. Computer algebra systems: a practical guide. Wiley, 1999. [11] S. Wolfram. The Mathematica Book. Wolfram Media, Cambridge University Press, fifth edition, 2003. Online version via http://www.wolfram.com. Jan Verschelde, January 17, 2007 UIC, Dept of Math, Stat & CS Maple Lecture 1, page 5