Using GeoGebra to create applets for visualization and exploration.



Similar documents
GeoGebra. 10 lessons. Gerrit Stols

Gerrit Stols

Quickstart for Desktop Version

Algebra and Geometry Review (61 topics, no due date)

Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks

Curriculum Map by Block Geometry Mapping for Math Block Testing August 20 to August 24 Review concepts from previous grades.

South Carolina College- and Career-Ready (SCCCR) Pre-Calculus

HIGH SCHOOL: GEOMETRY (Page 1 of 4)

Algebra 1 Course Title

Definitions, Postulates and Theorems

Advanced Math Study Guide

GeoGebra Help Official Manual 3.2

New York State Student Learning Objective: Regents Geometry

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

Birmingham City Schools

PRE-CALCULUS GRADE 12

Estimated Pre Calculus Pacing Timeline

New Higher-Proposed Order-Combined Approach. Block 1. Lines 1.1 App. Vectors 1.4 EF. Quadratics 1.1 RC. Polynomials 1.1 RC

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

Higher Education Math Placement

Math Placement Test Study Guide. 2. The test consists entirely of multiple choice questions, each with five choices.

MATH 095, College Prep Mathematics: Unit Coverage Pre-algebra topics (arithmetic skills) offered through BSE (Basic Skills Education)

GEOMETRY CONCEPT MAP. Suggested Sequence:

Geometry Enduring Understandings Students will understand 1. that all circles are similar.

Prentice Hall Mathematics: Algebra Correlated to: Utah Core Curriculum for Math, Intermediate Algebra (Secondary)

NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS

Extra Credit Assignment Lesson plan. The following assignment is optional and can be completed to receive up to 5 points on a previously taken exam.

Mathematics Georgia Performance Standards

MATH 21. College Algebra 1 Lecture Notes

Precalculus REVERSE CORRELATION. Content Expectations for. Precalculus. Michigan CONTENT EXPECTATIONS FOR PRECALCULUS CHAPTER/LESSON TITLES

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

Incorporating GeoGebra into Teaching Mathematics at the College Level

Cabri Geometry Application User Guide

MATH 2 Course Syllabus Spring Semester 2007 Instructor: Brian Rodas

Essential Mathematics for Computer Graphics fast

Geometry Course Summary Department: Math. Semester 1

Lyman Memorial High School. Pre-Calculus Prerequisite Packet. Name:

Administrative - Master Syllabus COVER SHEET

Conjectures. Chapter 2. Chapter 3

Chapter 6 Notes: Circles

Visualizing Triangle Centers Using Geogebra

Dear Accelerated Pre-Calculus Student:

Linear algebra and the geometry of quadratic equations. Similarity transformations and orthogonal matrices

a. all of the above b. none of the above c. B, C, D, and F d. C, D, F e. C only f. C and F

Chapters 6 and 7 Notes: Circles, Locus and Concurrence

GEOMETRY COMMON CORE STANDARDS

Geometry. Higher Mathematics Courses 69. Geometry

Gymnázium, Brno, Slovanské nám. 7, SCHEME OF WORK Mathematics SCHEME OF WORK. cz

COURSE SYLLABUS Pre-Calculus A/B Last Modified: April 2015

2, 3 1, 3 3, 2 3, 2. 3 Exploring Geometry Construction: Copy &: Bisect Segments & Angles Measure & Classify Angles, Describe Angle Pair Relationship

Graphic Designing with Transformed Functions

Math 1280/1300, Pre-Calculus

ab = c a If the coefficients a,b and c are real then either α and β are real or α and β are complex conjugates

North Carolina Math 2

Solutions Manual for How to Read and Do Proofs

PCHS ALGEBRA PLACEMENT TEST

Mathematics I, II and III (9465, 9470, and 9475)

Understand the Sketcher workbench of CATIA V5.

04 Mathematics CO-SG-FLD Program for Licensing Assessments for Colorado Educators

42 CHAPTER 1. VECTORS AND THE GEOMETRY OF SPACE. Figure 1.18: Parabola y = 2x Brief review of Conic Sections

MA107 Precalculus Algebra Exam 2 Review Solutions

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

Contents. 2 Lines and Circles Cartesian Coordinates Distance and Midpoint Formulas Lines Circles...

Algebra II. Weeks 1-3 TEKS

PYTHAGOREAN TRIPLES KEITH CONRAD

Section 1.1. Introduction to R n

Algebra 2 Year-at-a-Glance Leander ISD st Six Weeks 2nd Six Weeks 3rd Six Weeks 4th Six Weeks 5th Six Weeks 6th Six Weeks

KEANSBURG SCHOOL DISTRICT KEANSBURG HIGH SCHOOL Mathematics Department. HSPA 10 Curriculum. September 2007

Algebra II and Trigonometry

Creating HTML5 Apps with Geometry Expressions. A Guide to Making Interactive Math Apps

GeoGebra Transformation Activities

March 2013 Mathcrnatics MATH 92 College Algebra Kerin Keys. Dcnnis. David Yec' Lscture: 5 we ekly (87.5 total)

Common Core Unit Summary Grades 6 to 8

Sequence of Mathematics Courses

Science, Technology, Engineering and Math

Conjectures for Geometry for Math 70 By I. L. Tse

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

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

Mathematics 31 Pre-calculus and Limits

Understanding Basic Calculus

MATH. ALGEBRA I HONORS 9 th Grade ALGEBRA I HONORS

Determine whether the following lines intersect, are parallel, or skew. L 1 : x = 6t y = 1 + 9t z = 3t. x = 1 + 2s y = 4 3s z = s

Polynomial Operations and Factoring

Exploring Geometric Transformations in a Dynamic Environment Cheryll E. Crowe, Ph.D. Eastern Kentucky University

Polynomials. Dr. philippe B. laval Kennesaw State University. April 3, 2005

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

Access Code: RVAE4-EGKVN Financial Aid Code: 6A9DB-DEE3B-74F

DEFINITIONS. Perpendicular Two lines are called perpendicular if they form a right angle.

Solutions to Practice Problems

The Australian Curriculum Mathematics

Geometer s Sketchpad. Discovering the incenter of a triangle

SAT Subject Math Level 2 Facts & Formulas

CRLS Mathematics Department Algebra I Curriculum Map/Pacing Guide

Introduction to the TI-Nspire CX

NEW MEXICO Grade 6 MATHEMATICS STANDARDS

o Graph an expression as a function of the chosen independent variable to determine the existence of a minimum or maximum

1. A student followed the given steps below to complete a construction. Which type of construction is best represented by the steps given above?

CK-12 Geometry: Parts of Circles and Tangent Lines

TI-Nspire Technology Version 3.2 Release Notes

Zeros of Polynomial Functions

Transcription:

Handouts for ICTCM workshop on GeoGebra, March 2007 By Mike May, S.J. mikemaysj@gmail.com Using GeoGebra to create applets for visualization and exploration. Overview: I) We will start with a fast tour of a number of applets that have been created with GeoGebra. These applets are available at http://www.slu.edu/classes/maymk The applets were chosen to demonstrate some of the possibilities in constructing visualizations. II) Having looked at GeoGebra as a tool to prepare visualizations in advance, we then look at GeoGebra as a free form exploration tool, combining graphics, with algebraic description. III) We will then work through constructing a demonstration in GeoGebra, saving it as a dynamic web page, and polishing the demonstration. We will start with an application that demonstrates a standard theorem from geometry. IV) As part of the polishing process, we will look at issues that should be considered in designing a pedagogical tool, making it effective for students. V) The use of javascipt will be introduced. VI) We will discuss resources for future work and projects for consideration.

GeoGebraApplets http://www.slu.edu/classes/maymk/geogebra/ GeoGebra Applets GeoGebra is a GNUed software package for mathematics visualization. The home for the applications is http://www.geogebra.at. Educational material for GeoGebra is available at http://www.geogebra.at/en/wiki The following are some Applets pages I have created with the software. Some of the applet pages look at standard constructions from calculus, making the pictures dynamics and subject to manipulation by the instructor. The tangent as the limit of secant lines. The slope of tangents and the derivative of a function. The graph of a function and its first and second derivatives in the same window. The Newton's Method page illustrates the use of tangent lines to find roots of functions. It also gives examples where the technique fails. The Taylor polynomial approximation of a function. Some pages look at precalculus material to allow a quick review, The Linear Equations page connects the normal ways of defining a line, either by giving two points, or by giving a point and a slope, or by giving the slope and intercept. Each window connects a set of information with a line and derives the other presentations of the line. The Quadratic Equations applet allows you to make connections between the graph of a quadratic function, and various ways to write the equation, focusing either on roots or the vertex of the parabola. Conic Sections - The Ellipses and Hyperbolas applet lets you specify a conic section by specifying the length from the center to a vertex on the major axis and the length to a focus. You get either an ellipse or a hyperbola, depending on which length is bigger. The Parabolas applet looks at Parabolas defined by a focus and a directrix. The General Conic Sections applet lets you explore the graph of a quadratic relation in general format. Graphs of related functions -The family of curves applet lets you graph a function with three parameters and then vary those parameters with a slider. The Translations and Compressions Applet lets you compare the graph of a function with the graph of a function transformed by translations and compressions or expansions. Trigonometric Functions - The Trig Review applet connects the values of the 6 basic trig functions with segments on the unit circle. The Sin Curve Fitting applet lets you fit a sinusoidal curve to a pair of specified points. Some of the applet pages look at standard results in the construction of triangles. The side-side-side applet, lets you construct a triangle by specifying the lengths of the three sides. If such a triangle can be constructed, it is unique. The side-angle-side applet, lets you construct a triangle by specifying the lengths of two of the sides and the included angle. If such a triangle can be constructed, it is unique. The angle-side-angle applet, lets you construct a triangle by specifying the lengths of two of the sides and the included angle. If such a triangle can be constructed, it is unique. The side-side-angle applet, lets you construct a triangle by specifying the lengths of two of the sides and an non-included angle. If such a triangle can be constructed, it may not be unique. The angle bisector applet looks at the theorem that the three angle bisectors of a triangle all meet in a single point. The first frame lets the student explore the result with various triangles. A second 1 of 2 3/17/08 1:47 PM

GeoGebraApplets http://www.slu.edu/classes/maymk/geogebra/ construction adds details that give a framework for a proof. The side bisector applet looks at the theorem that the three perpendicular bisectors of the sides of a triangle all meet in a single point. The first frame lets the student explore the result with various triangles. A second construction adds details that give a framework for a proof. The concurrent medians applet looks at the theorem that the three medians of a triangle all meet in a single point. The first frame lets the student explore the result with various triangles. A second construction gives a framework for establishing a lemma about tiling an area with congruent triangles. The third construction uses the lemma to adds details that give a framework for a proof. The concurrent altitudes applet looks at the theorem that the three altitudes of a triangle all meet in a single point. The first frame lets the student explore the result with various triangles. A second construction adds details that give a framework for a proof. The Pythagorean theorem applets walks through a visual proof of the Pythagorean theorem. Some of the pages are of interest to explore some of the features of GeoGebra. The Regular Polygon and Circle applet looks at constructions with sequences. The applet on constructing triangles and quadrilaterals has two copies of the applet running on the same page. This Blank GeoGebra page applet opens with a blank page, but double clicking on the page launches the application on your machine. From there you can make clean constructions and save them yourself. Return to the Applets for courses below calculus page. Return to the Calculus Applet page. Last updated By Mike May, S.J., November 21, 2007. 2 of 2 3/17/08 1:47 PM

Items to note: 1) Sliders with dynamic control of values. 2) Javascript line for controlling viewing window 3) Javascript line that gets and returns function definition, using parameters 4) Javascript line for drop down menu of examples 5) Customizations - Restricted toolbar with only 4 tools available; No command line; No algebra window. Notes on use:

Items to note: 1) The Javascript line for controlling viewing window has been repeated as have the customizations. 2) The Javascript line for the function has a second input for guessing the derivative. (This is the dotted line in the default picture. It has been set incorrectly so the students need to produce it.) 3) The value of the point T is in a separate Javascript line since the point and functions will be changed at different times.

Items to note: 1) The Javascript line for controlling viewing window has been repeated as have the customizations. 2) The Javascript line for the function has extra information that one would want in doing taylor polynomials. 3) The text area gives a lot of textual information.

Items to note: 1) The Javascript line for controlling viewing window has been repeated as have the customizations. 2) The center, the lengths of the major and minor axes, and the point on the conic can be changed by dragging. 3) A lot of information about the conic is given as text with an organization of regions as controls, measurements, and summary data. 4) (Below) Changing the focus lenth and major length changes the kind of conic, with different text showing up using conditional definitions.

Items to note: 1) Several GeoGebra windows are used in a single page. 2) Text, objects, and labels are connected by use of color.

Items to note: 1) Check boxes are used to make items appear and disappear.

Items to note: 1) The slider walks students through the steps of a proof. 2) The vertices are dynamic and can be changed by dragging.

An overview of the functionality of GeoGebra Many of the geometric object can be created using the icon menus. The composite picture above shows the icons in the pictures. Most are clear enough to understand from the icon. The next page shows each menu along with the text descriptions that accompany the icons. GeoGebra also has more algebraic commands available from the input line. (The commands invoked by the icons each have text based versions.) I have organized some of those common courses in the pages that follow.

It is useful to see a screen where some objects have been created. One should also note that properties of objects can be modified.

GeoGebra Commands of interest for conic sections General x(p), y(p) Parametric curves Curve[expression e1, expression e2, parameter t, number a, number b]: Conics - construction Conic[point A, point B, point C, point D, point E]: Conic section through five points A, B, C, D, and C. Note: No four of the points lie on one line. Circle[point M, number r]: Circle with midpoint M and radius r Circle[point M, segment s]: Circle with midpoint M and radius equal to Length[s] Circle[point M, point A]: Circle with midpoint M through point A Circle[point A, point B, point C]: Circle through three points A, B and C Ellipse[point F, point G, number a]: Ellipse with focal points F and G and principal axis length a. Note: Condition: 2a > Distance[F, G] Ellipse[point F, point G, segment s]: Ellipse with focal points F and G where the length of the principal axis equals the length of segment s (a = Length[s]). Hyperbola[point F, point G, number a]: Hyperbola with focal points F and G and principal axis length a. Note: Condition: 0 < 2a < Distance[F, G] Hyperbola[point F, point G, segment s]: Hyperbola with focal points F and G where the length of the principal axis equals the length of segment s (a = Length[s]) Parabola[point F, line g]: Parabola with focal point F and directrix g Conics Related information Asymptote[hyperbola h]: Both asymptotes of a hyperbola h Tangent[point A, conic c]: (All) tangents through point A to conic section c Tangent[line g, conic c]: (All) tangents to conic section c that are parallel to line g Directrix[parabola p]: Directrix of a parabola p Excentricity[conic c]: Excentricity of a conic section c FirstAxis[conic c]: Principal axis of a conic section c FirstAxisLength[conic c]: Length of a conic section c s principal axis SecondAxis[conic c]: Second axis of a conic section c SecondAxisLength[conic c]: Length of a conic section c's second axis Vertex[conic c]: (All) vertices of a conic section c Diameter[line g, conic c]: Diameter conjugate to line g relative to conic section c Diameter[vector v, conic c]: Diameter with direction vector v relative to conic section c

GeoGebra Commands of interest for college algebra/pre-calculus General x(p), y(p) Polynomial investigation f(x) = x^3-3 x^2 + 1 R = Root[polynomial f]: All roots of polynomial f (as points) Parametric curves Curve[expression e1, expression e2, parameter t, number a, number b]: Asymptote[hyperbola h]: Both asymptotes of a hyperbola h Centroid[polygon poly]: Centroid of a polygon poly Circle[point M, number r]: Circle with midpoint M and radius r Circle[point M, segment s]: Circle with midpoint M and radius equal to Length[s] Circle[point M, point A]: Circle with midpoint M through point A Circle[point A, point B, point C]: Circle through three points A, B and C Direction[line g]: Direction vector of line g. Note: A line with equation ax + by = c has the direction vector (b, - a). Directrix[parabola p]: Directrix of a parabola p Ellipse[point F, point G, number a]: Ellipse with focal points F and G and principal axis length a. Note: Condition: 2a > Distance[F, G] Ellipse[point F, point G, segment s]: Ellipse with focal points F and G where the length of the principal axis equals the length of segment s (a = Length[s]). Excentricity[conic c]: Excentricity of a conic section c FirstAxis[conic c]: Principal axis of a conic section c FirstAxisLength[conic c]: Length of a conic section c s principal axis Hyperbola[point F, point G, number a]: Hyperbola with focal points F and G and principal axis length a. Note: Condition: 0 < 2a < Distance[F, G] Hyperbola[point F, point G, segment s]: Hyperbola with focal points F and G where the length of the principal axis equals the length of segment s (a = Length[s]) Div[number a, number b]: Integer quotient when number a is divided by number b Line[point A, point B]: Line through two points A and B Line[point A, line g]: Line through point A parallel to line g Line[point A, vector v]: Line through point A with direction vector v Mod[number a, number b]: Remainder when number a is divided by number b Parabola[point F, line g]: Parabola with focal point F and directrix g SecondAxis[conic c]: Second axis of a conic section c SecondAxisLength[conic c]: Length of a conic section c's second axis Vertex[conic c]: (All) vertices of a conic section c

GeoGebra Commands of interest for calculus General x(p), y(p) Polynomial investigation f(x) = x^3-3 x^2 + 1 R = Root[polynomial f]: All roots of polynomial f (as points) E = Extremum[f] I = InflectionPoint[f] Derivative[f] Derivative[f, 2] Standard Calculus Derivative[function f]: Derivative of function f(x) Derivative[function f, number n]: n th derivative of function f(x) Root[function f, number a]: One root of function f with initial value a (Newton's method) Root[function f, number a, number b]: One root of function f on interval [a, b] (regula falsi) Tangent[number a, function f]: Tangent to function f(x) at x = a Tangent[point A, function f]: Tangent to function f(x) at x = x(a) TaylorPolynomial[function f, number a, number n] Curvature[point A, function f]: Curvature of function f in point A CurvatureVector[point A, function f]: Curvature vector of function f in point A OsculatingCircle[point A, function f]: Osculating circle of function f in point A Integral[function f]: Indefinite integral for function f(x) Integral[function f, number a, number b]: Definite integral of function f(x) from number a to b. Note: This command also draws the area between the function graph of f and the x-axis. Integral[function f, function g, number a, number b]: Definite integral of the difference of the functions f(x) - g(x) from number a to number b. Note: This command also draws the area between the function graphs of f and g. LowerSum[function f, number a, number b, number n]: Lower sum of function f on the interval [a, b] with n rectangles. Note: This command draws the rectangles of the lower sum too. UpperSum[function f, number a, number b, number n]: Upper sum of function f on the interval [a, b] with n rectangles. Note: This command draws the rectangles of the upper sum too. Parametric curves Curve[expression e1, expression e2, parameter t, number a, number b]: Derivative[curve c]: Tangent[point A, curve c]: Tangent to curve c in point A Curvature[point A, curve c]: Curvature of curve c in point A CurvatureVector[point A, curve c]: Curvature vector of curve c in point A OsculatingCircle[point A, curve c]: Osculating circle of curve c in point A

The following gives some sample code from Applet web pages. It is intended to give examples so that you can understand enough to copy paste and modify. *****************Applet code Name added to generated code <applet code="geogebra.geogebraapplet" name="ggbapplet" codebase="./" archive="geogebra.jar" height="500" width="730"> <param name="filename" value="familyoffunctions_worksheet.ggb"> <param name="framepossible" value="true"> <param name="showreseticon" value="true"> <param name="enablerightclick" value="false"> <param name="showmenubar" value="false"> <param name="showtoolbar" value="true"> <param name="showtoolbarhelp" value="true"> <param name="showalgebrainput" value="false"> Sorry, the GeoGebra Applet could not be started. Please make sure that Java 1.4.2 (or later) is installed and activated. (<a href="http://java.sun.com/getjava">click here to install Java now</a>)</applet> *******************Comments The block of code above is from the page for the families of functions applet. 1) In the first line, which begins with "applet", the string name="ggbapplet" was added to the code generated by GeoGebra. This names the applet so that I can communicate with the applet using javascript. 2) In the second line codebase="./" indicates where the geogebra.jar file is to be found. In this case, the file is to be found in the same directory as the html file. 3) The value of the filename parameter indicates the Geogebra file to be used. 4) The remaining lines show options that can be set for the web page. These can be set with advanced features when the web page is exported. They can also be changed by changing the values true and false.

From that Family of Functions Applet, we want to focus on two lines of the web page. There is a line to either get the function f from the applet or to send a new definition of f to the applet. There is also a line that sets the viewing window. We will be looking at Javascript for two forms (FunctionForm and ViewForm) and three functions. (setfunction, getfunction, and setview) ************************************** Function sending Info to Applet <script type="text/javascript"> function setfunction(objname) { var applet = document.ggbapplet; var f= document.functionform.functionfield.value; applet.evalcommand(f); } Function getting info from applet function getfunction(objname) { var applet = document.ggbapplet; var f= applet.getdefinitionstring("f"); document.functionform.functionfield.value = f } Function to send view window info function setview(objname) { var applet = document.ggbapplet; var LowX = document.viewform.lowxfield.value; var HighX = document.viewform.highxfield.value; var LowY = document.viewform.lowyfield.value; var HighY = document.viewform.highyfield.value; applet.setcoordsystem(lowx, HighX, LowY, HighY); } </script> Form to show/get function <form name="functionform" onsubmit="setfunction('t'); return false;"> <input value="get function" onclick="getfunction('t');" type="button"> <input name="functionfield" size="40"value="f(x) = a*x^2+b*x+c" type="text"> <input value="set function" onclick="setfunction('t');" type="button"> </form> Form to collect view window info <form name="viewform" onsubmit="setview('t'); return false;"> Min X = <input name="lowxfield" size="5" onchange="setview('t');" value="-10" type="text"> Max X = <input name="highxfield" size="5" onchange="setview('t');" value="10" type="text"> Min Y = <input name="lowyfield" size="5" onchange="setview('t');" value="-10" type="text"> Max Y = <input name="highyfield" size="5" onchange="setview('t');" value="10" type="text"> <input value="set Window" onclick="setview('t');" type="button"> </form> ***********************Comments 1) In javascript, document refers to the current web page. As noted above, the applet is named ggbapplet and the forms are functionform and viewform. 2) The 3 functions provided above can be separated into separate scripts.

From that Family of Functions Applet, we now want to focus on line of the web page that provided a list of examples. Note that each menu choice has us executing several commands. Function to load selected example <script type="text/javascript"> function ExampleLoader(objName) { var applet = document.ggbapplet; var n= document.exampleform.exampleselect.value; if (n==0) { var f="f(x)=a*x^2+b*x+c"; applet.setcoordsystem(-10, 10, -8, 8); applet.evalcommand(f); document.functionform.functionfield.value = f;} else if (n==1) { var f="f(x)=a*(x-b)*(x-c)"; applet.setcoordsystem(-10, 10, -8, 8); applet.evalcommand(f); document.functionform.functionfield.value = f;} else if (n==2) { var f="f(x)=a*(x-b)^2+c"; applet.setcoordsystem(-10, 10, -8, 8); applet.evalcommand(f); document.functionform.functionfield.value = f;} else if (n==3) { var f="f(x)=a*sin(b*(x-c))"; applet.setcoordsystem(-7, 7, -4, 4); applet.evalcommand(f); document.functionform.functionfield.value = f;} else if (n==4) { var f="f(x)=a*sin(x)+b*cos(x)"; applet.setcoordsystem(-7, 7, -4, 4); applet.evalcommand(f); document.functionform.functionfield.value = f;} else if (n==5) { var f="f(x)=a*ln(b*x)+c"; applet.setcoordsystem(-1, 10, -8, 8); applet.evalcommand(f); document.functionform.functionfield.value = f;} else if (n==6) { var f="f(x)=a*b^x+c"; applet.setcoordsystem(-10, 10, -8, 8); applet.evalcommand(f); document.functionform.functionfield.value = f;} } </script> Form with drop down menu of examples <form name="exampleform"> <select name="exampleselect" size="1"> <option value ="">Example Families</option> <option value =0>General Quadratic: a*x^2+b*x+c</option> <option value =1>Factored Quadratic: a*(x-b)*(x-c)</option> <option value =2>Vertex Parabola: a*(x-b)^2+c</option> <option value =3>Sin Curve with Phases: a*sin(b*(x-c))</option> <option value =4>Linear Combination of sin and cos: a*sin(x)+b*cos(x)</option> <option value =5>Logrithmic Curve: a*ln(b*x)+c</option> <option value =6>Exponential Curve: a*b^x+c</option> </select> <input value="load Example" onclick="exampleloader(this)" type="button"> </form>

This last page of code comes from the Taylor Polynomial Approximation applet page. It is noteworthy since it gathers a lot of information together, both for input and output. ********************************** <script type="text/javascript"> Setting functions and parameters function setfunction(objname) { var applet = document.ggbapplet; var f= document.functionform.setfunctionfield.value; applet.evalcommand("f(x)="+f); var n= document.functionform.settaylordegree.value; applet.evalcommand("n="+n); var x0= document.functionform.setx0.value; applet.evalcommand("x_0="+x0); var x1= document.functionform.setx1.value; applet.evalcommand("x_1="+x1); } gathering lots of output together function setoutput(objname) { var applet = document.ggbapplet; var TaylorPoly= applet.getvaluestring("taylorpoly"); var TaylorDegree = applet.getvalue("n") var x0 = applet.getvalue("x_0") var x1 = applet.getvalue("x_1") var T1y = applet.getycoord("t_1") var P1y = applet.getycoord("p_1") var E1y = applet.getycoord("e_1") document.outputform.textareaoutput.value = "We are looking at the Taylor polynomial of degree " + TaylorDegree + "\ncentered at x_0 = " + x0 + "\n" + "At x_1 = " + x1 + " the function has value " + P1y + "\nwhile the polynomial approximation is " + T1y + "\ngiving an error of " + E1y + "\n" + TaylorPoly } </script> Function data form <form name="functionform" onsubmit="setfunction('t'); return false;"> <input value="set values" onclick="setfunction('t');" type="button"> f(x) = <input name="setfunctionfield" onchange="setfunction('t');" size="30" value="3*sin(x/2)+5*cos(x)" type="text"><br> Degree of Approximation = <input name="settaylordegree" size="5" onchange="setfunction('t');" value="4" type="text">, x_0 = <input name="setx0" size="10" onchange="setfunction('t');" value="1" type="text">, x_1 = <input name="setx1" size="10" onchange="setfunction('t');" value="2" type="text"> </form> Test area output form <form name="outputform" onsubmit="setoutput('t'); return false;"> <input value="get output" onclick="setoutput('t');" type="button"><br> <textarea name="textareaoutput" rows="10" cols="90" value=" " onchange="setoutput('t');"></textarea> </form> *****************************Comments 1) The output to the textarea is made up of a collection of things concatenated together with plus signs. The character \n gives a new line.