EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Tip List

Texas Instruments TI-89
507 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #215 background imageLoading...
Page #215 background image
[6.31] Fast 2nd-order interpolation with QuadReg
Linear interpolation is adequate for most table-interpolation problems. A second-order (quadratic)
interpolation is more accurate, but it does require entering one more data point. The first-order (linear)
interpolation uses two points to find the coefficients a and b in
ax + b = y
then calculates y at your desired x. A second-order interpolation uses three points to find a, b and c in
ax
2
+ bx + c = y
and again finds y at your desired x. The coefficients can be found as those of a Lagrangian
interpolating polynomial, but that is not built-in to the 89/92+. Quadratic regression is built-in, and it can
be used to find the coefficients. The basic steps are
1. Save the x- and y-coordinates for the three points to two list variables, one for the
x-coordinates, and one for the y-coordinates.
2. Execute the QuadReg command with the two lists.
3. Use the built-in system function RegEq(x) to interpolate y = f(x)
As an example, suppose that we have a table of gamma function values for x=1 to x=2, spaced every
0.04. We want to find gamma(1.895). We choose the three table x-values which bracket our desired
x-value of 1.895, where the middle x-value is the one closest to the desired x-value. From the table, the
three points are
x1 = 1.84 y1 = 0.94261236
x2 = 1.88 y2 = 0.95507085 x2=1.88 is closest to x=1.895
x3 = 1.92 y3 = 0.96877431
Then these steps estimate gamma(1.895):
{1.84,1.88,1.92}lx
{.94261236,.95507085,.96877431}ly
QuadReg lx,ly
regeq(1.895)
which returns gamma(1.895) = 0.96006375. The actual answer is 0.960062793, for an error of about
9.6E-7. Linear interpolation results in an error of about 1.5E-4, so the 2nd-order interpolation gives
several more significant digits.
Note that the regeq() function is a system variable that is updated when any regression command,
including QuadReg, is executed. Once you have executed QuadReg, you can use regeq() to
interpolate for additional x-values, as needed. These values need to be between x1 and x2, or you are
not interpolating, you are extrapolating, which is much less accurate.
This method cannot be written as a function because the QuadReg command only accepts global list
variable names as arguments. The QuadReg arguments must be list names, and not the lists
themselves.
I built this method into a program called QuadInt(), which is shown here:
quadint()
6 - 57

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals