Introducing Programming using TI-Nspire Stephen Arnold, T 3 Australia



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

Quickstart for Desktop Version

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

Programming with TI-Nspire

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

Introduction to the TI-Nspire CX

TI-Nspire CAS Graphing Calculator

TImath.com Algebra 1. Absolutely!

Gerrit Stols

5: Magnitude 6: Convert to Polar 7: Convert to Rectangular

Graphing Quadratic Functions

TI-Nspire Technology Version 3.2 Release Notes

Solving Quadratic & Higher Degree Inequalities

Getting Started with the TI-Nspire CX/ TI-Nspire CX CAS Handheld

LAYOUT OF THE KEYBOARD

Grade level: secondary Subject: mathematics Time required: 45 to 90 minutes

Graphic Designing with Transformed Functions

Guide to Using the Ti-nspire for Methods - The simple and the overcomplicated Version 1.5

GeoGebra. 10 lessons. Gerrit Stols

Precalculus. What s My Locus? ID: 8255

5-3 Polynomial Functions. not in one variable because there are two variables, x. and y

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

Summary of important mathematical operations and formulas (from first tutorial):

Microsoft Excel 2010 Part 3: Advanced Excel

The Circumference Function

Graphing Parabolas With Microsoft Excel

Graphic Designing with Transformed Functions

BEST METHODS FOR SOLVING QUADRATIC INEQUALITIES.

The KaleidaGraph Guide to Curve Fitting

CRLS Mathematics Department Algebra I Curriculum Map/Pacing Guide

Solutions to Homework 10

The aim of this investigation is to verify the accuracy of Pythagoras Theorem for problems in three dimensions.

Lecture 2 Mathcad Basics

First Steps with. Technology for teaching and learning mathematics. Seven Introductory Tutorials for the Handheld

Math 0980 Chapter Objectives. Chapter 1: Introduction to Algebra: The Integers.

Scientific Graphing in Excel 2010

Course Outlines. 1. Name of the Course: Algebra I (Standard, College Prep, Honors) Course Description: ALGEBRA I STANDARD (1 Credit)

Method To Solve Linear, Polynomial, or Absolute Value Inequalities:

GeoGebra Statistics and Probability

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

Pre-Calculus Graphing Calculator Handbook

0 Introduction to Data Analysis Using an Excel Spreadsheet

MODERN APPLICATIONS OF PYTHAGORAS S THEOREM

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

EQUATIONS and INEQUALITIES

Introduction to SketchUp

Dealing with Data in Excel 2010

2.2 Derivative as a Function

3.3. Solving Polynomial Equations. Introduction. Prerequisites. Learning Outcomes

Introduction to SPSS 16.0

Academic Support Center. Using the TI-83/84+ Graphing Calculator PART II

Factoring Patterns in the Gaussian Plane

EL-9650/9600c/9450/9400 Handbook Vol. 1

3.3 Real Zeros of Polynomials

UCL Depthmap 7: Data Analysis

MAT12X Intermediate Algebra

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

Intermediate PowerPoint

SAMPLE. Computer Algebra System (Classpad 330 using OS 3 or above) Application selector. Icolns that access working zones. Icon panel (Master toolbar)

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

By Clicking on the Worksheet you are in an active Math Region. In order to insert a text region either go to INSERT -TEXT REGION or simply

Lecture 8 : Coordinate Geometry. The coordinate plane The points on a line can be referenced if we choose an origin and a unit of 20

Concepts Sectors, arcs, circumference, areas of circles and properties of cones.

A Short Introduction to Eviews

Euler s Method and Functions

Estimating a market model: Step-by-step Prepared by Pamela Peterson Drake Florida Atlantic University

TIBCO Spotfire Business Author Essentials Quick Reference Guide. Table of contents:

x 2 + y 2 = 1 y 1 = x 2 + 2x y = x 2 + 2x + 1

TI-83/84 Plus Graphing Calculator Worksheet #2

Solving Rational Equations

Solving Systems of Two Equations Algebraically

Indiana State Core Curriculum Standards updated 2009 Algebra I

TurboNest. What s New. Version Released April Copyright 2014 Hypertherm, Inc. All rights reserved.

Math 132. Population Growth: the World

Introduction To Microsoft Office PowerPoint Bob Booth July 2008 AP-PPT5

TIphysics.com. Physics. Bell Ringer: Mechanical Advantage of a Single Fixed Pulley ID: 13507

Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method


PYTHAGOREAN TRIPLES KEITH CONRAD

Simple Regression Theory II 2010 Samuel L. Baker

3.2 Sources, Sinks, Saddles, and Spirals

1.2 GRAPHS OF EQUATIONS. Copyright Cengage Learning. All rights reserved.

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

University of Southern California Marshall Information Services

Excel I Sorting and filtering Revised February 2013

Number Who Chose This Maximum Amount

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

Biggar High School Mathematics Department. National 5 Learning Intentions & Success Criteria: Assessing My Progress

What is the difference between simple and compound interest and does it really matter?

Chapter 1 Linear Models page Linear Models Part 1 2 Linear Models Activities 1 17 Linear Models Part 2 21 Linear Models Activities 2 28

PLAY VIDEO. Close- Closes the file you are working on and takes you back to MicroStation V8i Open File dialog.

Elements of a graph. Click on the links below to jump directly to the relevant section

Solving Rational Equations and Inequalities

Click on the links below to jump directly to the relevant section

2.5 Zeros of a Polynomial Functions

Chapter 23: Drafting in Worksheet View

10.1. Solving Quadratic Equations. Investigation: Rocket Science CONDENSED

DRAFT. Further mathematics. GCE AS and A level subject content

Solutions of Equations in One Variable. Fixed-Point Iteration II

Anchorage School District/Alaska Sr. High Math Performance Standards Algebra

Transcription:

Introducing Programming using TI-Nspire Stephen Arnold, T 3 Australia 1. Getting Started with Functions Since OS release 1.3 (December 2007), the in-built programming capabilities of TI-Nspire have improved steadily. We now have a dedicated programming environment and the ability to store documents containing programs defined to be Public (LibPub) that we wish to share or access in other documents within Library folders, such as the default MyLib folder. The option still exists for defining simple functions and programs within the Calculator, as shown, and the programming tools are still accessible. (By the way the only allowable output for a function is a number (or algebraic expression in CAS), while programs can have many different outputs. Only functions can be used within L&S and G&G NOT programs.)

The dedicated programming environment, however, makes all this much easier for starters, pressing ENTER starts a new line here, while in Calculator it ends the program. Error checking tools (like Check Syntax and Store) are also available. My first attempts at programming on TI-Nspire involved writing functions like those shown that would make my life a little easier (arcsin and infinity are now in-built OS functions, but my shortcuts are still handy!) I use the computer version of TI-Nspire much more than the handheld, which is great until I want access to one of those special characters that are on the keypad, but not on the keyboard! (Like asin(x) and the infinity symbol). What about solving equations: do we really need to specify the variable when I am just solving in x? And wouldn't it be nice to integrate a function and get the constant term? If LibPub is included in the definition and the file that contains the program or function is placed in the MyLib folder, then it can be accessed any time from the Catalog. Note that the program must occur within Problem 1 of such a document if it is to be visible in this way. Simply call up the Catalog, choose 6: Libraries (5 on non-cas) and then find the document containing the program you wish to access: it will be dropped into your document with the source document name as a path name: so if the program complete is found in the document add.tns, its pathname will be add\complete( (This one completes the square for a quadratic with coefficients a, b and c). In order to have a syntax help line appear in the Catalog, simply insert a short comment (using Insert Comment from the Actions menu) as soon as you commence your program first thing after

the PRGM command. 2. Loops and Programs At the heart of many of my simple programs lies the For EndFor loop: For k, 1, 10 Disp k EndFor This would give the list of numbers from 1 to 10. Let's try something a little more challenging: How about Newton s Method for approximating the zeros of a differentiable function? We need a function (define this in G&G as f1(x)), a first guess and a number for the iterations). Suppose we define our program using the form Newton(guess, iterations)? The iterations value will define the For EndFor loop, and the guess will give our first approximation; we will need a variable for each new approximation. The variables defined as inputs to the function or program, by default, are Local - that is, they exist only within the program and vanish when it is complete. This is a good thing generally, or we would end up with variables everywhere. We don t particularly want our new_guess variable to survive, either, so we should define it as Local, along with the counter we will use for our For EndFor look. So we might begin like this: Can you find any errors? Ways that it could be improved? What about CAS?

This program actually generates the displayed step-by-step working of the process, but also a list, called newtonlist, of each of the iterations. It defines the list, initially containing only the first guess [Define newtonlist = {guess}]. After calculating the value new_guess it then adds that to the list: here it defines new terms for the list in terms of the counter variable, k. A more elegant approach would involve the augment(list1, list2) command. Here we could define the new list as: Define newtonlist = augment(newtonlist, {new_guess}) Try this and see how it works. Defining an artifact, such as a variable or list, which survives a program can be a very powerful tool within the dynamically linked environments of TI-Nspire. Lists can be called within a spreadsheet, within the scatter plots of Graphs & Geometry, and within Data & Statistics. The program webplot makes full use of this capability. Indeed, it offers instructions as to setting up the various environments to accept the results of the program so that, when run subsequently, the spreadsheet and graphs will automatically update to accommodate new values.

3. What about When? The single most powerful command available within TI-Nspire, in my experience, is the when statement: when(condition, result when true, result when false, result when undefined). For example, when(slider>0, 1, -1)

Notice the difference between what is possible within Graphs & Geometry and within Lists & Spreadsheet. Only numerical values may be output in G&G, but text values may be used in the spreadsheet. This opens some interesting possibilities, especially for CAS. The when statement is just the simplest form of the piecewise function, which offers multiple condition statements within a single definition. Consider the problem posed by John Mahoney in the TI-Nspire Google Group: I want the user to be able to change the values on a slider, k, so that in a Data and Spreadsheet page, if k = 1 then column (or variable b) is plotted against column (or variable a); if k = 2 then column (or variable c) is plotted against column (or variable a)... if k = 6 then column (or variable g) is plotted against column (or variable a). Create a few columns/lists in the spreadsheet (or Calculator!) and insert a D&S page which shows the scatter plot for, say, ColA and ColB. Insert a slider, called, slide. Now we wish to create a list (call it test) which will check the value of the slider, and, if it is 1, test will assume the values of ColA, if 2, test becomes ColB, and so on.

Very simple! 4. Dynamic Text and Other Things Finally, we bring this all together to demonstrate TI-Nspire as what amounts to an Object-Oriented programming environment, where the various objects of the Graphs & Geometry application become manipulables. The problem posed: For a given inequality, as I move a point around the screen, I wish to be informed whether I lie within the solution set, or not. Define an inequality (say, y <= 2x 1) and a point, for which the coordinates are displayed. Use the Text Tool to create TWO when statements as shown. Apply Calculate to each, inputting the x- coordinate for x and the y-coordinate for y.

I am choosing to locate my text at (-7, -4). I construct a perpendicular line through y = -4, and the output of my conditional statements, when true, is both -7. Use Measurement Transfer to drop this value onto the x-axis, and construct a perpendicular from that point to intersect y = -4. Immediately on constructing the first result, type True, and then repeat the process for the condition to be False. As you move the point around the quadrants, the text will change from True to False as required. (I hide the construction lines and minimize the named point so that it is hidden behind the text). Text which appears and disappears dependent upon some condition is a very powerful tool, but this does not stop there: any construction dependent upon a point (segment, line, shape ) can be made to respond in this way, opening the door to wonderful learning opportunities. With TI-Nspire programming, so much is possible. More and more, if there is a feature that I want that is not in-built, I am finding that there are ways to add this feature using programming, making a wonderful tool even better!