numerical integration - vt math · pdf filenumerical integration lesson 3. last week...
TRANSCRIPT
![Page 1: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/1.jpg)
Numerical Integration
Lesson 3
![Page 2: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/2.jpg)
Last Week• Defined the definite integral as limit of Riemann
sums.
The definite integral of f(t) from t = a to t = b.
LHS:
RHS:
![Page 3: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/3.jpg)
Last Time• Estimate using left and right hand sums and
using area with a grid
If f(x) ≥ 0, then
represents the area underneath the curvef between x = a and x = b.
![Page 4: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/4.jpg)
Example:Estimate:
I estimate about 4boxes.
Area of each box? 1
So Area = =4
Note: you have to dealwith “partial” boxes.
![Page 5: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/5.jpg)
Area Below the AxisFor a general function:
TotalChange:
NOTE:Total Area=
A1+ A
2
Integral of a rate of change is the total change
![Page 6: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/6.jpg)
Find the area under the graph of y =x2 on theinterval [1, 3] with n = 2 using left rectangles.
AL = 1*(1+4) = 5Is this estimate an under or over estimate?(Hint: Consider the graph of the function with
the rectangles.) This is an underestimate
Repeat the estimate with right rectangles.AR = 1*(4+9) = 13, overestimate
Find the average of the two estimates. (5+13)/2 = 9
Group work last time
![Page 7: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/7.jpg)
Rectangles(review)
• How can we improve these estimates?
Estimating Integrals: Trapezoidal andSimpson’s Rule
![Page 8: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/8.jpg)
The Trapezoid Rule• The Trapezoid Rule is simply the average of
the left-hand Riemann Sum and the right-hand Riemann Sum.
• Averaging the two Riemann Sums gives anestimate that is more accurate than eithersum alone.
![Page 9: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/9.jpg)
A Trapezoid
Notice that the area of the trapezoid is the average of the areas of the left and right rectangles
![Page 10: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/10.jpg)
Using SubintervalsDivide the interval into subintervals:
Then we get:
A Formula
Factor out ∆x/2:
Combine duplicate terms:
Factor out ∆x/2:
![Page 11: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/11.jpg)
A Formula: Trapezoidal Rule
![Page 12: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/12.jpg)
Example
Approximate using n = 8 subintervals.∆x = (4-0)/8 = 1/2 x0 = 0 x1 = 0.5 x2 = 1
![Page 13: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/13.jpg)
Riemann Sums?Left-Hand Sum:
Right-Hand Sum:
Average: 21.5 Same as Trapezoidal rule!
Actual answer:
![Page 14: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/14.jpg)
Pictures:The estimate is pretty good!
Better Approximations
• Trapezoidal uses straight lines: small linesNext highest degree would be parabolas…
![Page 15: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/15.jpg)
Simpson’s RuleMmmm…
parabolas…Put a parabola across eachpair of subintervals:
So n must be even!Simpson's Rule is even more accurate than the Trapezoid Rule.
![Page 16: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/16.jpg)
Simpson’s Rule Formula
Like trapezoidalrule Divide by 3
instead of 2
Interiorcoefficientsalternate:
4,2,4,2,…,4
Second from start and end
are both 4
![Page 17: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/17.jpg)
ExampleEstimate using Simpson’s Rule and n = 4.Here, ∆x = (4-0)/4 = 1.
Exact answer!
![Page 18: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/18.jpg)
Simpson’s Rule: QuadraticsBecause Simpson’s rule uses parabolas,
it is exact for any quadratic (or lower) polynomial,with any choice of n.
(So use n = 2 for quadratics!)
![Page 19: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/19.jpg)
Tables
• Functions may be represented as tables• With evenly spaced data, we can still
use the Trapezoid and / or Simpson’srule.
• If the number of subintervals is odd, wecan only use the Trapezoid rule.
![Page 20: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/20.jpg)
Example:2–1347W(t)420–2–4t
Estimate .
Here, ∆x = ______. ∆x = 2
3 subintervals:use trapezoidal rule.
![Page 21: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/21.jpg)
Example:
0807573828254500Width (ft)987654321Meas. #
Estimate surface area of a pond: Measurements across aretaken every 20 feet along the width:
First: What is ∆x? ∆x = 20 ft PictureMethod?
There are 8 subintervals, so we use Simpson’s rule.
ft2
Area:
![Page 22: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/22.jpg)
Example: Follow Up
Surface area: 10,413.3 ft2
If average depth is 10 ft, and we want to start with 1 fishper 1,000 cubic feet of water, how many fish are needed?(Hint: Start by finding volume.)
Volume: (10,413.3 ft2)(10 ft) = 104,133 ft3.
We need about 104 fish.
![Page 23: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/23.jpg)
Review• The Trapezoid Rule is nothing more than the
average of the left-hand and right-handRiemann Sums. It provides a more accurateapproximation of total change than either sumdoes alone.
• Simpson’s Rule is a weighted average thatresults in an even more accurateapproximation.
![Page 24: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/24.jpg)
Summary• Formula for the Trapezoid rule (replaces
function with straight line segments)• Formula for Simpson’s rule (uses
parabolas, so exact for quadratics)• Approximations improve as ∆x shrinks• Generally Simpson’s rule superior to
trapezoidal• Used both from tabular data
![Page 25: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/25.jpg)
Group work1. Use Trapezoidal rule and Simpson’s rule with 2subintervals to estimate the following integral:
!2
20
3+ 2(2
3)+ 4
3"# $%
= 80.
!2
30
3+ 4(2
3)+ 4
3"# $%
= 64.
Trapezoidal rule Simpson’s rule
![Page 26: Numerical Integration - VT Math · PDF fileNumerical Integration Lesson 3. Last Week •Defined the definite integral as limit of Riemann ... Review •The Trapezoid Rule is nothing](https://reader034.vdocuments.net/reader034/viewer/2022051720/5a78ad9a7f8b9ab8768ea289/html5/thumbnails/26.jpg)
Group work2. Write down the correct formula to useSimpson’s rule and 4 subintervals:
f (x)dx2
10
!
!2
3f (2)+ 4 f (4)+ 2 f (6)+ 4 f (8)+ f (10)[ ]