Texas Instruments TI-89 Tip List page 161

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

Advertisement

As an example, consider using simulti() to find the coefficients for the Langrangian interpolating
polynomial. This is just the polynomial that fits through the given points. A polynomial of degree n-1 can
be fit through n points. This function returns the coefficients as a list, given the x-y point coordinates in
a matrix:
polyfiti(xyd)
func
©Find coefficients of nth-order polynomial, given n+1 xy points
© 18mar00/dburkett@infinet.com
local a,k,n,xd
rowdim(xyd)→n
seq(k,k,n-1,0,⁻1)→a
seq(mat▶list(submat(xyd,1,1,n,1))[k]^a,k,1,n)→a
mat▶list(simulti(a,submat(xyd,1,2,n,2)))
Endfunc
This table shows the results of the fit for fitting a function with and without improvement. The function is
f(x) = tan(x), x in radians. x ranges from 0.4 to 1.4, with data points every 0.1 radians. This means that
11 points were fit to a 10th-order polynomial.
Without improvement:
With improvement:
The residual is the difference between the actual b-values and the calculated b-values. The RMS
residual is a deviation measurement of all the residuals, and the minimum and maximum residuals are
the most extreme residuals for all the fit points.
For this function and data, the improvement results in several orders of magnitude in both the RMS
residuals and the extreme residuals. Without the improvement, the calculated results are only accurate
to about five significant digits. With the improvement, the results are accurate to at least 8 significant
digits.
[6.4] Gamma, log-gamma and factorial functions
The gamma function is one of many 'special functions' that occur as the result of integrations, limits,
sums and products. The gamma function is defined as
t ( z−1 ) e −t dt
✄ ( z ) =
0
The gamma function is defined for all real and complex numbers except for negative integers. The
gamma function can also be used to define factorials of negative numbers and non-integers, since
✄ ( n + 1 ) = n!
The CAS occasionally returns results including the gamma function, but there is no built-in function to
calculate it. Here's a function to calculate gamma:
RMS residual:
Maximum residual:
Minimum residual:
RMS residual:
Maximum residual:
Minimum residual:
Re(z)>0
3.5E-8
3.5E-6
3.4E-10
7.4E-11
5.9E-9
-7.8E-10
6 - 3

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92+

Table of Contents