Texas Instruments TI-89 Tip List page 196

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Note that the error suddenly increases at hh = 0.5. Obviously, there is a best value for hh that reduces
the error, but this best value is not too sensitive to the actual value of hh, as the error is on the order of
E-12 from hh = 0.1 to 0.4.
One way to find the best hh would be to try different values of hh and see which returned the smallest
error estimate. Since nder1() is so slow, I wanted a better method. In the reference below, the authors
suggest that a value given by
1
f ( x )
2
h =
f ∏∏ ( x )
minimizes the error. However, note that this expression includes the second derivative of the function,
f''(x). While we don't know this (we don't even know the first derivative!), we can estimate it with an
expansion of the central difference formula, modified to find the second derivative instead of the first:
f ∏∏ ( x ) j d3
h 1 2
where h
is a small interval, and
1
d3 = f(x+h
) -2f(x) + f(x-h
1
It might seem that we have just exchanged finding one interval, hh, for another interval, h
since we are just trying to find a crude estimate to f"(x), it turns out that we don't have to have a precise
value for h
. I arbitrarily chose
1
h
= x/1000
if x 0, or
1
h
= 0.1
if x=0
1
If the function is fairly linear near x, d3 may equal 0. If this happens, it means that f'(x) is also near
zero, so we can use any small value for d3; I chose d3 = 0.01, which avoids division by zero in the
equation for hh above.
Next, if f(x) = 0, we'll get h = 0, which won't work. In this case, I set h = 0.01.
So, the final equation is
hh
0.001
0.005
0.01
0.1
0.15
0.2
0.3
0.4
0.5
)
1
!
error
3.74E-10
1.48E-10
2.22E-11
4.70E-12
2.00E-12
1.64E-11
-1.10E-12
-4.60E-12
4.93E-01
. However,
1
6 - 38

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92+

Table of Contents