4.93E-01
0.5
-4.60E-12
0.4
-1.10E-12
0.3
1.64E-11
0.2
2.00E-12
0.15
4.70E-12
0.1
2.22E-11
0.01
1.48E-10
0.005
3.74E-10
0.001
error
hh
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
h
=
f(x)
f
∏∏
(x)
1
2
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
1
is a small interval, and
d3 = f(x+h
1
) -2f(x) + f(x-h
1
)
It might seem that we have just exchanged finding one interval, hh, for another interval, h
1
. However,
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
1
. I arbitrarily chose
h
1
= x/1000
if x 0, or
!
h
1
= 0.1
if x=0
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
6 - 38
Summary of Contents for TI-92+
Page 52: ...Component side of PCB GraphLink I O connector detail 1 41...
Page 53: ...LCD connector detail PCB switch side 1 42...
Page 54: ...Key pad sheet contact side Key pad sheet key side 1 43...
Page 55: ...Key cap detail 1 44...
Page 57: ...Component side of PCB with shield removed A detail view of the intergrated circuits 1 46...
Page 410: ...void extensionroutine2 void Credit to Bhuvanesh Bhatt 10 4...