For this example the difference plot crosses the x-axis, so the functions intersect at this point. We
choose this point as the splice center, so that the splice will not have to span a large distance between
the two functions. Solving for the root gives
x2
=
0.549220479094
In some cases, the two functions will not intersect at all, or at least in the desired splice range. In this
case, a good choice for the splice center is the value of x at which the function difference is a
minimum.
The next step is to set the width of the splice, which in turn sets the half-width h. Assuming the two
estimating functions are both reasonably accurate, we want to make the splice rather narrow, but if we
make it too narrow, accuracy degrades because of loss of significant digits when solving for the splice
coefficients. For this example, I set h = 0.001, and we will verify that this is not too small. This means
that the splice will be fit from about x
1
= 0.54822 to x
3
= 0.55022.
All that remains is to calculate the other splice4() arguments, with these steps.
In the Y= editor, define some functions to make the calculations (and plotting) easier. Note that the
coefficients k1 to k6 have already been stored.
y
1
= polyEval({k
1
,k2,k3,k4},x)
y2= polyEval({k5,k6,k6},x)
y3= sin(x)
y4= y
1
(x)-y3(x)
y5= y2(x)-y3(x)
y6= polyEval(spl4,(x-x2)*k)
y7= y6(x)-y3(x)
y1 and y2 are f
1
(x) and f
2
(x). y3 is the function to be estimated. y4 and y5 find the error between the
model equations and the function to be estimated. y6 will calculate the splice function, and y7 will find
the splice function error. Note that k = 1/h.
Next, enter these commands in the entry line:
.54922048
→
x2
.00
1→
h
1
/h
→
k
y
1
(x2-h)
→
yy
1
y
1
(x2)
→
yy2
y2(x2+h)
→
yy3
h*
(y
1
(x),x)|x=x2-h
→
yd
1
h*
(y2(x),x)|x=x2+h
→
yd2
Finally, call the splice4() with the calculated arguments and save the result in spl4:
math\splice4(yy
1
,yy2,yy3,yd
1
,yd2)
→
spl4
Next we will ensure that the splice function meets the requirements. First, check the errors at x
1
, x
2
and
x
3
. These expressions should all be near zero:
y
1
(x2-h)-y6(x2-h)
returns 2E-
1
4
y
1
(x2)-y6(x2)
returns 0
y2(x2+h)-y6(x2+h)
returns 2E-
1
4
Next check the derivative errors at the splice endpoints. The derivative errors should be near zero. If
we calculate the derivative errors (incorrectly!) by directly differentiating the splice function, we get
6 - 99
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...