Suppose we approximate an object to have volume 1.5m3, when its exact volume is 1.387m3. Give the relative error, absolute error, and percent error of our approximation.
Hint+
The absolute error is the difference of the two values; the relative error is the absolute error divided by the exact value; the percent error is one hundred times the relative error.
Let f(x)=xsinx+2cosx.
Find a reasonable value M such that ∣f′′(x)∣≤M for all −3≤x≤2.
Hint+
You don't have to find the actual, exact maximum the second derivative achieves–you only have to give a reasonable “ceiling" that it never breaks through.
For any value of x, ∣sinx∣≤1. When −3≤x≤2, then ∣x∣≤3. So, it is true (and not unreasonably sloppy) that
f′′(x)≤3
whenever x is in the interval [−3,2]. So, we can take M=3.
Note that ∣f′′(x)∣ is actually smaller than 3 whenever x is in the interval [−3,2], because when x=−3, sinx=1. In fact, since 3 is pretty close to π, sin3 is pretty small. (The actual maximum value of ∣f′′(x)∣ when −3≤x≤2 is about 1.8.) However, we find parameters like M for the purpose of computing error bounds. There is often not much to be gained from taking the time to find the actual maximum of a function, so we content ourselves with reasonable upper bounds.
Question 31 has a further investigation of “sloppy" bounds like this.
To find the actual error in our approximation, we compare the approximation from (b) to the exact value of A. In fact, A=0: this is a fact you've probably seen before by considering the symmetry of cosine, but it's easy enough to calculate:
A=∫−ππcosxdx=sinπ−sin(−π)=0
So, our approximation was exactly the same as our exact value. The absolute error is 0.
Remark: the purpose of this question was to remind you that the error bounds we calculate are not (usually) the same as the actual error. Often our approximations are better than we give them credit for. In normal circumstances, we would be approximating an integral precisely to avoid evaluating it exactly, so we wouldn't find our exact error. The bound is a quick way of ensuring that our approximation is not too far off.
So, the absolute error associated with the trapezoidal approximation is:
(21+2C+D)−(169+2C+D)=161
So, for any constants C and D, f(x)=23x2+Cx+D has the desired error.
Remark: contrast this question with Question 5. In this problem, our absolute error was exactly as bad as the bound predicted, but sometimes it is much better. The thing to remember is that, in general, we don't know our absolute error. We only guarantee that it's not any worse than some worst-case-scenario bound.
Suppose my mother is under 100 years old, and I am under 200 years old. (We're going somewhere with this.) Who is older?
Hint+
You're allowed to use common sense for this one.
Answer+
my mother
Full solution+
Under any reasonable assumptions (Anyone caught trying to come up with a scenario in which I am older than my mother will be sent to maximum security grad school.), my mother is older than I am.
True or False: for fixed positive constants M, n, a, and b, with b>a,
24Mn2(b−a)3≤12Mn2(b−a)3
True or False: for a function f(x) and fixed constants n, a, and b, with b>a, the n-interval midpoint approximation of ∫abf(x)dx is more accurate than the n-interval trapezoidal approximation.
(a) Since both expressions are positive, and 241≤121, the inequality is true.
(b) False. The reasoning is the same as in Question 7. The error bound given by Theorem 1.11.12 is always better for the trapezoid rule, but this doesn't necessarily mean the error is better.
To see how the trapezoid approximation could be better than the corresponding midpoint approximation in some cases, consider the function f(x) sketched below.
The trapezoidal approximation of ∫abf(x)dx with n=1 misses the thin spike, and gives a mild underapproximation. By contrast, the midpoint approximation with n=1 takes the spike as the height of the entire region, giving a vast overapproximation.
Give a polynomial f(x) with the property that
the Simpson's rule approximation of ∫abf(x)dx is exact for all a, b, and n.
Hint+
The error bound for the approximation is given in Theorem 1.11.12 in the CLP-2 text. You want this bound to be zero.
Answer+
Any polynomial of degree at most 3 will do. For example, f(x)=5x3−27, or f(x)=x2.
Full solution+
According to Theorem 1.11.12 in the CLP-2 text, the error associated with the Simpson's rule approximation is no more than 180Ln4(b−a)5, where L is a constant such that ∣f(4)(x)∣≤L for all x in [a,b]. If L=0, then the error is no more than 0 regardless of a, b, or n–that is, the approximation is exact.
Any polynomial f(x) of degree at most 3 has f(4)(x)=0 for all x. So, any polynomial of degree at most 3 is an acceptable answer. For example, f(x)=5x3−27, or f(x)=x2.
2Stage 2Procedural
Practising the skill itself, until applying it is automatic.
Questions
11 and 12
ask you to approximate a given integral using the formulas in Equations 1.11.2,
1.11.6, and 1.11.9 in the CLP-2 text.
Write out all three approximations of ∫030x3+11dx with n=6. (That is: midpoint, trapezoidal, and Simpson's.) You do not need to simplify your answers.
Hint+
Follow the formulas in Equations 1.11.2,
1.11.6, and 1.11.9 in the CLP-2 text.
For the trapezoidal rule and Simpson's rule, the x-values where we evaluate x3+11 start at x=a=0 and move up by Δx=5: x0=0, x1=5,
x2=10, x3=15,
x4=20, x5=25, and x6=30.
For the midpoint rule, the x-values where we evaluate x3+11 start at x=2.5=2x0+x1 and move up by Δx=5: xˉ1=2.5, xˉ2=7.5,
xˉ3=12.5, xˉ4=17.5,
xˉ5=22.5, and xˉ6=27.5.
Following Equation 1.11.2 in the CLP-2 text,
the midpoint rule approximation is:
The solid V is 40 cm high and the horizontal cross sections
are circular disks. The table below gives the diameters of the cross sections
in centimeters at 10 cm intervals. Use the trapezoidal rule to estimate
the volume of V.
height
0
10
20
30
40
diameter
24
16
10
6
4
Hint+
See Section 1.11.2 in the
CLP-2 text.
To set up the volume integral, see Example 1.6.6 in the
CLP-2 text. Note the dimensions given for the cross sections are diameters, not radii.
Answer+
1720π≈5403.5cm3
Full solution+
Let f(x) denote the diameter at height x.
As in Example 1.6.6 of the
CLP-2 text, we slice V into thin horizontal “pancakes”, which in
this case are circular.
We are told that the pancake at height x is a circular disk
of diameter f(x) and so
has cross-sectional area π(2f(x))2 and
thickness dx and hence
A 6 metre long cedar log has cross sections that are approximately
circular. The diameters of the log, measured at one metre intervals, are
given below:
metres from left end of log
0
1
2
3
4
5
6
diameter in metres
1.2
1
0.8
0.8
1
1
1.2
Use Simpson's Rule to estimate the volume of the log.
Hint+
See Section 1.11.3 in the
CLP-2 text, and compare to Question 13. Note the table gives diameters, not radii.
Answer+
12π(16.72)≈4.377m3
Full solution+
Let f(x) be the diameter a distance x from the left end of
the log.
If we slice our log into thin disks, the disks x metres from the left end of the log has
radius 2f(x),
width dx, and so
volume π(2f(x))2dx=4πf(x)2dx.
Using Simpson's Rule with Δx=1,
the volume
of the log is:
The circumference of an 8 metre high tree at different heights
above the ground is given in the table below. Assume that all horizontal
cross-sections of the tree are circular disks.
height (metres)
0
2
4
6
8
circumference (metres)
1.2
1.1
1.3
0.9
0.2
Use Simpson's rule to approximate the volume of the tree.
Hint+
See §1.11.3 in the
CLP-2 text.
To set up the volume integral, see Example 1.6.6 in the
Note that the table gives the circumference, not radius, of the tree at a given height.
Answer+
6π12.94≈0.6865m3
Full solution+
At height x metres, let the circumference of the tree be c(x).
The corresponding
radius is 2πc(x), so the corresponding cross-sectional area
is π(2πc(x))2=4πc(x)2.
The height of a very thin cross-sectional disk is dx, so the
volume of a cross-sectional disk is 4πc(x)2dx.
Therefore,
total volume of the tree is:
By measuring the areas enclosed by contours on a topographic map, a geologist
determines the cross sectional areas A in m2 of a 60 m high
hill. The table below gives the cross sectional area A(h) at various
heights h. The volume of the hill is V=∫060A(h)dh.
h
0
10
20
30
40
50
60
A
10,200
9,200
8,000
7,100
4,500
2,400
100
If the geologist uses the Trapezoidal Rule to estimate the
volume of the hill, what will be their estimate, to the nearest 1,000m3?
What will be the geologist's estimate of the volume of the
hill if they use Simpson's Rule instead of the Trapezoidal Rule?
The integral ∫−11sin(x2)dx is estimated using the Midpoint
Rule with 1000 intervals. Show that the absolute error in this approximation is at most
2⋅10−6.
You may use the fact that when approximating ∫abf(x)dx with the
Midpoint Rule using n points, the absolute value
of the error is at most M(b−a)3/24n2 when ∣f′′(x)∣≤M
for all x∈[a,b].
Hint+
The main step is to find an appropriate value of M. It is not necessary to
find the smallest possible M.
Answer+
Let f(x)=sin(x2). Then f′(x)=2xcos(x2) and
f′′(x)=2cos(x2)−4x2sin(x2).
Since ∣x2∣≤1 when ∣x∣≤1, and ∣sinθ∣≤1 and ∣cosθ∣≤1 for all θ,
we have
The total error using the midpoint rule with n subintervals to
approximate the integral of f(x) over [a,b] is bounded by
(24n2)M(b−a)3, if ∣f′′(x)∣≤M for all a≤x≤b.
Using this bound, if the integral ∫−212x4dx is approximated using the midpoint rule with 60 subintervals, what is the largest possible error between the approximation M60 and the true value of the integral?
Hint+
The main step is to find M. This question is unusual in that its
wording requires you to find the smallest possible allowed M.
Answer+
1003
Full solution+
Setting f(x)=2x4 and b−a=1−(−2)=3, we compute f′′(x)=24x2.
The largest value of 24x2 on the interval [−2,1] occurs at x=−2,
so we can take M=24⋅(−2)2=96. Thus the total error for the midpoint rule with n=60 points is bounded by
24n2M(b−a)3=24×60×6096×33=1003
That is: we are guaranteed our absolute error is certainly no more (This is what the error bound always tells us.) than 1003, and using the bound stated in the problem we cannot give a better guarantee.
(The second part of the previous sentence comes from the fact that we used the smallest possible M: if we had used a larger value of M, we would still have some true statement about the error, for example “the error is no more than 1005," but it would not be the
best true statement we could make.)
Both parts of this question concern the integral I=∫02(x−3)5dx.
Write down the Simpson's Rule approximation to I with n=6.
Leave your answer in calculator-ready form.
Which method of approximating I results in a smaller error bound:
the Midpoint Rule with n=100 intervals, or Simpson's Rule with n=10
intervals? You may use the formulas
∣EM∣≤24n2M(b−a)3and∣ES∣≤180n4L(b−a)5,
where M is an upper bound for ∣f′′(x)∣ and L is an upper bound for ∣f(4)(x)∣, and EM and ES are the absolute errors arising from the midpoint rule and Simpson's rule, respectively.
Hint+
The main steps in part (b) are to find the smallest possible values of
M and L.
(b)
Simpson's Rule results in a smaller error bound.
Full solution+
(a)
Since a=0, b=2 and n=6, we have
Δx=nb−a=62−0=31,
and so x0=0, x1=31, x2=32, x3=1,
x4=34, x5=35, and x6=2. Since Simpson's
Rule with n=6 in general is
For 0≤x≤2, (x−3) runs from −3 to −1, so the maximum
absolute values are found at x=0, giving
M=20⋅∣0−3∣3=540 and L=120⋅∣0−3∣=360. Consequently, for
the Midpoint Rule with n=100,
∣EM∣≤24n2M(b−a)3=24×104540×23=104180;
whereas for Simpson's Rule with n=10,
∣ES∣≤180×104360×25=10464.
Since 64<180, Simpson's Rule results in a smaller error bound.
Find a bound for the error in approximating
∫15x1dx using Simpson's rule with n=4.
Do not write down the Simpson's rule approximation S4.
In general the error in approximating
∫abf(x)dx using Simpson's rule with n
steps is bounded by 180L(b−a)(Δx)4 where Δx=nb−a
and L≥∣f(4)(x)∣ for all a≤x≤b.
Hint+
As usual, the biggest part of this problem is finding L. Don't be thrown off by the error bound being given slightly differently from Theorem 1.11.12 in the CLP-2 text: these expressions are equivalent, since Δx=nb−a.
Answer+
158
Full solution+
In general the error in approximating
∫abf(x)dx using Simpson's rule with n
steps is bounded by 180L(b−a)(Δx)4 where Δx=nb−a
and L≥∣f(4)(x)∣ for all a≤x≤b. In this case, a=1, b=5,
n=4 and f(x)=x1. We need to find L, so we differentiate.
f′(x)=−x21f′′(x)=x32f(3)(x)=−x46f(4)(x)=x524
and
f(4)(x)≤24 for all x≥1
So we may take L=24 and Δx=45−1=1, which leads to
using Simpson's rule with n=6.
Do not write down the Simpson's rule approximation Sn.
In general, the error in approximating
∫abf(x)dx using Simpson's rule with n
steps is bounded by 180L(b−a)(Δx)4 where Δx=nb−a
and L≥∣f(4)(x)∣ for all a≤x≤b.
Hint+
The function e−2x=e2x1 is positive and decreasing, so its maximum occurs when x is as small as possible.
Answer+
180×341=145801
Full solution+
In general, the error in approximating
∫abf(x)dx using Simpson's rule with n
steps is bounded by 180L(b−a)(Δx)4 where Δx=nb−a
and L≥∣f(4)(x)∣ for all a≤x≤b. In this case, a=0, b=1,
n=6 and f(x)=e−2x+3x3. We need to find L, so we differentiate.
Since e−2x=e2x1, we see f(4)(x) is a positive, decreasing function. So, its maximum occurs when x is as small as possible. In the interval [0,1], that means x=0.
Write down the trapezoidal approximation T4 for I.
You do not need to simplify your answer.
Write down the Simpson's approximation S4 for I.
You do not need to simplify your answer.
Without computing I, find an upper bound for ∣I−S4∣.
You may use the fact that if f(4)(x)≤L
on the interval [a,b], then the error in using Sn to approximate
∫abf(x)dx has absolute value less than or equal to
L(b−a)5/180n4.
Answer+
(a) T4=41[(21×1)+54+32+74+(21×21)],
(b) S4=121[1+(4×54)+(2×32)+(4×74)+21]
(c) I−S4≤180×4424=19201
Full solution+
For both approximations, a=1, b=2, n=4, f(x)=x1 and Δx=nb−a=41.
A function s(x) satisfies s(0)=1.00664, s(2)=1.00543,
s(4)=1.00435, s(6)=1.00331, s(8)=1.00233. Also, it is known to satisfy
s(k)(x)≤1000k for 0≤x≤8 and all positive
integers k.
Find the best Trapezoidal Rule and Simpson's Rule approximations
that you can for I=∫08s(x)dx.
Determine the maximum possible sizes of errors in the approximations
you gave in part (a). Recall that if a function f(x) satisfies
f(k)(x)≤Kk on [a,b], then
The “best ... approximations that you can" means using the maximum number of intervals, given the information available.
The final sentence in part (b) is just a re-statement of the error bounds we're familiar with from Theorem 1.11.12 in the CLP-2 text. The information s(k)(x)≤1000k gives you values of M and L when you set k=2 and k=4, respectively.
Set a=0 and b=8. Since we have information about s(x) when x is 0, 2, 4, 6, and 8, we set Δx=nb−a=2, so n=4. (Recall with the trapezoid rule and Simpson's rule, n=4 intervals actually uses the value of the function at 5 points.)
We could perform the trapezoidal approximations with fewer intervals, for example n=2, but this would involve ignoring some of the points we're given. Since the question asks for the best estimation we can give, we use n=4 intervals and no fewer.
The information s(k)(x)≤1000k, with k=2, tells us ∣s′′(x)∣≤10002 for all x in the interval [0,8]. So, we take K2 (also called M in your text) to be 10002.
Then the absolute error associated with our trapezoid rule approximation is at most
Consider the trapezoidal rule for making numerical approximations to
∫abf(x)dx. The error for the trapezoidal rule satisfies
∣ET∣≤12n2M(b−a)3 , where ∣f′′(x)∣≤M
for a≤x≤b. If −2<f′′(x)<0 for 1≤x≤4,
find a value of n to guarantee the trapezoidal rule will give
an approximation for ∫14f(x)dx with absolute error,
∣ET∣, less than 0.001.
Hint+
Set the error bound to be less than 0.001, then solve for n.
Answer+
Any n≥68 works.
Full solution+
In this case, a=1, b=4. Since −2≤f′′(x)≤0 over the relevant interval, we take M=2. (Remember M is an upper bound on ∣f′′(x)∣, not f′′(x).) So we need n
to obey
A swimming pool has the shape shown in the figure below.
The vertical cross-sections of the pool are semi-circular disks. The
distances in feet across the pool are given in the figure at 2–foot intervals along
the sixteen–foot length of the pool. Use Simpson's Rule to estimate the
volume of the pool.
Hint+
See Section 1.11.3 in the
CLP-2 text.
To set up the volume integral, see Example 1.6.2 in the
CLP-2 text.
Since the cross-sections of the pool are semi-circular disks, a section that is d metres across will have area 21π(2d)2 square feet. Based on the drawing, you may assume the very ends of the pool have distance 0 feet across.
Answer+
3472≈494ft3
Full solution+
Denote by f(x) the width of the pool x feet
from the left-hand end. From the sketch, f(0)=0, f(2)=10, f(4)=12, f(6)=10,
f(8)=8, f(10)=6, f(12)=8, f(14)=10 and f(16)=0.
A cross-section of the pool x feet from the left end is half of a circular disk with diameter f(x) (so, radius 2f(x)) and thickness dx. So, the volume of
the part of the pool with x–coordinate running from x to (x+dx) is
21π(2f(x))2dx=8π[f(x)]2dx.
The total volume is given by the following integral.
A piece of wire 1m long with radius 1mm is made in such
a way that the density varies in its cross-section, but is radially symmetric
(that is, the local density g(r) in kg/m3 depends only on the
distance r in mm from the centre of the wire). Take as given that the
total mass W of the wire in kg is given by
W=2π10−6∫01rg(r)dr
Data from the manufacturer is given below:
r
0
1/4
1/2
3/4
1
g(r)
8051
8100
8144
8170
8190
Find the best Trapezoidal Rule approximation that you
can for W based on the data in the table.
Suppose that it is known that ∣g′(r)∣<200 and
∣g′′(r)∣<150 for all values of r. Determine the maximum possible size
of the error in the approximation you gave in part (a). Recall that if
a function f(x) satisfies ∣f′′(x)∣≤M on [a,b], then
∣I−Tn∣≤12n2M(b−a)3
where I=∫abf(x)dx and Tn is the Trapezoidal Rule approximation
to I using n subintervals.
Hint+
See Example 1.11.14 in the
CLP-2 text.
Don't get caught up in the interpretation of the integral. It's nice to see how integrals can be used, but for this problem, you're still just approximating the integral given, and bounding the error.
When you find the second derivative to bound your error, pay attention to the difference between the integrand and g(r).
Answer+
(a) 0.025635
(b) 1.8×10−5
Full solution+
(a)
The Trapezoidal Rule with n=4, a=0, b=1, and Δx=41 gives:
Simpson's rule can be used to approximate log2,
since log2=∫12x1dx.
Use Simpson's rule with 6 subintervals to approximate log2.
How many subintervals are required in order to guarantee
that the absolute error is less than 0.00001?
Note that if En is the error using n subintervals, then
∣En∣≤180n4L(b−a)5 where L is the maximum absolute value
of the fourth derivative of the function being integrated and a and b
are the end points of the interval.
Hint+
See Example 1.11.15 in the
CLP-2 text. You'll want to use a calculator for the approximation in (a), and for finding the appropriate number of intervals in (b). Remember that Simpson's rule requires an even number of intervals.
Answer+
(a)
≈0.6931698
(b)
n≥12 with n even
Full solution+
(a)
Let f(x)=x1, a=1, b=2 and
Δx=6b−a=61. Using Simpson's rule:
Let I=∫02cos(x2)dx and
let Sn be the Simpson's rule approximation to I using n subintervals.
Estimate the maximum absolute error in using S8 to approximate I.
How large should n be in order to ensure that ∣I−Sn∣≤0.0001?
Note: The graph of f′′′′(x), where f(x)=cos(x2),
is shown below. The absolute error in the Simpson's rule approximation
is bounded by 180n4L(b−a)5 when ∣f′′′′(x)∣≤L on the
interval [a,b].
Hint+
See Example 1.11.15 in the
CLP-2 text.
Rather than calculating the fourth derivative of the integrand, use the graph to find the largest absolute value it attains over our interval.
Answer+
(a)
0.01345
(b)
n≥28 with n even
Full solution+
(a)
From the figure, we see that the magnitude of ∣f′′′′(x)∣
never exceeds 310 for 0≤x≤2. So, the absolute error is bounded by
Estimate how many subdivisions are needed to calculate I to five decimal
places of accuracy using the trapezoidal rule.
Note that if En is the error using n subintervals, then
∣En∣≤12n221M(b−a)3, where M is the maximum absolute value
of the second derivative of the function being integrated and a and b
are the limits of integration.
Hint+
See Example 1.11.14 in the
CLP-2 text.
You'll have to differentiate f(x). To that end, you may also want to review the fundamental theorem of calculus
and, in particular, Example 1.3.5 in the
CLP-2 text.
You don't have to find the best possible value for M. A reasonable upper bound on ∣f′′(x)∣ will do.
To have five decimal places of accuracy, your error must be less than 0.000005. This ensures that, if you round your approximation to five decimal places, they will all be correct.
Answer+
n≥259
Full solution+
Let g(x)=∫0xsin(t)dt. By the Fundamental Theorem of Calculus Part 1,
g′(x)=sin(x). By its definition, f(x)=g(x2), so we use the chain rule to differentiate f(x).
f′(x)=2xg′(x2)=2xsinxf′′(x)=2sinx+2xcosx
Since ∣sinx∣,∣cosx∣≤1, we have
∣f′′(x)∣≤2+2∣x∣ and, for 0≤t≤1, ∣f′′(t)∣≤4. When the
trapezoidal rule with n subintervals is applied, the resulting error En obeys
Let f(x) be a function (For example, f(x)=61x3−21x2+(1+x)log∣x+1∣ will do, but you don't need to know what f(x) is for this problem.) with f′′(x)=x+1x2.
Show that ∣f′′(x)∣≤1 whenever x is in the interval [0,1].
Find the maximum value of ∣f′′(x)∣ over the interval [0,1].
Assuming M=1, how many intervals should you use to approximate ∫01f(x)dx to within 10−5?
Using the value of M you found in (b), how many intervals should you use to approximate ∫01f(x)dx to within 10−5?
Hint+
To find the maximum value of ∣f′′(x)∣, check its critical points and endpoints.
Answer+
(a) When 0≤x≤1, then x2≤1 and x+1≥1, so ∣f′′(x)∣=∣x+1∣x2≤11=1.
(b) 21 (c) n≥65 (d) n≥46
Full solution+
When 0≤x≤1, then x2≤1 and x+1≥1, so ∣f′′(x)∣=∣x+1∣x2≤11=1.
To find the maximum value of a function over a closed interval, we test the function's values at the endpoints of the interval and at its critical points inside the interval. The critical points are where the function's derivative is zero or does not exist.
The function we're trying to maximize is ∣f′′(x)∣=∣x+1∣x2=x+1x2=f′′(x) (since our interval only contains nonnegative numbers). So, the critical points occur when f′′′(x)=0 or does not exist. We find f′′′(x) Using the quotient rule.
The only critical point in [0,1] is x=0. So, the extrema of f′′(x) over [0,1] will occur at its endpoints. Indeed, since f′′′(x)≥0 for all x in [0,1], f′′(x) is increasing over this interval, so its maximum occurs at x=1. That is,
∣f′′(x)∣≤f′′(1)=21
The absolute error using the midpoint rule is at most 24n2M(b−a)3. Using M=1, if we want this to be no more than 10−5, we find an acceptable value of n with the following calculation:
The absolute error using the midpoint rule is at most 24n2M(b−a)3. Using M=21, if we want this to be no more than 10−5, we find an acceptable value of n with the following calculation:
Remark: how accurate you want to be in these calculations depends a lot on your circumstances. Imagine, for instance, that you were finding M by hand, using this to find n by hand, then programming a computer to evaluate the approximation. For a simple integral like this, the difference between computing time for 65 intervals versus 46 is likely to be miniscule. So, there's not much to be gained by the extra work in (b). However, if your original sloppy M gave you something like n=1000000, you might want to put some time into improving it, to shorten computation time. Moreover, if you were finding the approximation by hand, the difference between adding 46 terms and adding 65 terms would be considerable, and you would probably want to put in the effort up front to find the most accurate M possible.
Approximate the function logx with a rational function by approximating the integral ∫1x21t1dt using Simpson's rule. Your rational function f(x) should approximate logx with an error of not more than 0.1 for any x in the interval [1,3].
Hint+
In using Simpson's rule to approximate ∫1x21t1dt with n intervals, a=1, b=x, and Δx=nx−1.
Answer+
12x−1[1+x+316+x+14+3x+116+x1]
Full solution+
Before we can take our Simpson's rule approximation of ∫1xt1dt, we need to know how many intervals to use. That means we need to bound our error, which means we need to bound dt4d4{t1}.
Because x−1≤2 for every x in [1,3], if n4>1824⋅25, then n4>1824⋅(x−1)5 for every allowed x.
n4n>1824⋅25=3128>43128≈2.6
Since n must be even, n=4 is enough intervals to guarantee our error is not too high for any x in [1,3]. Now we find our Simpson's rule approximation with n=4, a=1, b=x, and Δx=4x−1. The points where we evaluate t1 are:
Below is a graph of our approximation f(x) and natural logarithm on the same axes. The natural logarithm function is shown red and dashed, while our approximating function is solid blue. Our approximation appears to be quite accurate for small, positive values of x.
Using an approximation of the area under the curve x2+11, show that the constant arctan2 is in the interval [4π+0.321,4π+0.323].
You may assume use without proof that dx4d4{1+x21}=(x2+1)524(5x4−10x2+1). You may use a calculator, but only to add, subtract, multiply, and divide.
Hint+
∫121+x21dx=arctan(2)−4π, so
arctan(2)=4π+∫121+x21dx
If an approximation A of the integral ∫121+x21dx has error at most ε, then A−ε≤∫121+x21dx≤A+ε.
Looking at our target interval will tell you how small ε needs to be, which in turn will tell you how many intervals you need to use.
You can show, by considering the numerator and denominator separately, that ∣f(4)(x)∣≤30.75 for every x in [1,2].
If you use Simpson's rule to approximate ∫121+x21dx, you won't need very many intervals to get the requisite accuracy.
Answer+
Note: for more detail, see the solutions.
First, we use Simpson's rule with n=4 to approximate ∫121+x21dx. The choice of this method (what we're approximating, why n=4, etc.) is explained in the solutions–here, we only show that it works.
Now, we bound the error associated with this approximation. Define N(x)=24(5x4−10x2+1) and D(x)=(x2+1)5, so N(x)/D(x) gives the fourth derivative of 1+x21. When 1≤x≤2, ∣N(x)∣≤N(2)=984 (because N(x) is increasing over that interval) and ∣D(x)∣≥D(1)=25 (because D(x) is also increasing over that interval), so dx4d4{1+x21}=D(x)N(x)≤25984=30.75. Now we find the error bound for Simpson's rule with L=30.75, b=2, a=1, and n=4.
First, we want a strategy for approximating arctan2. Our hints are that involves integrating 1+x21, which is the antiderivative of arctangent, and the number 4π, which is the same as arctan(1). With that in mind:
We won't know the value of the integral exactly, but we'll have an approximation A bounded by some positive error bound ε. Then,
−εA−εSo, from (∗), 4π+A−ε≤(∫121+x21dx−A)≤ε≤(∫121+x21dx)≤A+ε≤arctan(2)≤4π+A+ε
Which approximation should we use? We're given the fourth derivative of 1+x21, which is the derivative we need for Simpson's rule. Simpson's rule is also usually quite efficient, and we're very interested in not adding up dozens of terms, so we choose Simpson's rule.
Now that we've chosen Simpson's rule, we should decide how many intervals to use.
In order to bound our error, we need to find a bound for the fourth derivative. To that end, define N(x)=24(5x4−10x2+1). Then N′(x)=24(20x3−20x)=480x(x2−1), which is positive over the interval [1,2]. So, N(x)≤N(2)=24(5⋅24−10⋅22+1)=984 when 1≤x≤2. Furthermore, let D(x)=(x2+1)5. If 1≤x≤2, then D(x)≥25. Now we can find a reasonable value of L:
We want [4π+A−ε,4π+A+ε] to look something like [4π+0.321,4π+0.323]. Note ε is half the length of the first interval. Half the length of the second interval is 0.001=10001. So, we want a value of ε that is no larger than this. Now we can find our n: