9
October 14 th Lecture Today’s lecture 1. The Final Project 2. Answers to PART B of Test Two 3. More Procedures in Maple 4. A Brief Lecture on Experimental Mathematics Next week we will learn how to plot things like this My current research

October 14 th Lecture

Embed Size (px)

DESCRIPTION

October 14 th Lecture. Today’s lecture The Final Project Answers to PART B of Test Two More Procedures in Maple 4. A Brief Lecture on Experimental Mathematics Next week we will learn how to plot things like this. My current research. The Final Project. - PowerPoint PPT Presentation

Citation preview

Page 1: October 14 th  Lecture

October 14th Lecture

Today’s lecture

1. The Final Project2. Answers to PART B of Test Two3. More Procedures in Maple

4. A Brief Lecture on Experimental Mathematics

• Next week we will learn how to plot things like this

My current research

Page 2: October 14 th  Lecture

I expect 16-20 power point slides or 10-15 pages in Word which describe (using an appropriate level of mathematical text setting, prose and images) a Maple based exploration of one or more related topics.

Examples – A handful of the Explorations

• anywhere in the Computer as Crucible– Two or Three of the Ten Things to Try– An essay on the History of Pi– Another topic of your own choosing

In each case we want to “sign off” with you on the topic before the break.

– Either with Matt in a Tutorial or by email or in person with me.

More on the Taxicab question I asked last week www.durangobill.com/Ramanujan.html and on a generalization http://mathworld.wolfram.com/TaxicabNumber.html

The Final Project

To pass, you just have to follow the rules.

To get a good mark, you have to show some initiative and

add some value.

Page 3: October 14 th  Lecture

Part B of in Test TwoProcedures are just fancier functions (in Maple attachment)

Calling Sequence

proc (argseq) local nseq; global nseq; options nseq; description stringseq; statseq end proc

proc (argseq)::type; local var1::type1, var2::type2, ...; global nseq; options nseq; description stringseq; statseq end proc

Parameters

argseq - the formal parameter names

type - (optional) an assertion on the type of the returned value

nseq - (optional) the names of local/global variables and the options in effect

var1,var2 - (optional) the names of local variables

type1,type2 - (optional) assertions on the types of local variables

stringseq - description lines for the procedure

statseq - the body of the procedure

Page 4: October 14 th  Lecture

Procedures in MapleProcedures are just fancier functions (in Maple attachment)

Calling Sequence

proc (argseq) local nseq; global nseq; options nseq; description stringseq; statseq end proc

proc (argseq)::type; local var1::type1, var2::type2, ...; global nseq; options nseq; description stringseq; statseq end proc

Parameters

argseq - the formal parameter names

type - (optional) an assertion on the type of the returned value

nseq - (optional) the names of local/global variables and the options in effect

var1,var2 - (optional) the names of local variables

type1,type2 - (optional) assertions on the types of local variables

stringseq - description lines for the procedure

statseq - the body of the procedure

Page 5: October 14 th  Lecture

Examples

> lc := proc( s, u, t, v ) description "form a linear combination of the arguments"; s * u + t * v end proc; (or just end)

lc := proc (s, u, t, v) description "form a linear combination of the arguments"; s*u+t*v end proc

> print( lc );

proc (s, u, t, v) description "form a linear combination of the arguments"; s*u+t*v end proc

> lc( Pi, x, -I, y );

See Also

envvar, error, Functions, index[procedure], kernelopts, last_name_eval, Operators, parameters, Parameter passing, Procedure options, remember, Procedure type checking, procedure[paramtype], procname, Reading and saving, arg, nargs, return, spec_eval_rules, type[procedure], type[function]

Procedures in Maple

x Iy

Page 6: October 14 th  Lecture

… best learned by example1. Basic procedures: keeps variables local

2. With loops and conditional steps:

Calling Sequence

| for <name> | | from <expr> | | by <expr> | | to <expr> | | while <expr> |

do <statement sequence> end do; (or od)

OR

| for <name> | | in <expr> | | while <expr> |

do <statement sequence> end do;

(Note: Phrases located between | | are optional.)

3. With recursive structure

4. With more complicated arguments

5. Using maple.ini files

Page 7: October 14 th  Lecture

Inside Math and MathResourceBoth are mathematics dictionaries on Steroids:

–They allow you also to obtain output/draw pictures that can be dropped into Word or PowerPoint or Excel, or ….–Inside Math (School) and the MathResource (University)–We also saw Portrait 4 (shown below)

• Its manual is on M2600 webpage

Page 8: October 14 th  Lecture

Maths dictionaries on Steroids:n. one of the five regular polyhedra, once imbued with great mystical significance: a cube, a regular tetrahedron, a regular octahedron, a regular dodecahedron, or a regular icosahedron. Johannes Kepler (1571 - 1630) was led to his discovery of the laws of planetary motion and his defence of Copernican astronomy by circum-scribing or inscribing the orbits of the five other known planets around the Platonic solids, with an inscribed or circumscribed circle representing the orbit of the Earth; the results agree with observation, allowing for eccentricity, to within approximately 5%.

(OCR from MathResource)

Inside Math and MathResource, IIFrom Inside Math

Page 9: October 14 th  Lecture

““The Crucible” The Crucible” AK Peters November 2008AK Peters November 2008