35
IMPLEMENTING AN INTRODUCTORY MATHEMATICAL SOFTWARE COURSE Michael A. Karls Department of Mathematical Sciences Ball State University

I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

Embed Size (px)

Citation preview

Page 1: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

IMPLEMENTING AN INTRODUCTORY MATHEMATICAL SOFTWARE COURSEMichael A. Karls

Department of Mathematical Sciences

Ball State University

Page 2: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

2

ABSTRACT

We will look at the challenges of designing and implementing an introductory mathematical software course;

Provide an overview of topics covered and resources used for each type of software;

Give examples of homework problems, exam questions, and project topics chosen for the course;

Address issues that have arisen.

Page 3: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

3

INTRODUCTION

In fall 2007, I piloted a course, entitled MATHS 159 Introduction to Mathematical Software at Ball State University.

The course was designed to introduce mathematical science majors to “mathematical software” – in particular Excel, Mathematica, and MATLAB.

MATHS 159 was a direct result of work done with colleagues Irene Livshits and Richard Stankewitz as part of an Enhanced Provost Initiative Grant.

Page 4: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

4

DEPARTMENTAL RATIONALE (PORTION)

Currently, most of our math majors have difficulty with the technology they encounter in many of their classes.

One reason may be that most students in our programs don't have a solid foundation in both the mechanics of the software and the use of the software as a tool for doing mathematics. …

MATHS 159 … taken early in a student’s program, will provide a systematic introduction to mathematical software packages that are used in many of our upper level courses.

Page 5: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

5

DEPARTMENT OF MATHEMATICAL SCIENCES OVERVIEW Ball State University

Public institution Located in Muncie,

Indiana 20,000 students

Majors and minors: Actuarial Science Mathematical Sciences

(pure and applied mathematics options)

Mathematics Teaching, (middle and secondary school options)

Mathematical Economics (joint with Economics)

Minor in Mathematics

Program Enrollment (fall 2008) 240 undergraduate majors

97 Actuarial Science majors 112 Mathematics Teaching

majors 31 Mathematical Sciences

majors

Common core for all majors Calculus (three semesters) Linear algebra Discrete mathematics Senior capstone course MATHS 159 (starting in fall

2008).

Page 6: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

6

SOFTWARE USE IN DEPARTMENTAL COURSES Mathematical software use

in courses varies by course, major, and instructor.

Calculus sequence – approximately three Mathematica labs per course.

Linear Algebra – Mathematica or MATLAB component.

Mathematics Teaching majors take a junior-level course on teaching with software/technology that includes graphing calculators, Excel, Logo, and Geometer’s Sketchpad.

Actuarial Science majors use Excel extensively in their courses

Mathematical Science majors use MATLAB in their numerical analysis courses.

Other courses that routinely integrate mathematical software include Most actuarial science and

statistics courses (Excel, Minitab, SAS, R)

Mathematical Models (Mathematica, Excel, MATLAB).

Differential Equations (Mathematica)

Operations Research (Mathematica, Excel, MPL, LINGO).

Page 7: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

7

INITIAL CHALLENGES

For MATHS 159, at first, all I had for a course guide/template was a master syllabus and a list of technology topics.

From this, I had to create a set of course materials at a level appropriate to freshman who would be concurrently enrolled in first-semester calculus.

Page 8: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

8

EXCEL RESOURCES Introductory Resources

Ball State mini-course Greg, H., Excel 2003 for

Dummies. Walkenbach, J., Excel 2007 Bible.

Online Resources Microsoft Office Online.

Microsoft Excel – math and trigonometry functions. http://office.microsoft.com/en-us/excel/CH100645361033.aspx

Microsoft Office Online. Microsoft Excel – list of worksheet functions. http://office.microsoft.com/en-us/excel/HP100791861033.aspx

James, B.W., Excel Tutorial. http://people.usd.edu/~bwjames/tut/excel/

French, T. Excel IF functions - Using IF functions in Excel Spreadsheets. About.com. http://spreadsheets.about.com/od/excelfunctions/a/if_funct_hub.htm

Solver Add-On Tutorial Hillier, F. S. & Lieberman, G. J.,

Introduction to Operations Research (8th ed.).

Finance and Simple Linear Programming Lial, M. L., Miller, C. D., &

Greenwell, R. N., Finite Mathematics and Calculus with Applications (4th).

Mooney, D. & Swift, R., A First Course in Mathematical Modeling.

Population Growth and Optimization Olinick, M., An Introduction to

Mathematical Models in the Social and Life Sciences.

Stewart, J., Calculus (early transcendentals). (5th).

Page 9: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

9

MATHEMATICA RESOURCES Introductory Resources

Built-in Help Files Burkhardt, W., First Steps

in Mathematica. Help References

Wolfram, S., Mathematica: A System for Doing Mathematics by Computer (2cd)

Wolfram Research. http://www.wolfram.com/

Wolfram Research. Wolfram Screencast and Video Gallery. http://www.wolfram.com/broadcast/.

Mathematica Tutorial and Lab Resources Karls, M., Mathematica

Tutorial. http://www.bsu.edu/web/mkarls/MathematicaTutorial08.nb.

Emert, J. & Nelson, R., Calculus and Mathematica.

Calculus Resources Hollis, S., CalcLabs with

Mathematica. Stewart, J., Calculus (early

transcendentals). (5th).

Page 10: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

10

MATLAB RESOURCES Introductory Resources

Built-in Help Files University of Utah. MATLAB

Tutorial. http://www.math.utah.edu/lab/ms/matlab/matlab.html/.

Sigmon, K., MATLAB Primer (3rd) Calculus with MATLAB

Jenson, G., Using MATLAB in Calculus.

Most of the mathematics for this section was calculus based, at the level of differentiation, Riemann sums, and integration.

We also touched on programming and graphing, using examples from the previous sections.

Linear Algebra Resources (MATLAB is matrix-based) Anton, H. & Rorres, C.,

Elementary Linear Algebra (7th)

Lewand, R.E. Cryptological Mathematics.

To help tie the other software to MATLAB, we looked at how to solve linear systems in Excel and Mathematica. Systems of linear equations

and matrices Excel files. Supplement to Finite Mathematics, (7th ed.), by Margaret Lial et al. http://wps.aw.com/aw_lial_finitemath_7/0,1769,12520-,00.html

Page 11: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

11

INTRODUCTORY SURVEY

Given on the first day, 20-30 min allowed. Problems to be done

by hand. All questions appear

in the first Excel lecture!

1. For the integers n = 1, 2, 3, … 99, 100, find each of the following:

a. n^2 b. n^3c. 4n^3 + n^2 -1d. 1 + 2 + … + n

(Note: For n = 1, the sum is 1. For n = 2, the sum is 1 + 2.)

Page 12: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

12

INTRODUCTORY SURVEY

2. The data in the following table are the land area in Australia colonized by the American marine toad (Bufo marinis).

a. Plot this data with Year on the x-axis and Area on the y-axis.

b. Find a function that can be used to predict this growth.

c. Estimate when Australia will be overrun by the toads (Australia’s area is 7,619,000 km2).

Year Area(km^2)

1939 32800

1944 55800

1949 73600

1954 138000

1959 202000

1964 257000

1969 301000

1974 584000

Page 13: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

13

INTRODUCTORY SURVEY

3. Sort the following list of birthdays of famous mathematicians according to their

a. Birth Yearb. Namec. Birth Year followed

by Name

Birth Year Name Birth Year Name

1584 Vernier 1840 Henrici

1646 Flamsteed 1852 Le, P.

1736 Bring 1900 Aiken

1739 Klügel 1878 Bernstein, F.

1939 Baker 1909 Black

1852 Frattini 1920 Pillai

1888 Courant 1946 Margulis

1924 Cohn 1880 Bernstein, S.

1942 Hawking 1796 Bienaymé

1814 Wantzel 1801 Cournot

1819 1867 Bôcher

1883 Keynes 1883 Schouten

1816 Wolf 1910 Turán

1905 Dubreil-Jacotin 1910 Koopmans

1906 Feller 1911 Kakutani

1922 Marchenko 1939 Kingman

1818 Joachimsthal    

Page 14: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

14

TOPICS OVERVIEW IN ORDER PRESENTED Topics in Excel

Definitions and Terminology Finance Applications – Simple

and Compound Interest Finance Applications – Annuities

and Amortization Logical Functions and

Conditional Formatting Mathematical Functions Recurrence Relations Population Models The Excel Solver

Topics in Mathematica Basic Syntax and Basic

Commands Entering Text, Formatting, and

Using the Help File Formatting and Working with

Tables

Topics in Mathematica (cont.) Calculus Commands Parametric Curves and

Surfaces; Animation Importing and Exporting Data Optimization Numerical Computation Simple Programming Systems of Equations

Topics in MATLAB Elementary Matrix Theory Numerical Differentiation and

Integration in MATLAB; Function M-files

Working with Data in MATLAB The Symbolic Toolbox Programming in MATLAB

Page 15: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

15

SAMPLE EXCEL HOMEWORK QUESTION Using the data from the Toads Example,

Create a table in Excel with a column for years and a column for area. Make a scatter plot that includes a labeled best-fit line. Find the area predicted by the Excel best-fit line, error, and relative error. Compare the best-fit line model values and resulting errors to the graphs.

THEY DON’T AGREE – DUE TO ROUNDING IN THE TRENDLINE FORMULA! Repeat with y = 13568.1x -2.63405*10^7, found via Mathematica’s “Fit”

command. Which linear model is better – Excel’s or Mathematica’s? Why? Use the “better” best-fit line to help estimate graphically when Australia will

be overrun by toads (Australia total area is 7,619,000 km^2). I have gotten a lot of mileage out of this set of data – related questions

and examples include: Calculating the best-fit line slope and y-intercept several different ways

(formulas, built-in functions, Excel’s Solver); Treating toad growth as a recurrence relation; Fitting the data to exponential, logistic, or polynomial models (in all three

types of software). Source: Blanchard, P. (1994). Teaching differential equations with a

dynamical systems viewpoint. College Journal of Mathematics, 25 (5), 385-393.

Page 16: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

16

SAMPLE MATHEMATICA LAB QUESTION For the function f(x) = x^3+x-4, Define the function f[x], Choose an x-coordinate x = a, Define a function m[h] that

computes the slope of the secant line between (a,f(a)) and (a+h,f(a+h))

Reproduce the given graph that includes a tangent line at (1,-2) and secant lines that will converge to the tangent line as the slider controlling h is moved.

The curves are made with a Plot command, the dots are made with a ListPlot command, and the two plots are combined with a Show command. f[x_]:=x^3+x-4 a=1; m[h_]:=(f[a+h]-f[a])/h.

h

0 . 6 3 2

1 0 1 2 3 6

4

2

0

2

4

6

x

f x

Page 17: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

17

SAMPLE MATLAB EXAM QUESTION

Let g(x) = exp[-(1/2) x^2]. Find the actual derivative of this function, g’(x). Find the numerical derivative of g(x) on the

interval [-1, 1]. Use a Riemann sum to numerically estimate the

definite integral of g(x) on the interval [-1,1]. Extra Credit: Find the integral of g(x) on the

interval [-k, k] symbolically. Then find the value of this integral if we replace k

with infinity, two ways – numerically with increasing k-values and symbolically with a limit.

The idea for this problem comes from similar examples in Jenson’s Using MATLAB in Calculus.

Page 18: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

18

FINAL PROJECT Part of a student’s course

grade is based on a final group project which includes a class presentation.

Each project applies ideas from calculus to real-world problems or situations and can be investigated with the software tools studied in the course.

Source: Straffin, P. (Editor). Applications of calculus: Volume 3. MAA Notes (29). Washington, DC: Mathematical Association of America Press.

Project Title TopicCalculus

Ideas UsedArea of

Application

1Fitting Lines

to Data

Minimizing quadratic polynomials finds the regression line to a data set

Derivatives to find local extrema, logarithm and exponential functions

Statistics

2Somewhere within the Rainbow

Minimizing Trigonometric functions to explain properties of a rainbow

Derivatives of trigonometric functions, finding maxima and minima

Optics, Meteorology

3Measuring

Voting Power

Integrals of polynomials give a measure of voting power

Average value of a function, integration of polynomials, mathematical induction

Political Science

4How to Tune

a Radio

Trigonometric integrals explain tuning a radio

Differentiation & integration of sines and cosines

Signal Analysis

Page 19: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

19

COURSE LOGISTICS The course meets 200

minutes per week, with at least one 100 minute (double) period.

The double period works well for in-class exams.

PowerPoint or other appropriate electronic formats as well as chalkboard are used for interactive lectures.

Lectures and files for examples are posted on line before each class period.

Three in-class exams, one for each type of software – software use is required.

Students may use 5” by 8” index card (one

side) Help files No other course material

Electronic files for exam solutions are emailed to me (and a course graduate assistant for back up).

Page 20: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

20

COURSE ISSUES Since the course is different than

“traditional courses”, I have had to work out bugs as they arise – most of which can be classified as one of the following:

Technological issues related to using computers in general, such as Not being able to log into a

network to get to the class web page,

Not knowing where a file is saved, Trouble with saving a file in a

certain format, Not knowing how to email a file.

Logistical issues related to running the course, such as Finding ways to effectively collect,

grade, and return student lab work and exams.

Software issues related directly to specific course software, such as Getting errors while trying to

work out an example in class or on homework problem.

Mathematical issues related to the course content, especially questions on labs and exams, such as Being able to interpret a

question, Knowing how to start a

question, Figuring out how the question

relates to the course lectures, Using the software to answer

the question.

Page 21: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

21

COURSE SOLUTIONS Technological

Many of these issues occur only once and are unpredictable, but can usually be “fixed” immediately.

Having a graduate assistant in the course to help answer student questions has worked well.

Logistical Several attempts were made,

including submitting work to Blackboard (which doesn’t recognize Mathematica files), turning in hard copies of work to be graded by hand, and saving exam work to laptops.

Overall, email has turned out the be the best way for students to turn in their work.

Homework is graded electronically and returned via printed summary sheet.

Software Most problems with the software

boil down to entering incorrect syntax and are “easily” remedied once the syntax error is found.

As each software section (and the semester) progresses, these errors occur less frequently.

Mathematical Ignoring syntax issues,

mathematical issues tend to arise from lab or exam questions that students do not understand or know how to interpret.

Since I am making up or getting the questions from various sources, I revise, rewrite, or throw out questions as needed and provide liberal hints in lab, office hours, and via email.

Page 22: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

22

COURSE SUCCESS

Overall, I feel that the course has been a success, based on Feedback from students (in person and on evaluations), Comments from colleagues who have taught the

course, Student performance on exams, Student pass rate (77% earned a grade of C or higher), Departmental support for the course, Student confidence in using the software by the end of

the course, especially Mathematica. Informal input from colleagues who teach courses that

use the software: More students in our introductory statistics course report

familiarity with Excel, Our students in numerical analysis are more confident and

fluent with MATLAB than in the past.

Page 23: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

23

STUDENT PERCEPTIONS

Fall 2007 students felt that the course was

valuable to them and wished it would have been offered earlier in their college career.

Mostly upper class majors, 12 students.

Fall 2008 students indicated that they didn’t see the

value of the course to their major.

Mostly first-semester freshman, twice as many students.

Similar sentiment for the versions taught in Fall 2009 – the course was a mix of upper and lower level students.

Page 24: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

24

AN UNEXPECTED ISSUE

MATHS 159 is required of all freshman majors. Sections are capped at 25 students. Only two sections offered per semester. This leads to a potential “bottleneck” for

students entering our programs. For this reason, since fall 2010, the course is now

taken in a students’ sophomore year after completing one semester each of calculus and discrete mathematics.

In addition, since Mathematics Teaching majors already have a technology course, only Actuarial Science and Mathematical Science majors are required to take the course.

Page 25: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

25

THE FUTURE!

As the course progresses, in whatever form it takes, many more examples, homework problems, exam questions, and final projects will have to be created.

I look forward to the challenge of continuing to find ways to help increase students’ awareness of the usefulness of software for their mathematical careers!

Page 26: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

26

REFERENCES

For more detail and a list of all references used for the course, please see: Implementing an Introductory Mathematical

Software Course. The Electronic Journal of Mathematics and Technology. Vol. 4, No. 3, 232-250, October 2010.

https://php.radford.edu/~ejmt/

Page 27: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

27

EXTRA SLIDES – COURSE TOPICS DETAIL

Page 28: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

28

TOPICS IN EXCEL – DETAIL Finance Applications – Simple and Compound Interest:

Simple Interest, Compound Interest, Present Value, What-If Analysis (Scenario Manager and Goal Seek)

Finance Applications – Annuities and Amortization: Sequence (Fibonacci, geometric); Series (partial sum, closed form); Annuities as partial sums; Annuities (ordinary, annuities due); Future Value of an Ordinary Annuity; Sinking Fund; Using Excel’s built-in functions to perform these calculations; Present Value of an Annuity; Mortgage; periodic payments; Amortization Schedule

Logical Functions and Conditional Formatting: Logical Functions (TRUE, FALSE, NOT, AND, OR, IF, IFERROR); Nested IF; LOOKUP; Conditional Formatting

Mathematical Functions: Common Mathematical Functions (SQRT, ABS, EXP, LN, LOG10, POWER, ROUND, SIN, COS, TAN, CSC, SEC, COT, PI, RADIANS); Best-Fit Lines (SUMPRODUCT, SLOPE, INTERCEPT); Excel’s Trendline Feature (number of digits, exponential); Rates of Change (average, instantaneous, tangent line, derivative); Engineering Functions (BIN2DEC, HEX2DEC, CONVERTCOMPLEX, IMPRODUCT); Excel Add-Ins

Page 29: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

29

TOPICS IN EXCEL – DETAIL Recurrence Relations: Recurrence Relation (factorial

function, Fibonacci sequence, compound interest); Initial Conditions and Order; Closed-form solutions (compound interest, Fibonacci sequence); Exponential Function; Exponential Growth and Decay; Damped or Undamped Oscillation; Fixed Points and Stability

Population Models: Finding a recurrence relation from a closed-form model (exponential growth for toad population data); The Logistic Model; Using Excel to study growth rates with different carrying capacities and a fixed growth rate; Fixed points in the logistic model; Two or more populations (predator-prey, host-parasite, competitive hunter, arms race); Predator-Prey (foxes and rabbits) in Excel – recurrence relations; Revised Predator-Prey Model which includes logistic growth

The Excel Solver: Maximizing an area enclosed by a fence; Minimizing least squares error in an approximating function (SUMXMY2); Maximizing office storage space (simple linear programming, naming a range of cells); Excel’s Solver Add-In

Page 30: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

30

TOPICS IN MATHEMATICA – DETAIL Basic Syntax and Basic Commands: Basic Syntax;

Constants and Commands; Grouping Symbols (mathematical grouping, function syntax, list syntax); Types of Equals Signs (=, ==, :=); Calculator Commands (trigonometric functions, N); Symbol Manipulation (Clear, Expand, Factor, Solve, Apart, Together); Graphing Commands (Plot, ListPlot); Defining Functions ([ ], Simplify, /;)

Entering Text, Formatting, and Using the Help File: Entering Text and Formatting (changing text, palettes, shortcuts); Using the Help Browser (Plot3D example);

Formatting and Working with Tables: Table Command (TableForm, GridBox, FrameBox); Extracting or Working with Elements in Tables ([[ ]], Length); Tables of Graphs

Calculus Commands: Finding a Limit (Limit); Differentiating a Function (D, prime notation, higher-order derivatives); Integrating a Function (Integrate, NIntegrate); Evaluating Sums and Series (Sum)

Page 31: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

31

TOPICS IN MATHEMATICA – DETAIL Parametric Curves and Surfaces; Animation:

Parameterized Curves and Surfaces (ParametricPlot, ParametricPlot3D); Real-Time 3D Graphics (rotating, zooming); Animation (ListAnimate, Animate, Manipulate)

Importing and Exporting Data: Import and Export (Head, $Path); Filetypes (CSV, DAT, XLS, etc.); Put and Get (FilePrint, PutAppend, Needs, Flatten);

Optimization: FindMinimum and FindMaximum (local); Minimize and Maximize (global); Constraints; NMinimize and Nmaximize; Replacement Operator (/.)

Numerical Computation: FindRoot (Accuracy, WorkingPrecision, Chop); NSolve (solving polynomial equation or system polynomial of equations); NLimit vs. Limit; Nintegrate (Timing, MaxRecursion)

Page 32: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

32

TOPICS IN MATHEMATICA – DETAIL Simple Programming: Definition of Computer

Program; Logical Operators (And, Or, Not, Xor, Nor, Nand); If (piecewise defined function, absolute value function example using If vs. /;); Differentiating each version – which works better as a plot; Differentiating each version – which “works”; Which (piecewise defined function – more than two “pieces”, differentiating yields a function defined via Which); Switch; Nest (recurrence relations); Print (Hello World example, new line (\n)); Do (sum of squares, including a Print statement, adding an If statement, Return[ ]); For (local vs. global variables, Module, Continue[ ], Break[ ]); While (Coin Toss example, RandomInteger, using And to ensure While loop stops); Newton’s Method Example (by “hand”, simple Do loop, Do loop with intermediate outputs printed via Print, For loop, maximum 50 steps, tolerance checked via If)

Page 33: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

33

TOPICS IN MATLAB – DETAIL Systems of Equations: System of two equations in two unknowns;

Review of substitution and elimination; Solving a System of Equations with Technology (calculator, Mathematica, Excel); Using Excel’s Solver to solve a system of equations (2 x 2 case); Using Mathematica’s Solve command to solve a system of equations (2 x 2 case); General 2 x 2 system – what choices of coefficients are allowed?; Solving general 3 x 3 case (by hand, calculator, Mathematica, Excel, Other, when a solution is guaranteed, Mathematica solution)

Elementary Matrix Theory: Matrix definition and examples (row, column, vector); Matrix Notation ([A]ij = aij, square matrix); Arithmetic with Matrices (addition and subtraction, matrix multiplication, scalar multiplication); Identities and Inverses; Review of Real Number Properties (additive identity, multiplicative identity, additive inverse, multiplicative inverse); Matrix Properties (zero matrix, identity matrix, additive inverse); Multiplicative Inverse (2 x 2 case, setting up algebraic system to solve to find inverse); When is matrix A invertible? (determinant of a matrix, how to check if a matrix is invertible via determinant.); Linear Systems of Equations Revisited (2 x 2 linear system in matrix form, solve via multiplication by multiplicative inverses.)

Page 34: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

34

TOPICS IN MATLAB – DETAIL Introduction to MATLAB: MATLAB Basics (Desktop,

help, lookfor, doc, type, up – arrow, clc, Command History window); Entering Matrices; The Colon Operator (pulling out parts of a matrix, concatenating matrices); Matrix Operations (+, -, *, ^, ’, .’, inv, \, / ); Array Operations with matrices A and B, scalar k (k*A, A.*B, A./B, A.^B); Special Matrices and Matrix Functions (eye, zeros, ones, det, clear, clear all); Linear Systems of Equations with MATLAB (2 x 2); Making a Table of Values for a Function; Creating an M-File; MATLAB’s Path and Running an M-File; The Plot Command (plot, title, xlabel, ylabel, grid, legend); Multiple plots and piecewise-defined functions

Numerical Differentiation and Integration; Function M-files: Numerical Differentiation (linspace, diff, graphical comparison via subplot); Numerical Integration (Riemann sums via sum); Function M-Files

Page 35: I MPLEMENTING AN I NTRODUCTORY M ATHEMATICAL S OFTWARE C OURSE Michael A. Karls Department of Mathematical Sciences Ball State University

35

TOPICS IN MATLAB – DETAIL Working with Data: Useful built-in commands for

data manipulation (fzero, sum, min, max, length, mean, median, std, sort); Finding minimum of a function on an interval (numerically, discretely, via fzero); Represent a polynomial as a vector of coefficients (polyval, polyfit); Fit a polynomial to a set of data via least squares; Importing data from text file into MATLAB via Import Wizard; Fit data with polynomial; Compare to Excel’s Trendline or Mathematica’s Fit command

The Symbolic Toolbox: MATLAB’s built-in symbolic commands (syms, diff, int, simplify, pretty, subs, double, ezplot); MATLAB’s function calculator (funtool);

Programming: Plotting Toad Data; Making a Loop; Working with Symbolic Functions; Newton’s Method; Competitive Hunters Model