SME
Calculus II · Problem type
How many panels for a tolerance
Use this for “How many panels make the trapezoid estimate of ∫ from 1 to 2 of 1/x dx good to 0.0001? How many for Simpson’s rule?”
Chart
This is an example. Type your own values to start a new problem.
a
Lower limit
example
b
Upper limit
example
ε
Tolerance
example
K₂
Largest |f″| on [a, b]
worked out (not typed)
K₄
Largest |f⁽⁴⁾| on [a, b]
worked out (not typed)
NT
Least n the trapezoid bound allows
worked out (not typed)
nT
Panels for the trapezoid rule
worked out (not typed)
NS
Least n Simpson’s bound allows
worked out (not typed)
nS
Panels for Simpson’s rule
worked out (not typed)
Formulas
K₂
=
2
a
3
2
=
2
1
3
K₄
=
24
a
5
24
=
24
1
5
NT
=
√(
K₂
×
(
b
−
a
)
3
÷
(12
×
ε
))
40.8248
=
√(2
×
(2 − 1)
3
÷
(12
×
(1
×
10
-4
)))
nT = ⌈NT⌉
41 = ⌈40.8248⌉
NS
=
(
K₄
×
(
b
−
a
)
5
÷ (180 ×
ε
))
1 ÷ 4
6.04275
=
(24
×
(2 − 1)
5
÷
(180
×
(1
×
10
-4
)))^(1
÷
4)
nS
=
2
×
⌈
NS
2
⌉
8
=
2
×
⌈
6.04275
2
⌉
Assumptions
•
For f(x) = 1/x on [a, b] with 0 < a < b: |ET| ≤ K₂(b − a)³ ÷ (12n²) and |ES| ≤ K₄(b − a)⁵ ÷ (180n⁴).
•
K₂ and K₄ are the largest sizes of f″ = 2/x³ and f⁽⁴⁾ = 24/x⁵ on [a, b]. Both shrink as x grows, so they sit at x = a.
•
Set each bound equal to ε and solve for n, then round up: to a whole number for T, to the next even one for Simpson.
•
The bounds are guarantees, not the error itself: the true error is often a good deal smaller.
Step-by-step
WE KNOW
a = 1, b = 2, ε = 1 × 10⁻⁴
FIND
largest |f″| on [a, b] (K₂), largest |f⁽⁴⁾| on [a, b] (K₄), least n the trapezoid bound allows (NT), panels for the trapezoid rule (nT), least n Simpson’s bound allows (NS), panels for Simpson’s rule (nS)
Step 1 · Find largest |f″| on [a, b] (K₂)
Use K₂ = 2 ÷ a³
Differentiate
1
x
twice
to
get
2/
x
3
.
It
falls
as
x
grows,
so
its
largest
size
on
[
a
,
b
]
is
at
x
=
a
.
K₂
=
2
1
3
K₂
=
2
Step 2 · Find largest |f⁽⁴⁾| on [a, b] (K₄)
Use K₄ = 24 ÷ a⁵
Differentiate
1
x
four
times
to
get
24/
x
5
.
It
too
is
largest
at
the
left
end,
x
=
a
.
K₄
=
24
1
5
K₄
=
24
Step 3 · Find least n the trapezoid bound allows (NT)
Use NT = √(K₂ × (b − a)³ ÷ (12 × ε))
Set
K₂
(
b
−
a
)
3
÷
(12n²)
equal
to
ε
.
Multiply
by
n
2
,
divide
by
ε
,
then
take
the
square
root.
NT
=
√(2
×
(2 − 1)
3
÷
(12
×
10
-4
))
NT
=
√(2
×
1
3
0.0012
)
NT
=
√(
2
0.0012
)
NT
=
√
1
,667
NT = 40.8248
Step 4 · Find panels for the trapezoid rule (nT)
Use nT = ⌈NT⌉
n
counts
panels,
so
it
must
be
whole.
Round
up:
rounding
down
would
let
the
bound
pass
ε
.
nT = ⌈40.8248⌉
nT = 41
Step 5 · Find least n Simpson’s bound allows (NS)
Use NS = (K₄ × (b − a)⁵ ÷ (180 × ε))1 ÷ 4
Set
K₄
(
b
−
a
)
5
÷
(180n⁴)
equal
to
ε
.
Multiply
by
n
4
,
divide
by
ε
,
then
take
the
fourth
root.
NS
=
(24 ×
(2 − 1)
5
÷ (180 ×
10
-4
))
1 ÷ 4
NS
=
∜(24
×
1
5
0.018
)
NS
=
∜(
24
0.018
)
NS = ∜1,333
NS = 6.04275
Step 6 · Find panels for Simpson’s rule (nS)
Use nS = 2 × ⌈NS ÷ 2⌉
Simpson’s rule needs an even n, so go up to the next even whole number.
nS
=
2
×
⌈
6.04275
2
⌉
nS = 8
Check
Put the numbers back in. Both sides should match.
2
=
2
1
3
✓
24
=
24
1
5
✓
40.8248
=
√(2
×
(2 − 1)
3
÷
(12
×
10
-4
))
✓
41 = ⌈40.8248⌉ ✓
6.04275
=
(24 ×
(2 − 1)
5
÷ (180 ×
10
-4
))
1 ÷ 4
✓
8
=
2
×
⌈
6.04275
2
⌉
✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.