]> 7.4 Extrapolating the Sequence of Answers

7.4 Extrapolating the Sequence of Answers

Yes! By extrapolating it!

Extrapolation is a procedure for anticipating where a sequence is going based on a few terms, and creating a new sequence that consists at each stage of your best guess at the answer given the information in the terms of the sequence so far.

A nifty trick for doing this which can eliminate terms in a sequence that decline by a fixed factor from term to term is as follows. Suppose, for example, we have a sequence and want to eliminate from it terms which decline by a factor of 4 from term to term in the sequence.

Then if you take 4 times any particular term in the sequence, and subtract the previous term, any contribution which goes down by a factor of 4 from term to term will cancel out between the two; of course you will get the right answer 4-1 or 3 times.
Thus in a sequence $s 1 , s 2 , …$ in each of which there are error terms which decrease by a factor of 4, the new sequence whose j-th term is $4 s j − s j − 1 3$ will kill off the error term that decreases by a factor of 4. (In the general case in which the leading error term in $s j$ declines by a factor of $k$ , the analogous formula is $k s j − s j − 1 k − 1$ .)

In our case, we can do the following. Compute the symmetric approximation to the derivative, and let $d$ decrease by a factor of two from row to row. Then the leading error in the symmetric approximation will decrease by a factor of 4 from row to row. If we apply the extrapolation formula above to the quadratic approximation, we eliminate that leading term, and the leading term that is left will go down by a factor of 16 (coming from the $d 5$ term in $f ( x + d )$ ).

Is that the best we can do?

No! We can use the $k = 16$ extrapolation formula to replace 16 here by 64, and then use the $k = 64$ extrapolation to do even better.

A nice feature of this is that every step, from forming the symmetric approximation to producing the extrapolations indicated, is very easy to do on a spreadsheet, and need only be done in one row, and copied down into subsequent rows.

Another nice feature is that if you set this up sensibly, you can change the argument at which you are differentiating by changing only one entry in the spreadsheet. You can change the function being differentiated by entering the new function exactly once, and copying it appropriately. Everything else including extrapolations need be performed only once and it will work for almost all standard functions.

Exercises:

7.1 Set up a a spreadsheet differentiator as described in the discussion above, that uses the symmetric form of difference with two levels of extrapolation.

7.2 What value of $d$ do you need to get the computation as accurate as your machine will show in doing the derivative of $( sin ⁡ x ) 2$ at $x = 2$ ?

7.3 Make a spreadsheet that keeps $d$ fixed (at say .001) and allows $x$ to vary. Use it to plot both $f$ and $f '$ vs $x$ for $f = sin ⁡ x$ in the range -3.5 to 3.5, using the $x y$ chart feature of the spreadsheet.

7.4 Can you find a function for which this method fails? What and where? Can you fix it?
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 20, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}