The number n of subintervals times the length h of subintervals gives length of interval (b-a).

Similar documents
Area As A Limit & Sigma Notation

CSC165H1 Worksheet: Tutorial 8 Algorithm analysis (SOLUTIONS)

Bezier curves. Figure 2 shows cubic Bezier curves for various control points. In a Bezier curve, only

EVALUATION OF TRIGONOMETRIC FUNCTIONS

Parabolic Path to a Best Best-Fit Line:

Recursive Procedures. How can you model the relationship between consecutive terms of a sequence?

Alpha Individual Solutions MAΘ National Convention 2013

Project 2.5 Improved Euler Implementation

. Written in factored form it is easy to see that the roots are 2, 2, i,

Chapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Counting Regions in the Plane and More 1

Math Section 2.2 Polynomial Functions

1.2 Binomial Coefficients and Subsets

How do we evaluate algorithms?

The isoperimetric problem on the hypercube

Assignment 5; Due Friday, February 10

CS 111: Program Design I Lecture # 7: First Loop, Web Crawler, Functions

Section 7.2: Direction Fields and Euler s Methods

9.1. Sequences and Series. Sequences. What you should learn. Why you should learn it. Definition of Sequence

CIS 121 Data Structures and Algorithms with Java Fall Big-Oh Notation Tuesday, September 5 (Make-up Friday, September 8)

Chapter 3 Classification of FFT Processor Algorithms

Ones Assignment Method for Solving Traveling Salesman Problem

Consider the following population data for the state of California. Year Population

NTH, GEOMETRIC, AND TELESCOPING TEST

n Some thoughts on software development n The idea of a calculator n Using a grammar n Expression evaluation n Program organization n Analysis

Module 8-7: Pascal s Triangle and the Binomial Theorem

CHAPTER IV: GRAPH THEORY. Section 1: Introduction to Graphs

Python Programming: An Introduction to Computer Science

Computational Geometry

condition w i B i S maximum u i

The golden search method: Question 1

n n B. How many subsets of C are there of cardinality n. We are selecting elements for such a

Our Learning Problem, Again

Lecture 9: Exam I Review

Thompson s Group F (p + 1) is not Minimally Almost Convex

The Closest Line to a Data Set in the Plane. David Gurney Southeastern Louisiana University Hammond, Louisiana

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design

Lecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming

Examples and Applications of Binary Search

Homework 1 Solutions MA 522 Fall 2017

CS 111: Program Design I Lecture 16: Module Review, Encodings, Lists

Intermediate Statistics

LU Decomposition Method

Test 4 Review. dy du 9 5. sin5 zdz. dt. 5 Ê. x 2 È 1, 3. 2cos( x) dx is less than using Simpson's. ,1 t 5 t 2. ft () t2 4.

BOOLEAN MATHEMATICS: GENERAL THEORY

Lecture 1: Introduction and Strassen s Algorithm

Chapter 4. Procedural Abstraction and Functions That Return a Value. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Pseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance

Math 3201 Notes Chapter 4: Rational Expressions & Equations

OCR Statistics 1. Working with data. Section 3: Measures of spread

Computers and Scientific Thinking

Pattern Recognition Systems Lab 1 Least Mean Squares

Arithmetic Sequences

Task scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 13 Control and Sequencing: Hardwired and Microprogrammed Control

Reading. Parametric curves. Mathematical curve representation. Curves before computers. Required: Angel , , , 11.9.

Polynomial Functions and Models. Learning Objectives. Polynomials. P (x) = a n x n + a n 1 x n a 1 x + a 0, a n 0

Civil Engineering Computation

Lecturers: Sanjam Garg and Prasad Raghavendra Feb 21, Midterm 1 Solutions

3D Model Retrieval Method Based on Sample Prediction

CIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

MATHEMATICAL METHODS OF ANALYSIS AND EXPERIMENTAL DATA PROCESSING (Or Methods of Curve Fitting)

CSE 417: Algorithms and Computational Complexity

CMPT 125 Assignment 2 Solutions

On Infinite Groups that are Isomorphic to its Proper Infinite Subgroup. Jaymar Talledo Balihon. Abstract

One advantage that SONAR has over any other music-sequencing product I ve worked

Exercise 6 (Week 42) For the foreign students only.

CSE 111 Bio: Program Design I Lecture 17: software development, list methods

CIS 121 Data Structures and Algorithms with Java Spring Stacks, Queues, and Heaps Monday, February 18 / Tuesday, February 19

APPLICATION NOTE PACE1750AE BUILT-IN FUNCTIONS

University of Waterloo Department of Electrical and Computer Engineering ECE 250 Algorithms and Data Structures

Introduction to Sigma Notation

Analysis Metrics. Intro to Algorithm Analysis. Slides. 12. Alg Analysis. 12. Alg Analysis

Investigation Monitoring Inventory

Numerical Methods Lecture 6 - Curve Fitting Techniques

Lecture 5: Recursion. Recursion Overview. Recursion is a powerful technique for specifying funclons, sets, and programs

Overview Chapter 12 A display model

WebAssign Lesson 6-1b Geometric Series (Homework)

Running Time. Analysis of Algorithms. Experimental Studies. Limitations of Experiments

FURTHER INTEGRATION TECHNIQUES (TRIG, LOG, EXP FUNCTIONS)

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies. Limitations of Experiments

Analysis of Algorithms

Name Date Hr. ALGEBRA 1-2 SPRING FINAL MULTIPLE CHOICE REVIEW #1

! Given the following Structure: ! We can define a pointer to a structure. ! Now studentptr points to the s1 structure.

ENGR 132. Fall Exam 1

n Maurice Wilkes, 1949 n Organize software to minimize errors. n Eliminate most of the errors we made anyway.

Lecture 28: Data Link Layer

It just came to me that I 8.2 GRAPHS AND CONVERGENCE

Intro to Scientific Computing: Solutions

CS 111: Program Design I Lecture 20: Web crawling, HTML, Copyright

1.8 What Comes Next? What Comes Later?

ENGR Spring Exam 1

1. Sketch a concave polygon and explain why it is both concave and a polygon. A polygon is a simple closed curve that is the union of line segments.

Python Programming: An Introduction to Computer Science

IMP: Superposer Integrated Morphometrics Package Superposition Tool

Chapter 4 The Datapath

1. The lines intersect. There is one solution, the point where they intersect. The system is called a consistent system.

The Graphs of Polynomial Functions

Major CSL Write your name and entry no on every sheet of the answer script. Time 2 Hrs Max Marks 70

Transcription:

Simulator with MadMath Kit: Riema Sums (Teacher s pages) I your kit: 1. GeoGebra file: Ready-to-use projector sized simulator: RiemaSumMM.ggb 2. RiemaSumMM.pdf (this file) ad RiemaSumMMEd.pdf (educator's pages) Goals: Give a fuctio y=f(x) that is positive o the iterval [a,b]. Create a GeoGebra worksheet that (a) shows ad calculates the exact area uder y o [a,b], (b) shows ad calculates the left ad right Riema sums for a variable umber of subitervals ad (c) shows ad calculates the midpoit Riema sum for subitervals. First, let s write dow the formulas for Riema Sums: 1 xi xi 1 Left Sum: h f( xi ) Right Sum: h f( xi ) Midpoit Sum: h f i 1 i 2 i 1 2 Notice that we are usig the otatio that: a x1 ad b x 1 because this works with programmig. (Startig couter umber is 1; edig couter umber is +1.) Sceario: A studet of begiig calculus looks at these formulas. She says to herself - More i s tha a fly. I uderstad the idea of Riema sums so I am ever goig to eed these formulas. Ad this is true she does t eed the formulas if her teacher gives her a small eough umber of subitervals so she ca calculate by had. But her teacher is the evil warlock MadMath who gives her such a large umber for that she decides to use her brai ad write a GeoGebra worksheet to do the calculatios for her. She kows MadMath ca chage the fuctio, chage the iterval ad chage the umber of subitervals so she must be prepared. Let s get started. What must you have to get started solvig a problem with Riema sums? A fuctio y=f(x), a iterval [a,b] ad a umber for or for h. Q1. Why do t we eed values for both ad h? Write a formula that relates ad h. b a b a A1: h=b-a or h or h The umber of subitervals times the legth h of subitervals gives legth of iterval (b-a). Ow the Math with MadMath 1

== Let s say we start with 3 2 y x x x 5 2 15 o [0,5] with =5. == Ope a ew GeoGebra worksheet. Defie a=0 ad defie b=5. By defie we mea type the equatio ito the iput bar at bottom left ad hit eter. Use to make a slider from 0 to 40, icremet 1 ad set the value at =5. o Click o the Slider tool ad the click i the Drawig pad. o Chage ame=, mi=0, max=40 ad icremet=1 ad the click o Apply. o Click o Move tool ad the click ad drag the slider butto to 5. Defie h i terms of a, b ad usig your formula from Q1. Type: h=(b-a)/ Defie f x x x x 3 2 ( ) 5 2 15 o Type: f(x)=x^3-5*x^2+2*x+15 Scale, zoom ad move the Drawig pad for this fuctio i the give iterval. o Chage the scale of the Drawig pad to 1:5 (Right-click i empty space, select xaxis:yaxis ad click o 1:5). o Use mouse scroll butto to zoom ad We wat somethig like Figure 1. Move Drawig pad tool to move. Figure 1: Left Riema Sum for =5 Figure 2: Itegral (Exact Area) Ow the Math with MadMath 2

b Let s fid the exact itegral: f ( x )d x. a We use the GeoGebra commad Itegral[] with sytax: Itegral[Fuctio, Number a, Number b] to get the value of the defiite itegral. Defie c=itegral[f(x),a,b] We get the umber c which is the value of the defiite itegral. c=47.92 You should see somethig like Figure 2 (above). Q2. Why is this itegral equal to the area uder the curve for the give fuctio ad iterval? A2: Because f(x) is positive i the iterval [0,5]. Let s look at the Left Riema Sum = h i 1 f( x) We (should) have the Figure 3 i our head for left sums. That is, we kow that we must sum the areas of the rectagles that look like this. i Q3. What is the y-coordiate of the top left vertex of this rectagle? A3: y-coordiate is f(x i ). Figure 3: Basic Elemet of Left Riema Sum Thikig: What do we eed to get draw the rectagle show i the above image? Aswer: We eed to determie the coordiates of the vertices of the rectagle. Q4. Use x i ad x i+1 ad write dow the coordiates of the gree poits i Figure 4. Hit: Thik carefully about the y-coordiate of the top right vertex! A4: O both the top poits the y-coordiate is f(x i ). Figure 4: Vertices of Left Rectagle Mai Idea: To repeatedly use the commad Sequece[] to geerate lists - the last of which gives us draws ad calculates the area of the summig rectagles. So what do we eed to do? We make a list of the x i ad a list of the f(x i ) ad a list of poits (x i,f(x i )) The, we use these lists to make a list of rectagles. Ow the Math with MadMath 3

The, we sum their areas to get the Riema sum. We kow the left edpoit of the iterval [a,b] is x 1. That is, x 1 =a. Q5. How log is the subiterval from x 1 to x 2? Write a formula for x 2 i terms of x 1 ad h. A5: The subiterval is legth h. x 2 = x 1 +h Q6. How log is the subiterval from x i to x i+1? Write a formula for x i+1 i terms of x i ad h. A5: The subiterval is legth h. x i+1 = x i +h We will make lists by geeratig sequeces usig the commad Sequece[] Sytax: Sequece[ <Expressio>, <Variable>, <Start Value>, <Ed Value>, <Icremet>] Defie ListX=Sequece[ i, i, a, b, h ] Make sure you uderstad that the elemets of this list are x-values. Why? Because the start ad ed values are x-values! 1 st elemet is a=0, 2 d elemet is 0+h=1, 3 rd elemet is 1+h=2, 4 th elemet is 2+h=3, 5 th elemet is 3+h=4, 6 th elemet is 4+h=5 which is b so we stop. Q7. Look at this sequece ad thik about why is it easier for MadMath to give a value for tha a value for h? What are the oly requiremets for? What are the requiremets for h? A7: The oly requiremet for is that it be a atural umber. The h=(b-a)/. O the other had h must be a umber such that there exists a atural umber where a+h=b. Q8. I terms of how may elemets are i this list? A8: +1 Q9. What is the first elemet of ListX? If you aswered with a umber, say what this umber represets. A9: The first elemet of ListX is 0. This umber is a = left edpoit of iterval. Defie ListY=Sequece[ f(i), i, a, b, h ] Q10. What is the last elemet of ListY? If you aswered with a umber, say what this umber represets. I terms of which elemets is this? A10: The last elemet of ListY is 25. This umber is f(b) = the value of the fuctio at the right edpoit of iterval). These are lists of umbers. Now let s make the list of poits (x i,f(x i )). Defie ListPt=Sequece[ ( i, f(i) ), i, a, b, h ] Ow the Math with MadMath 4

Of course we could have just made the last list, but makig 3 lists (a) makes it easier to defie the vertices of the rectagles ad (b) satisfies MadMath s eed for you to show that you uderstad the techique of makig lists. This list of poits should be graphed as poits o the curve! Use that all is as it should be. Look at Figure 1 agai. Q11. I terms of how may rectagles do we eed? A11: Move tool to slide ad check Q12. I terms of a, b ad h what is the x-coordiate of the left vertices of the first rectagle? What is the x-coordiate of the left vertices of the last rectagle? A12: x-coordiate of left vertices of first rectagle is: x 1 = a x-coordiate of left vertices of last rectagle is: x = b-h Q13. I terms of what is the x-coordiate of the left vertices of the first rectagle? What is the x-coordiate of the left vertices of the last rectagle? A13: x-coordiate of left vertices of first rectagle is: x 1 = a x-coordiate of left vertices of last rectagle is: x = b-h We will obtai elemets of our lists by usig the commad Elemet[]. Sytax: Elemet[ <List>, <Positio of Elemet> ] From Q5, we have A=( x i,0). The x-coordiate of A is i the i th positio of ListX. So A is (Elemet[ListX,i],0). Aalogously, C is (Elemet[ListX,i+1], Elemet[ListY,i]). Q14. I this same way, fid the coordiates of B ad D of the i th rectagle. B is (Elemet[ListX,i], Elemet[ListY,i]) D is (Elemet[ListX,i+1], 0) Importat: Do t defie these poits i GeoGebra we must use them iside a sequece! (For fu you ca defie A=(Elemet[ListX,i],0) ad see how GeoGebra complais ad why.) We will make rectagles usig the commads Polygo[] ad Sequece[]. Sytax: Polygo[ <Poit>,..., <Poit> ] Notice that here i is a couter. Create list of left rectagles. Defie LeftR=Sequece[Polygo[A,B,C,D],i,1,,1] substitutig i the above formulas for A, B, C ad D! It will be a very log defiitio. Ow the Math with MadMath 5

It will look like the followig with your aswers to Q14 i place of the LeftR=Sequece[Polygo[(Elemet[ListX,i],0),,(Elemet[ListX,i+1],Elemet[ListY,i]), ], i,1,,1] I the Drawig pad, you should see the rectagles draw as i Figure 1. Now, look over at the Algebra View. Notice that LeftR cotais values. They are the areas of the correspodig rectagles I GeoGebra, we ca easily add these values! Defie LeftSum=Sum[LeftR]. Wow this looks great but actually it is ot quite right. Q15. What is the problem with this formula? Thik about whe f(x) is ot positive o the iterval [a,b]. A15: Sice areas are always positive values, this Sum will oly work whe f(x) is positive. Let s try agai. Remember our formula is: h i 1 f( x). ListY cotais all of these f-values. Defie LeftSum=h*Sum[ListY]. Wow this looks great but eve it is ot quite right. Q16. What is the problem with this formula? Thik about the umber of elemets i ListY. Which elemet should we take out? i A16: There are +1 values i ListY. From the formula ad from Q11 we kow we oly eed sums. We look carefully at the formula ad see that we do t eed h*f(x i+1 )=h*b. So we subtract this from the list sum. Oe last try. Defie LeftSum=h*Sum[ListY]-h*f(b). Now all is okay. If you wat, make Check Boxes to Show Defiite Itegral ad Show Left Riema Sum. o Select Check Box to Show/Hide Objects Tool. Click i the Drawig Pad. o Type Show Defiite Itegral, click o dow arrow ad the o c ad the Apply. o Repeat for Show Left Riema Sum, choosig both LeftR ad ListPt. Save your file. Ow the Math with MadMath 6