Corrected exercises: Taylor polynomials and error bounds (MATH 141)
This is the corrected exercise set for the last chapter of MATH 141, Calculus 2, at McGill University: Taylor polynomials and their error bounds, sections 11.10 and 11.11 of Stewart.Every approximation is done by hand, in fractions and small decimals, and every bound is a simple fraction proved without a machine: e0.2≈375458 within 120001, 31.1≈900929 within 162001, ln2≈1215842 within 68041.
What the set covers, the traps it targets
Every approximation is done by hand, in fractions and small decimals, and every bound is a simple fraction proved without a machine: e0.2≈375458 within 120001, 31.1≈900929 within 162001, ln2≈1215842 within 68041.
The thread running through the whole set: an approximation is a value AND a guaranteed bound. The bound comes from the remainder, controlled on the WHOLE interval between the centre and the point: in Taylor's inequality, M bounds ∣f(n+1)∣ at its worst point of that interval, never at the centre; when the Taylor series alternates at the point, the first omitted term bounds the error and gives its sign; when neither is convenient, the tail is compared with a geometric series.
The traps named explicitly in the solutions: taking M at the centre of the interval and producing a bound that the function violates, using the first omitted term on a series whose terms are all positive, forgetting that T3=T4 for the sine, plugging degrees into a formula written in radians, reading an error bound as a number of correct decimals, carrying an M found on one interval to another, and centring at 0 by habit when a nearer centre is available.
•Tn(x)=∑k=0nk!f(k)(a)(x−a)k and Rn(x)=f(x)−Tn(x).
•Taylor's inequality: if ∣f(n+1)(x)∣≤M for ALL ∣x−a∣≤d, then ∣Rn(x)∣≤(n+1)!M∣x−a∣n+1 there.
•Lagrange form: Rn(x)=(n+1)!f(n+1)(z)(x−a)n+1 for some z between a and x; a constant sign of f(n+1) gives the sign of the error.
•Alternating estimate: if the series at x alternates with terms decreasing to 0, the error is less than the first omitted term and has its sign.
•When Tn=Tn+1 (odd or even functions at 0), apply the inequality with n+1.
•Maclaurin table: ex=∑k!xk, sinx=∑(2k+1)!(−1)kx2k+1, cosx=∑(2k)!(−1)kx2k, ln(1+x)=∑k≥1k(−1)k+1xk for −1<x≤1.
Part A: the basics (/50)
Exercise 1: Building T_n, and what its graph says about it
9 answers to check
The Taylor polynomial of degree n of f at a is Tn(x)=∑k=0nk!f(k)(a)(x−a)k. It is the only polynomial of degree at most n whose value and first n derivatives at a agree with those of f. It is built from information at ONE point, so it can only be trusted near that point; how near is the whole subject of this chapter.
The figure shows y=sinx and three of its Taylor polynomials at 0 on [−4,4].
a) Compute T1, T3 and T5 of sinx at a=0. Explain why T4=T3 and T6=T5.
b) Using the figure, say roughly up to which ∣x∣ each polynomial stays close to sinx, and on which side of sinx each one lies for small x>0.
c) Compute T3 of f(x)=lnx at a=1.
d) Compute T2 of f(x)=x at a=4, and check the three conditions that define it.
e) Explain why no polynomial Tn of the figure is good on the whole window, and what raising the degree changes.
Show the solution
Answers
a)T1=x, T3=x−6x3, T5=x−6x3+120x5; the even derivatives of sin vanish at 0.
b)Roughly ∣x∣<1, 2, 3; for small x>0: T1 above, T3 below, T5 above.
c)T3(x)=(x−1)−2(x−1)2+3(x−1)3
d)T2(x)=2+4x−4−64(x−4)2
e)Tn copies f at one point only; a higher degree widens the zone of good fit but never makes it the whole line.
a)
The derivatives of sinx cycle: sinx, cosx, −sinx, −cosx, sinx, …, so at 0 they take the values 0,1,0,−1,0,1,0,… Hence T1(x)=0+1⋅x=x, T3(x)=x+2!0x2+3!−1x3=x−6x3, and T5(x)=x−6x3+5!1x5=x−6x3+120x5. Since f(4)(0)=sin0=0, the term of degree 4 is 0 and T4=T3; likewise f(6)(0)=−sin0=0 gives T6=T5. This is not a detail: T3 is ALSO T4, and Exercises 2, 4 and 6 show that using it as T4 gives an error bound twenty to fifty times better.
b)
Reading the figure: the orange line T1=x leaves the sine curve visibly around ∣x∣≈1; the green cubic T3 holds until about ∣x∣≈2; the red T5 until about ∣x∣≈3. For small x>0, T1 is ABOVE sinx, T3 BELOW, T5 ABOVE again: each new term overcorrects the previous one, because the terms of the sine series alternate in sign. At x=1: T1(1)=1, T3(1)=65≈0.833, T5(1)=120101≈0.842, and sin1 lies between the last two. Exercise 4 turns this alternation into a bound.
c)
f(x)=lnx, f′(x)=x1, f′′(x)=−x21, f′′′(x)=x32; at 1: 0, 1, −1, 2. So T3(x)=0+(x−1)−2!1(x−1)2+3!2(x−1)3=(x−1)−2(x−1)2+3(x−1)3. Two slips cost marks here: expanding in powers of x instead of x−1 (the polynomial is centred at 1, keep the powers of x−1), and forgetting the k!, which turns the last coefficient into 2. With u=x−1 one recognizes the first terms of ln(1+u)=u−2u2+3u3−⋯, a free check.
d)
f(x)=x1/2, f′(x)=21x−1/2, f′′(x)=−41x−3/2. At 4: f(4)=2, f′(4)=21⋅21=41, f′′(4)=−41⋅81=−321. So T2(x)=2+41(x−4)−32⋅21(x−4)2=2+4x−4−64(x−4)2. Check: T2(4)=2=f(4); T2′(x)=41−32x−4 gives T2′(4)=41=f′(4); T2′′(x)=−321=f′′(4). The classic error is the coefficient −321 instead of −641: then T2′′=−161 and the third condition fails, which is exactly how to catch it.
e)
A Taylor polynomial knows f only through f(a),f′(a),…,f(n)(a): it copies the shape of f at 0 and extrapolates. Far from 0 the polynomial is dominated by its highest power and runs off to ±∞, while sinx stays between −1 and 1, so no Tn can follow the sine on the whole real line. Raising the degree widens the zone where the fit is good (about 1, 2, 3 for n=1,3,5), and near 0 the gap shrinks like the first neglected power: x3, then x5, then x7. Quantifying that gap, with a bound that is GUARANTEED rather than read on a picture, is the job of Taylor's inequality.
Points are earned before the solution; after it, you can keep practising.
For you:
Tick the exercises you have done or want to review: a free account, no password, keeps your ticks and your right answers from one visit to the next, tells you which chapter to tackle next and lets you ask for the exercise you are missing. Create your space, an email is enough.
Exercise 2: Taylor's inequality: M bounds the derivative on the whole interval
7 answers to check
Taylor's inequality. If ∣f(n+1)(x)∣≤M for ALL x with ∣x−a∣≤d, then the remainder Rn(x)=f(x)−Tn(x) satisfies ∣Rn(x)∣≤(n+1)!M∣x−a∣n+1 for ∣x−a∣≤d.
Everything rests on the word ALL: M is a bound on the whole interval, not the value of f(n+1) at the centre. The figure shows y=(1+x)32, the third derivative of ln(1+x), on [−0.5,0.5].
a) Bound the error of ex≈1+x+2x2 for ∣x∣≤0.5.
b) Bound the error of ln(1+x)≈x−2x2 for ∣x∣≤0.5. Show that the value M=f′′′(0) would give a bound that is FALSE.
c) Same approximation, but only for 0≤x≤0.5. What changes, and why?
d) Bound the error of cosx≈1−2x2 for ∣x∣≤0.2, first with n=2, then with n=3. Which is right, and which is better?
e) State a rule for locating the worst point of ∣f(n+1)∣ on the interval, with the three families of a) to d).
Show the solution
Answers
a)M=e0.5<2, so ∣R2∣≤62(0.5)3=241
b)M=16 (at x=−0.5), ∣R2∣≤31; with M=2 one would claim 241, but the error at −0.5 is ln2−85≈0.068.
c)On [0,0.5] the worst point is x=0: M=2 and ∣R2∣≤241 is now valid.
d)n=2: ≤37501 (with M=0.2); n=3, since T2=T3: ≤150001, both right, the second four times better.
e)If ∣f(n+1)∣ is monotone, its max is at an END of the interval; check both ends. sin and cos: M=1 always works.
a)
Here n=2, a=0, d=0.5 and f′′′(x)=ex. On [−0.5,0.5] the exponential is increasing, so its largest value is at the RIGHT end: M=e0.5=e. No calculator needed to bound it: e<4, so e<2. Then ∣R2(x)∣≤3!2(0.5)3=62⋅81=241≈0.042 for all ∣x∣≤0.5. A sharper M is allowed, 1.652=2.7225>e gives e<1.65 and the bound 481.65≈0.034, but any number ABOVE the true maximum is a valid M. The one thing that is not allowed is a number below it.
b)
f(x)=ln(1+x), f′(x)=1+x1, f′′(x)=−(1+x)21, f′′′(x)=(1+x)32. On [−0.5,0.5], 1+x ranges over [0.5,1.5] and (1+x)32 is DECREASING, so its maximum is at the LEFT end: M=(0.5)32=16, the red point of the figure. Taylor's inequality gives ∣R2(x)∣≤616(0.5)3=31. Weak, but guaranteed. Now the tempting shortcut M=f′′′(0)=2 would claim ∣R2∣≤62⋅81=241≈0.042. Test it at x=−0.5: f(−0.5)=ln21=−ln2≈−0.693 and T2(−0.5)=−0.5−0.125=−0.625, so the true error is ln2−85≈0.068, larger than 0.042. A bound that the function itself violates is not a bound; on a final it is worth zero, whatever the arithmetic.
c)
On [0,0.5] the same decreasing function (1+x)32 has its maximum at x=0, the left end of THIS interval, so M=2 is now correct and ∣R2(x)∣≤62(0.5)3=241 for 0≤x≤0.5. At x=0.5 the true error is ln1.5−0.375≈0.031, below 241 as it must be. The function, the polynomial and the formula are those of b); only the interval changed, and with it the worst point. This is why every M on a copy is written with its interval: ∣f′′′(x)∣≤2 for 0≤x≤0.5.
d)
With n=2: f′′′(x)=sinx, and on [−0.2,0.2], ∣sinx∣≤∣x∣≤0.2, so M=0.2 and ∣R2∣≤60.2(0.2)3=60.0016=37501≈0.00027. (With the lazy M=1: 60.008≈0.0013, also correct.) With n=3: since cos has no x3 term, T3=T2, and the remainder is ALSO R3, controlled by f(4)(x)=cosx, ∣cosx∣≤1: ∣R3∣≤241(0.2)4=240.0016=150001≈0.000067. Both bounds are true; the second is four times better than the first and twenty times better than the lazy one. The true error at 0.2 is about 0.0000666: the n=3 bound is practically exact.
e)
The worst point of ∣f(n+1)∣ is found like any maximum on a closed interval, and in practice ∣f(n+1)∣ is monotone on it, so the maximum sits at an END. Exponentials ex: increasing, the RIGHT end (a). Powers of 1+x1, which is where ln(1+x) and (1+x)k lead: decreasing, the LEFT end (b, c). Sine and cosine: M=1 always works, and a smaller M is available near 0 (d). Two rules follow. Never take M at the centre unless the centre IS the worst point, as in c). And when Tn=Tn+1, use n+1 in the inequality: the bound gains a full power of ∣x−a∣.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 3: By hand, with a guaranteed bound: e to the 0.2 and the cube root of 1.1
6 answers to check
On a MATH 141 exam, approximate means: give a value computed by hand AND a bound on its error that you can prove, with the sign of the error when it is available. A value alone, however accurate, answers half the question.
The figure shows y=31+x with its Taylor polynomials T1 and T2 at 0 on [−1,3].
a) Use T3 of ex at 0 to approximate e0.2, as an exact fraction.
b) Bound the error with Taylor's inequality. Justify your M without a calculator.
c) Is T3(0.2) an overestimate or an underestimate? Deduce an interval that contains e0.2.
d) Use T2 of (1+x)1/3 at 0 to approximate 31.1, as a fraction.
e) Bound the error, decide its sign with the help of the figure, and say what goes wrong if M is evaluated at x=0.1.
c)Underestimate: 375458<e0.2<375458+120001, so 1.22133<e0.2<1.22142
d)31.1≈1+301−9001=900929≈1.032222
e)∣R2∣≤2710⋅6(0.1)3=162001, underestimate; M taken at 0.1 gives a smaller number that the true error exceeds.
a)
ex is its own derivative, so every coefficient is k!1 and T3(x)=1+x+2x2+6x3. At x=0.2=51: T3(0.2)=1+51+501+7501. Over the common denominator 750: 750750+150+15+1=750916=375458, that is 1.221333… Working in fractions keeps the arithmetic exact; the decimal is written only at the end.
b)
n=3, so we need M≥∣f(4)(x)∣=ex for 0≤x≤0.2. The exponential is increasing: the worst point is x=0.2, and M=e0.2, the very number we are approximating. It is bounded by something simpler. Crude and valid: e0.2<e<3, which gives ∣R3∣≤243(0.2)4=243⋅0.0016=0.0002. Better: 1.252=1.5625, 1.254≈2.44, 1.255≈3.05>e, so e0.2<1.25 and ∣R3∣≤241.25⋅0.0016=240.002=120001≈0.000083. What is NOT acceptable is M=e0=1, the value at the centre, which sits at the wrong end of the interval.
c)
The remainder has a definite sign here. All the terms of the series of e0.2 are positive, so the part left out, 24(0.2)4+120(0.2)5+⋯, is positive: T3(0.2) is an UNDERESTIMATE. (Equivalently, the Lagrange form of the remainder is 24ez(0.2)4>0 for some z between 0 and 0.2.) So 375458<e0.2<375458+120001, i.e. 1.22133<e0.2<1.22142. The interval is the answer a marker wants: it is guaranteed, and its width says how good the approximation is.
d)
f(x)=(1+x)1/3, f′(x)=31(1+x)−2/3, f′′(x)=−92(1+x)−5/3; at 0: 1, 31, −92. So T2(x)=1+3x−92⋅2x2=1+3x−9x2, the first terms of the binomial series with k=31. At x=0.1: 1+301−9001=900900+30−1=900929≈1.032222.
e)
f′′′(x)=2710(1+x)−8/3, positive and DECREASING on [0,0.1]: the worst point is the left end, M=f′′′(0)=2710 (here the centre IS the worst point, and that has to be said, not assumed). Then ∣R2(0.1)∣≤2710⋅3!(0.1)3=27⋅600010=162001≈0.000062. Sign: R2(0.1)=6f′′′(z)(0.1)3 with f′′′>0, so the error is positive and T2 is an UNDERESTIMATE: 900929<31.1<900929+162001. The figure agrees: for x>0 the green parabola T2 runs below the curve, while the tangent line T1 runs above it. If M is evaluated at x=0.1 instead, one gets 162001(1.1)−8/3, about 0.000048; the true error is about 0.000058 (a machine confirms it afterwards), so that number is NOT a bound. The correct bound is barely above the true error, which is why the worst point matters.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 4: When the Taylor series alternates, the first omitted term does the job
15 answers to check
The alternating series estimate: if bk>0 decreases to 0, the sum S of ∑(−1)kbk satisfies ∣S−SN∣≤bN+1, the first omitted term, and S−SN has the SIGN of that term. Evaluated at a number, many Taylor series alternate, and then this estimate gives a bound with no M to find.
The figure shows the partial sums S1,S2,…,S6 of arctan21=21−3(1/2)3+5(1/2)5−⋯, with the value arctan21 dashed.
a) Approximate sin0.1 by T3(0.1) and bound the error with the alternating series estimate, checking its hypotheses. Is T3(0.1) too large or too small?
b) Compare with Taylor's inequality used with n=3, then with n=4.
c) Approximate cos0.5 by T2(0.5), with a bound and the sign of the error.
d) Approximate arctan21 by the first two terms of its series, with a bound and the sign. Why is Taylor's inequality of no practical use here?
e) For which of e−0.2, e0.2, ln1.2 and ln0.8 does the alternating estimate apply to the Maclaurin series? Justify.
Show the solution
Answers
a)sin0.1≈6000599, error <120(0.1)5=120000001, T3(0.1) too small.
b)n=3: 24(0.1)4=2400001, fifty times weaker; n=4 (as T4=T3): the same 120000001.
c)cos0.5≈87, 87<cos0.5<87+3841
d)2411<arctan21<2411+1601; bounding a high derivative of arctan by hand is impractical.
e)Yes for e−0.2 and ln1.2; no for e0.2 and ln0.8, whose terms all have the same sign.
a)
sin0.1=0.1−3!(0.1)3+5!(0.1)5−⋯, and T3(0.1)=0.1−60.001=6000600−1=6000599≈0.0998333. Hypotheses, one by one: the series alternates; its terms bk=(2k+1)!(0.1)2k+1 are positive and decreasing, since bkbk+1=(2k+2)(2k+3)(0.1)2<1; and bk→0. So ∣sin0.1−T3(0.1)∣≤b2=120(0.1)5=12010−5=120000001≈8.3×10−8. The first omitted term is POSITIVE, so the error sin0.1−T3(0.1) is positive: T3(0.1) is too SMALL, and 6000599<sin0.1<6000599+120000001. Seven correct decimals from two terms.
b)
Taylor's inequality with n=3: ∣f(4)(x)∣=∣sinx∣≤1, so ∣R3(0.1)∣≤24(0.1)4=2400001≈4.2×10−6, true but fifty times weaker. With n=4, legitimate because T4=T3 for the sine (Exercise 1): ∣f(5)∣=∣cosx∣≤1 and ∣R4(0.1)∣≤120(0.1)5, exactly the alternating bound. The alternating estimate does automatically what Taylor's inequality does only if you remember that the even terms are zero, and it adds the SIGN, which Taylor's inequality never gives.
c)
cos0.5=1−2(0.5)2+24(0.5)4−⋯ alternates, with terms (2k)!(0.5)2k decreasing (ratio (2k+1)(2k+2)0.25<1) to 0. T2(0.5)=1−81=87. First omitted term: 24(0.5)4=16⋅241=3841≈0.0026, positive. Hence 87<cos0.5<87+3841, that is 0.875<cos0.5<0.8777. The true value is about 0.87758: the error, 0.00258, is almost exactly the first omitted term, because the terms after it are tiny. That is why this estimate is often SHARPER in practice: it uses the next term itself, while Taylor's inequality uses the worst value of a derivative over a whole interval.
d)
arctanx=x−3x3+5x5−⋯ for ∣x∣≤1. At x=21 the terms bk=2k+1(1/2)2k+1 are positive, decreasing (numerator divided by 4, denominator larger) and tend to 0. Two terms: 21−241=2411≈0.4583. First omitted term: 5(1/2)5=1601=0.00625, positive: 2411<arctan21<2411+1601. The figure shows the mechanism: S1=21 above the dashed value, S2=2411 below, and each partial sum lands on the other side, closer, so the value is always trapped between two consecutive sums. Taylor's inequality would need a bound on the fifth derivative of arctanx on [0,21], a rational function whose numerator is a polynomial of degree four: no one computes it on an exam, and the alternating estimate makes it unnecessary.
e)
e−0.2=1−0.2+2(0.2)2−6(0.2)3+⋯ alternates, terms k!(0.2)k decreasing to 0: YES. e0.2: every term is positive, the series does not alternate: NO, which is why Exercise 3 needed Taylor's inequality. ln1.2=ln(1+0.2)=0.2−2(0.2)2+3(0.2)3−⋯ alternates, terms k(0.2)k decreasing to 0: YES. ln0.8=ln(1−0.2)=−0.2−2(0.2)2−3(0.2)3−⋯: every term is negative: NO. The check is on the series AT THE POINT, not on the function: the same ln(1+x) alternates at x=0.2 and not at x=−0.2.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 5: How many terms? The degree needed for a given accuracy
8 answers to check
The question is now reversed: the accuracy is imposed, and the degree n is the unknown. The method is always the same: write the bound as a function of n, then find the smallest n that makes it small enough. The bound, not the error, is what decides, because only the bound is known.
a) Find n such that Tn(1) approximates e to within 10−3. Another student, asked for an error below 2×10−4, keeps the same T6(1) because the next term, 50401, is below 2×10−4: what is wrong?
b) How many nonzero terms of the series of sin0.5 guarantee an error below 10−6?
c) Find the smallest degree n for which Tn(0.5) of ln(1+x) approximates ln1.5 to within 0.01, and give that approximation.
d) Find a degree n such that Tn of cosx at 0 is within 10−4 of cosx for EVERY x in [−1,1].
e) Find a degree n such that Tn of ex at 0 is within 0.01 of ex for EVERY x in [0,2], and compare with the degree needed on [0,1].
Show the solution
Answers
a)(n+1)!3<10−3 gives n=6, e≈7201957; the next-term rule is only valid for an ALTERNATING series, and e−T6(1)≈2.3×10−4>2×10−4.
b)Four: x−6x3+120x5−5040x7, since 9!(0.5)9≈5×10−9 while 7!(0.5)7≈1.6×10−6.
c)n=4: ln1.5≈19277, error below 1601.
d)n=6 (or 7): error at most 8!1=403201 on [−1,1].
e)On [0,2]: (n+1)!9⋅2n+1<0.01 gives n=9; on [0,1]: (n+1)!3<0.01 gives n=5.
a)
Taylor's inequality at x=1 with a=0: f(n+1)=ex≤e<3 on [0,1], so ∣Rn(1)∣≤(n+1)!3. We need (n+1)!>3000: 6!=720 is too small, 7!=5040 works, so n+1=7 and n=6. Then T6(1)=1+1+21+61+241+1201+7201=720720+720+360+120+30+6+1=7201957≈2.71806. The second student's rule, stop when the next term is below the tolerance, is the alternating series estimate, and the series of e=e1 does NOT alternate: every omitted term is positive and they ADD UP. The next term is 50401≈1.98×10−4, but the tail after T6(1) is 50401+403201+⋯≈2.3×10−4, above 2×10−4. The rule has to be earned by checking the hypotheses; here Taylor's inequality asks for (n+1)!>15000, so n=7.
b)
At x=0.5 the sine series alternates with decreasing terms (2k+1)!(0.5)2k+1, so the error is below the first omitted term. Try: 7!(0.5)7=128⋅50401=6451201≈1.6×10−6, too big; 9!(0.5)9=512⋅3628801, about 5×10−9, small enough. So the first omitted term must be the one in x9: keep x−6x3+120x5−5040x7, FOUR nonzero terms, which is T7=T8. Counting terms and counting the degree are two different things for the sine: say which one you are giving.
c)
ln(1.5)=∑k≥1(−1)k+1k(0.5)k alternates with terms k(0.5)k decreasing to 0, so ∣ln1.5−Tn(0.5)∣≤n+1(0.5)n+1. For n=3: 16⋅41=641≈0.0156, too big. For n=4: 32⋅51=1601=0.00625<0.01. So n=4 and ln1.5≈21−81+241−641=19296−24+8−3=19277≈0.401, an underestimate since the first omitted term, +1601, is positive. Four terms for two decimals: the series of ln(1+x) is slow at x=0.5. Exercise 10 does much better.
d)
The accuracy must hold for all x in [−1,1] at once, so the bound must be taken at the WORST x, here ∣x∣=1. For every such x the cosine series alternates with decreasing terms (2k)!x2k (ratio (2k+1)(2k+2)x2<1), so the error of the polynomial ending with the term in x2m is at most (2m+2)!∣x∣2m+2≤(2m+2)!1. Need (2m+2)!>104: 6!=720 no, 8!=40320 yes. So stop after −720x6: T6(x)=1−2x2+24x4−720x6, error at most 403201≈2.5×10−5 on the whole interval (and T7=T6). Taylor's inequality gives the same with n=7 and M=1.
e)
On [0,2] the worst point is x=2 twice over: f(n+1)=ex≤e2<9 (since e<3), and ∣x∣n+1≤2n+1. So ∣Rn(x)∣≤(n+1)!9⋅2n+1 for all x in [0,2]. Try: n+1=8 gives 403209⋅256≈0.057; n+1=9 gives 3628809⋅512≈0.013, still too big; n+1=10 gives 36288009⋅1024≈0.0025. So n=9. On [0,1]: M=e<3 and (n+1)!3<0.01 asks for (n+1)!>300, so 6!=720 and n=5. Doubling the interval almost doubles the degree: both M and ∣x∣n+1 grow, and the factorial has to catch up with 2n+1 before the bound falls. It always does in the end, which is why the series of ex converges for every x, but the price of distance is paid in degree. This is the lesson of Exercise 7 seen from the other side: a point far from the centre costs terms.
Points are earned before the solution; after it, you can keep practising.
For you:
Part B: problems and reasoning (/50)
Exercise 6: The error band: on which interval is sin x close enough to x minus x cubed over 6?
4 answers to check
So far the point x was given and the error was bounded. Here the tolerance is given, 10−4, and the question is: on which interval ∣x∣≤r does the approximation sinx≈x−6x3 GUARANTEE it?
The figure shows, in units of 10−4, three curves on [−0.6,0.6]: the lazy bound 24x4 (steep), the bound 120∣x∣5 (dashed), and the real error ∣sinx−x+6x3∣; the tolerance is the horizontal dashed line at 1.
a) Show that sinx−(x−6x3)≤120∣x∣5 for EVERY real x.
b) Deduce a simple value r, with one decimal, such that the error is below 10−4 for all ∣x∣≤r.
c) Answer the same question with the bound 24x4 obtained from n=3. Which curve of the figure corresponds to which bound?
d) Read on the figure where the real error reaches 10−4. What does this say about the bound of a)?
e) Show that x−6x3<sinx<x for 0<x≤1, and convert the interval of b) to degrees.
Show the solution
Answers
a)T3=T4 and ∣f(5)∣=∣cosx∣≤1 on all of R: ∣R4(x)∣≤5!∣x∣5.
b)r=0.4: 120(0.4)5=1200.01024<10−4, while r=0.5 is not guaranteed.
c)r=0.2 only; the steep red curve is 24x4, the dashed one 120∣x∣5.
d)Around ∣x∣≈0.41: the bound almost coincides with the real error, it is sharp.
e)Alternating estimate, signs of the first omitted terms; 0.4 rad ≈23∘.
a)
The sine has no x4 term, so x−6x3 is T3 AND T4, and the error is R4(x). Taylor's inequality with n=4 needs M≥∣f(5)(x)∣=∣cosx∣, and M=1 works on the whole real line, whatever the interval. So ∣R4(x)∣≤5!1∣x∣5=120∣x∣5 for every real x. For ∣x∣≤1 the alternating series estimate gives the same bound (first omitted term 120x5), but only Taylor's inequality gives it for ALL x, where the terms of the series first grow before they decrease.
b)
We need 120∣x∣5<10−4, i.e. ∣x∣5<0.012. By hand: (0.4)5=0.01024<0.012, and (0.5)5=321=0.03125>0.012. Since ∣x∣5 increases with ∣x∣, ∣x∣≤0.4 gives 120∣x∣5≤1200.01024≈0.85×10−4<10−4: r=0.4 works. r=0.5 is not guaranteed by this bound. Note the direction of the reasoning: we look for the x that make the BOUND small, because a small bound forces a small error; the converse is not needed.
c)
With n=3, M≥∣f(4)∣=∣sinx∣, M=1, and ∣R3(x)∣≤24x4. We need x4<0.0024: (0.2)4=0.0016 works, (0.3)4=0.0081 does not, so only r=0.2 is guaranteed, half of b). On the figure, the steep red curve is 24x4: it crosses the tolerance line near 0.22 and leaves the window soon after. The dashed curve 120∣x∣5 crosses it near 0.41. The only difference between the two answers is whether one noticed that T3=T4.
d)
The blue real error is hidden under the dashed bound: at this scale the two curves coincide, and the real error reaches 10−4 at about ∣x∣≈0.41. So the bound of a) is SHARP: the true error is the first omitted term minus much smaller ones, 120x5−5040x7+⋯, and the answer r=0.4 is almost the best possible. The lazy bound, by contrast, gives away half of the interval. A good error bound is not only true, it is close to the truth, and this is decided by the choice of n and M, not by the arithmetic.
e)
For 0<x≤1 the series x−6x3+120x5−⋯ alternates, with terms (2k+1)!x2k+1 decreasing to 0. The error after the first term, sinx−x, has the sign of the first omitted term −6x3: negative, so sinx<x. The error after two terms, sinx−(x−6x3), has the sign of +120x5: positive, so sinx>x−6x3. This is the pattern seen in Exercise 1: T1 above, T3 below. In degrees, 0.4 rad =0.4⋅π180∘≈3.1472∘≈23∘: from 0∘ to about 23∘, two terms of the series give the sine to four decimals, which is how sine tables were once built.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 7: Centred away from zero: cos 31 degrees and the radian trap
5 answers to check
A Taylor polynomial does not have to be centred at 0. To approximate f at a point, centre it at the NEAREST point where f and its derivatives are known exactly: the bound (n+1)!M∣x−a∣n+1 then works with a small ∣x−a∣.
Here the target is cos31∘, next to 30∘=6π, where cos6π=23 and sin6π=21.
a) Compute T2 of cosx at a=6π.
b) Express 31∘ in radians as 6π+h and deduce an exact expression approximating cos31∘. What happens if one takes h=1?
c) Bound the error with Taylor's inequality, using π<3.6 to make the bound a simple fraction.
d) Is the approximation too large or too small? Give an interval that contains cos31∘.
e) Estimate the bound one would get with T2 of cosx at 0, and conclude on the choice of the centre.
Show the solution
Answers
a)T2(x)=23−21(x−6π)−43(x−6π)2
b)h=180π: cos31∘≈23−360π−1296003π2≈0.85717; h=1 gives a negative value, absurd.
c)∣R2∣≤61(180π)3<6(0.02)3=7500001
d)Too small: T2<cos31∘<T2+7500001.
e)About 24(0.54)4≈0.0036 at 0: some two thousand times worse; centre at the nearest known point.
a)
f(x)=cosx, f′(x)=−sinx, f′′(x)=−cosx. At 6π: f=23, f′=−21, f′′=−23. So T2(x)=23−21(x−6π)−2⋅2!3(x−6π)2=23−21(x−6π)−43(x−6π)2. The powers stay in x−6π: expanding them in powers of x loses the whole point of the centre.
b)
31∘=30∘+1∘=6π+180π, so h=180π. Then cos31∘≈T2(6π+h)=23−2h−43h2=23−360π−4⋅324003π2=23−360π−1296003π2. This exact expression is the answer; an order of magnitude from 3≈1.732 and π≈3.1416: 0.86603−0.00873−0.00013≈0.85717. With h=1, as if one degree were one unit: 23−21−43≈0.866−0.5−0.433<0, a negative cosine for an acute angle. Every formula of calculus for sin and cos, and therefore every Taylor polynomial, is written in RADIANS: dxdsinx=cosx is false in degrees.
c)
n=2: we need M≥∣f′′′(x)∣=∣sinx∣ between 6π and 31∘, and M=1 is valid everywhere. So ∣R2∣≤3!1(180π)3. With π<3.6, 180π<1803.6=0.02, and ∣R2∣<6(0.02)3=68×10−6=7500001≈1.3×10−6. A sharper M is available, sinx≤sin31∘<sin45∘<0.71 on the interval, which cuts the bound by almost a third; it is not needed to get five decimals.
d)
The Lagrange form of the remainder is R2=3!f′′′(z)h3=6sinzh3 for some z between 6π and 31∘. There sinz>0 and h>0, so R2>0: cos31∘ is LARGER than T2, which is an underestimate. Hence T2<cos31∘<T2+7500001, with T2=23−360π−1296003π2. (A machine gives an error of about 4.5×10−7, positive, inside the interval.) The alternating estimate would NOT give the sign here: at a=6π the signs of the terms go +,−,−,+,+,…, in pairs, and the series does not alternate.
e)
Centred at 0, the same degree uses x=18031π≈0.54. Since T2=T3 for the cosine at 0, the best bound is 24x4, about 240.085≈0.0036, against 1.3×10−6 at 6π: roughly two to three thousand times worse, with the same effort. The bound grows like ∣x−a∣n+1, so the distance to the centre is raised to a power: halving it gains a factor 2n+1, and here the distance was divided by thirty. Choose the centre first, the degree second.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 8: Five statements to correct
6 answers to check
Each statement below was written on a MATH 141 practice paper, and each one is false or unjustified. Say what is wrong, give the correct statement, and settle it with a short computation or a counterexample.
a) For f(x)=1−x1 and 0≤x≤0.5, T2(x)=1+x+x2 and M=f′′′(0)=6, so ∣R2(x)∣≤3!6(0.5)3=81.
b) The terms of ∑k!1 decrease, so e−T3(1) is at most the first omitted term, 241.
c) Taylor's inequality with n=3 bounds the error of sin0.1≈0.1−6(0.1)3 by 24(0.1)4≈4×10−6, so T3 cannot give sin0.1 to within 10−6.
d) On [0,0.5], M=e0.5<2 bounds f′′′(x) for f(x)=ex, so ex−(1+x+2x2)≤62x3=3x3 for every x≥0.
e) e0.2≈1.22133 with an error below 10−4, so the first four decimals of e0.2 are 1.2213.
Show the solution
Answers
a)False: f′′′=(1−x)46 is largest at x=0.5, M=96, bound 2; the true error at 0.5 is 41>81.
b)False: the series does not alternate; e−38≈0.052>241. Taylor with M=3 gives 81.
c)False: T3=T4, so ∣R4∣≤120(0.1)5≈8×10−8<10−6.
d)False: M holds on [0,0.5] only; at x=3 the error e3−217>11 exceeds 327=9.
e)False: the bound gives 1.22133<e0.2<1.22142, and in fact e0.2=1.22140…: only 1.221 is certain.
a)
FALSE, M was taken at the centre. f′′′(x)=(1−x)46 is INCREASING on [0,0.5], so its maximum is at x=0.5: M=(1/2)46=96, and Taylor's inequality gives ∣R2(x)∣≤696(0.5)3=2. The claimed 81 is violated by the function itself: f(0.5)=2 and T2(0.5)=1+0.5+0.25=1.75, so the true error is 41. In fact the remainder is known exactly here, since 1−x1−(1+x+x2)=1−xx3, which is 41 at x=0.5 and within the correct bound 2. Correct statement: ∣R2(x)∣≤2 on [0,0.5], with M=96 at the worst point.
b)
FALSE, the first-omitted-term rule is the alternating series estimate, and ∑k!1 has only positive terms. Decreasing terms are not enough: the omitted terms all push in the same direction and add up. Indeed T3(1)=1+1+21+61=38 and e−38≈2.7183−2.6667=0.0516>241≈0.0417. Correct statement: by Taylor's inequality with M=e<3 on [0,1], 0<e−T3(1)≤4!3=81.
c)
FALSE, the conclusion does not follow. The bound 24(0.1)4 is true but it is an upper bound: a large bound does not prove a large error. And a better bound exists: the sine has no x4 term, so T3=T4 and, with ∣f(5)∣=∣cosx∣≤1, ∣R4(0.1)∣≤120(0.1)5=120000001<10−6. Correct statement: T3(0.1)=6000599 gives sin0.1 to within about 8.3×10−8.
d)
FALSE, the bound was proved on [0,0.5] and used outside it. M=2 bounds f′′′=ex only for x≤0.5; beyond, the exponential passes 2 and keeps growing. Counterexample x=3: T2(3)=1+3+29=217, and e3>(2.7)3=19.683, so the true error is above 11, while the claimed bound gives 327=9. Correct statement: on [0,d], M=ed, and ∣R2(x)∣≤6edx3 for 0≤x≤d. A Taylor bound is a statement about ONE interval; a new interval needs a new M, found again at its worst point.
e)
FALSE, an error bound gives an INTERVAL, not digits. From Exercise 3, T3(0.2)=375458=1.221333… and 0<e0.2−T3(0.2)<120001, so 1.22133<e0.2<1.22142. That interval contains numbers beginning with 1.2213 AND with 1.2214, so the fourth decimal is not decided; and in fact e0.2=1.22140… The error is below 10−4 while the fourth decimal of the approximation is wrong. Correct statement: e0.2∈(1.22133,1.22142), so the digits 1.221 are certain, and to four decimals e0.2 rounds to 1.2214.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 9: Physics runs on Taylor polynomials: the pendulum, the Lorentz factor and a GPS clock
5 answers to check
Two approximations are used in every physics course without comment. For a pendulum, sinθ≈θ turns the equation of motion into that of a harmonic oscillator. In special relativity, the Lorentz factor γ=1−β21, with β=cv, is replaced by 1+2β2 at everyday speeds. Both are Taylor polynomials, and an error bound says exactly when they may be trusted.
The figure shows γ and 1+2β2 for 0≤β≤0.9. Use c=3×105 km/s. No calculator.
a) Show that for 0<θ≤1 the relative error of sinθ≈θ, namely sinθθ−sinθ, is at most 6−θ2θ2. Deduce an amplitude, in radians and in degrees, below which it is under 1 percent.
b) With u=β2, compute T1 of g(u)=(1−u)−1/2 at 0. Deduce the approximation of γ and show that the relativistic kinetic energy (γ−1)mc2 becomes 21mv2.
c) For v≤0.1c, bound the error of γ≈1+2β2 and give its sign.
d) Deduce that for v≤0.1c the kinetic energy 21mv2 is within 1 percent of (γ−1)mc2.
e) A GPS satellite moves at about 3.9 km/s. Its clock runs slow by the fraction γ−1. Estimate the delay accumulated in one day (86400 s), and say whether the approximation of b) is good enough for it.
Show the solution
Answers
a)θ−sinθ≤6θ3 and sinθ≥θ−6θ3; under 1 percent for θ≤0.24 rad, about 14∘.
b)g(u)≈1+2u, so γ≈1+2β2 and (γ−1)mc2≈21mv2.
c)M=43(0.99)−5/2<0.78: 0<γ−1−2β2≤0.78⋅2(0.01)2=3.9×10−5, an underestimate.
d)Relative error at most Mu≤0.78×0.01<1 percent.
e)β≈1.3×10−5, γ−1≈8.45×10−11, about 7 microseconds per day; relative error of the approximation below 10−9.
a)
For 0<θ≤1 the series θ−6θ3+120θ5−⋯ alternates with decreasing terms, so θ−6θ3<sinθ<θ (Exercise 6 e)). Hence 0<θ−sinθ<6θ3 and sinθ>θ−6θ3=6θ(6−θ2). Dividing: sinθθ−sinθ<θ(6−θ2)/6θ3/6=6−θ2θ2. For 1 percent we need 6−θ2θ2≤0.01. Try θ=0.24: θ2=0.0576 and 5.94240.0576<5.760.0576=0.01. So below θ=0.24 rad, that is 0.24⋅π180∘≈14∘, the small-angle approximation errs by less than 1 percent. This is where the usual rule of thumb, small angles under about fifteen degrees, comes from.
b)
g(u)=(1−u)−1/2, g′(u)=21(1−u)−3/2, so g(0)=1, g′(0)=21 and T1(u)=1+2u, the start of the binomial series with k=−21. With u=β2: γ≈1+2β2. Then (γ−1)mc2≈2β2mc2=21mc2v2c2=21mv2: Newton's kinetic energy is the first Taylor polynomial of Einstein's. The figure shows the two curves together up to β≈0.3, and separating fast after; γ blows up at β=1, the polynomial does not.
c)
v≤0.1c means u=β2≤0.01. Taylor's inequality with n=1 needs M≥g′′(u)=43(1−u)−5/2 on [0,0.01]; g′′ is INCREASING in u, so the worst point is u=0.01: M=43(0.99)−5/2. By hand: (0.99)5/2>(0.99)3=0.970299>0.97, so M<0.970.75<0.78. Then ∣R1∣≤20.78(0.01)2=3.9×10−5. Sign: R1=2g′′(z)u2>0, so 1+2β2 UNDERESTIMATES γ, as the figure shows: the orange curve is below the blue one everywhere. At β=0.1 exactly, γ=0.991≈1.0050378 against 1.005: an error of 3.8×10−5, just under the bound.
d)
The true kinetic energy is (γ−1)mc2 and the approximation 2umc2; the relative error is γ−1(γ−1)−u/2=γ−1R1. Since R1>0, γ−1>2u, and so γ−1R1<u/2Mu2/2=Mu≤0.78×0.01=0.0078. Below 1 percent for every speed up to 0.1c, that is 30000 km/s: Newtonian mechanics is not wrong at everyday speeds, it is a Taylor polynomial with a known, tiny error.
e)
β=3×1053.9=1.3×10−5, so β2=1.69×10−10 and γ−1≈2β2=8.45×10−11. Over a day: 86400×8.45×10−11=8.64×8.45×10−7≈7.3×10−6 s, about 7 microseconds, the value quoted for the special-relativity correction of GPS clocks (gravity adds a larger correction of the opposite sign, which is another story). By d), the relative error of the approximation is at most Mu≈0.75×1.7×10−10, below 10−9: the Taylor polynomial is far more accurate than the 3.9 km/s it is fed. Light travels 300 metres in a microsecond, which is why a navigation system cannot ignore these seven.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 10: A final exam problem: ln 2 to six decimals with six terms
8 answers to check
The alternating harmonic series 1−21+31−⋯ converges to ln2, but its first omitted term after n terms is n+11: about a million terms for an error below 10−6. The series of ln(1+x) is used there at x=1, the edge of its interval of convergence. This problem shows how a MATH 141 final expects you to do better: move the argument close to 0, then bound the tail with the right tool.
a) From the Maclaurin series of ln(1+x) and ln(1−x), show that ln1−x1+x=2(x+3x3+5x5+⋯) for ∣x∣<1. Which x gives ln2?
b) Approximate ln2 with the first three terms of this series, as a fraction.
c) Explain why neither the alternating series estimate nor a simple use of Taylor's inequality is convenient here, then bound the error by comparing the tail with a geometric series.
d) How many terms guarantee an error below 10−6?
e) Use the same series with 1−x1+x=23 to approximate ln23 with two terms and a bound, then deduce ln3 with a guaranteed bound.
Show the solution
Answers
a)The even powers cancel, the odd ones double; 1−x1+x=2 for x=31.
b)ln2≈2(31+811+12151)=1215842≈0.69300
c)All terms positive, and the derivatives of ln1−x1+x are unwieldy; tail ≤72⋅1−1/9(1/3)7=68041, so 1215842<ln2<1215842+68041.
d)Six terms, up to 11x11: tail ≤132⋅89⋅3−13≈1.1×10−7; five terms leave about 1.15×10−6.
For ∣x∣<1: ln(1+x)=x−2x2+3x3−4x4+⋯ and, replacing x by −x, ln(1−x)=−x−2x2−3x3−4x4−⋯ Subtracting, the even powers cancel and the odd ones double: ln1−x1+x=ln(1+x)−ln(1−x)=2(x+3x3+5x5+⋯)=2∑k≥02k+1x2k+1. Then 1−x1+x=2 gives 1+x=2−2x, x=31: the argument is now 31 instead of 1, and its odd powers shrink by a factor 9 at each step.
b)
2(31+3(1/3)3+5(1/3)5)=2(31+811+12151). With the common denominator 1215=5⋅243: 1215405+15+1=1215421, so ln2≈1215842≈0.69300.
c)
All the terms are positive, so the series does not alternate and the first omitted term is NOT a bound (Exercise 8 b)). Taylor's inequality would require bounding the seventh derivative of ln1−x1+x on [0,31], possible but heavy. The tail itself is easy to bound: for k≥3, 2k+11≤71, so 2∑k≥32k+1x2k+1≤72∑k≥3x2k+1=72⋅1−x2x7, a geometric series of first term x7 and ratio x2. At x=31: 72⋅21871⋅89=12247218=68041≈1.5×10−4. The tail is positive, so 1215842<ln2<1215842+68041. Three terms, three correct decimals, and a guarantee; the true error, about 1.43×10−4, is just under the bound.
d)
Keeping the terms up to 2m−1x2m−1, the same comparison bounds the tail by 2m+12⋅1−x2x2m+1=2m+12⋅89⋅3−(2m+1). First omitted power x11 (five terms kept): 112⋅89⋅1771471≈1.15×10−6, not enough. First omitted power x13 (six terms kept, up to 11x11): 132⋅89⋅15943231≈1.1×10−7, enough. Six terms against a million: the speed of a power series is decided by the size of x, and choosing the representation that makes x small is part of the answer.
e)
1−x1+x=23 gives 2+2x=3−3x, x=51. Two terms: 2(51+3751)=2⋅37576=375152≈0.40533. Tail: 52⋅1−1/25(1/5)5=52⋅31251⋅2425=75001≈1.3×10−4, positive. Compare Exercise 5 c), where four terms of ln(1+x) at x=21 gave ln23 only to within 1601. Then ln3=ln2+ln23. With S=1215842+375152≈0.69300+0.40533=1.09834, both errors are positive, so S<ln3<S+68041+75001, a guaranteed error below 3×10−4: 1.09833<ln3<1.09862. Errors ADD when approximations are added: the bound of a sum is the sum of the bounds.
Points are earned before the solution; after it, you can keep practising.
Something missing from this set?A type of exercise your teacher gives, a problem you are stuck on, a mistake you spotted: tell me, I read every request.
Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space.
Rather not create an account? Write to me directly.