Upload
abra-collier
View
26
Download
0
Embed Size (px)
DESCRIPTION
Lesson 7-7. Numerical Approximations of Integrals -- What we do when we can’t integrate a function Riemann Sums Trapezoidal Rule. Strategies for Integrals that we can’t do. - PowerPoint PPT Presentation
Citation preview
Lesson 7-7
Numerical Approximations of Integrals-- What we do when we can’t integrate a
function
Riemann SumsTrapezoidal Rule
Strategies for Integrals that we can’t do
• Use Riemann Sums – left-hand or right-hand, to approximate the area under the curve (i.e., the value of the definite integral)
• Use the Trapezoidal Rule to approximate the area under the curve– The trapezoidal rule gives us an average of the
right and left hand Riemann Sum approximations– The graph of f The trapezoidal rule will:
concave down underestimate the area concave up overestimate the area.
Trapezoidal Rule
From Geometry: Area of a Trapezoid = ½h•(b1 + b2)Bases will the “height” or the functional value and h is the width, (b-a)/n, of each trapezoidSince only the first base and the last base will be used only once Area = ½h•(b1 + 2b2 + … + 2bn-1 + bn)
Example 1
Use the trapezoidal rule with n = 4 to approximate ∫ sin x dxx=0
x=π
h = (b-a)/n = (π-0)/4 = π/4
n f(x) 0 sin(0) =01 sin(π/4) = 0.70712 sin(π/2) = 13 sin(3π/4) = 0.70714 sin(π) = 0
12 3
4
Area = ½ h (b1 + b2)
Area1 = ½ h (b1 + b2) = π/8(0 + 0.7071)Area2 = ½ h (b1 + b2) = π/8(0.7071 + 1)Area3 = ½ h (b1 + b2) = π/8(1 + 0.7071)Area4 = ½ h (b1 + b2) = π/8(0.7071 + 0)AreaT = Ai
= (π/8)[2(0.7071) + 2(1.7071)] = 1.89612
∫ sin x dx = 2x=0
x=π
Example 2
Use the trapezoidal rule with n = 5 to approximate ∫ ex² dxx=0
x=1
h = (b-a)/n = (1-0)/5 = 1/5
n f(x) 0 f(0) = 11 f(1/5) = 1.22142 f(2/5) = 1.49183 f(3/5) = 1.82214 f(4/5) = 2.22555 f(1) = 2.7183
Area = ½ h (b1 + b2)
Area1 = ½ h (b1 + b2) = 1/10(1 + 1.2214)Area2 = ½ h (b1 + b2) = 1/101.2214 + 1.4918)Area3 = ½ h (b1 + b2) = 1/10(1.4918 + 1.8221)Area4 = ½ h (b1 + b2) = 1/10(1.8221 + 2.2255)Area5 = ½ h (b1 + b2) = 1/10(2.2255 + 2.7183) AreaT = Ai
= (1/10)[1 + 2(1.2214) + 2(1.4918) + 2(1.8221) + 2(2.2255) + 2.7183] = 1.72399
∫ ex² dx = 1.46265x=0
x=1
123 4 5
note: calculator did a numeric apx
Pond Example
40
5045
3045
40
Area = ½ h (b1 + b2)
Area1 = ½ h (b1 + b2) = 10(0 + 40) = 400Area2 = ½ h (b1 + b2) = 10(40 + 50) = 900Area3 = ½ h (b1 + b2) = 10(50 + 45) = 950Area4 = ½ h (b1 + b2) = 10(45 + 30) = 750Area5 = ½ h (b1 + b2) = 10(30 + 45) = 750Area6 = ½ h (b1 + b2) = 10(45 + 40) = 850Area7 = ½ h (b1 + b2) = 10(40 + 0) = 400 AreaT = Ai = 5000
h = 20 =(b-a)/n n = 7
Approximating the Error of the Estimate
If f has a continuous second derivative on [a,b], then
the error E in approximating by the
trapezoidal rule is:
∫ f(x) dxx=a
x=b
xfnabE
max12 2
3
(b-a)³E ≤ -------- max |f ’’(x)| where a ≤ x ≤ b 12n²
(b – a)³n² ≤ ---------- max |f ’’(x)| (always round up to 12 E next whole # when calculating n)
Example 3
1 ∫ --------- dx x + 1x=0
x=1
Use the error formula to find the maximum possible error in approximating the integral, with n = 4.
(1-0)³E ≤ -------- |2| (at x = 0 ) 12•4²
E ≤ 0.01042
f(x) = (x + 1)-1
f’(x) = -(x+1)-2
f’’(x) = 2/(x+1)-3
(b-a)³E ≤ -------- max |f ’’(x)| where a ≤ x ≤ b 12n²
Example 4Use the error formula to find n so that the error in the approximation of the definite integral is less than 0.00001.n
(b – a)³n² ≥ ---------- max |f ’’(x)| (always round up to 12 E next whole # when calculating n)
1 ∫ --------- dx x + 1x=0
x=1 f(x) = (x + 1)-1
f’(x) = -(x+1)-2
f’’(x) = 2/(x+1)-3
(1 – 0)³ [2]n² ≥ ------------------- (always round up to 12 (0.00001) next whole # when calculating n)n² ≥ 16666.67
n ≥ 129.1 n = 130
Summary & Homework• Summary:
– Riemann Sums can be used to get approximations to definite integrals that we don’t know how to integrate
– The error used to approximate the integral can be calculated
– The number of sub-intervals required to keep the error bounded can be calculated
• Homework: – pg 527 – 529: 7, 8, 9