Anonymous user
Thiele's interpolation formula: Difference between revisions
m
added whitespace to the task's preamble, used a better glyph for pi, added bullet points, used a large font for the Greek and math symbols, italics, and subscripts to make them easier to read, made the rho glyph consistent as in the formulae.
SqrtNegInf (talk | contribs) m (→{{header|Perl 6}}: default to 12 element table, 'cos' converges slowly) |
m (added whitespace to the task's preamble, used a better glyph for pi, added bullet points, used a large font for the Greek and math symbols, italics, and subscripts to make them easier to read, made the rho glyph consistent as in the formulae.) |
||
Line 3:
<br>
'''[[wp:Thiele's_interpolation_formula|Thiele's interpolation formula]]''' is an interpolation formula for a function ''f''(•) of a single variable. It is expressed as a [[continued fraction]]:
:: <big><big><math> f(x) = f(x_1) + \cfrac{x-x_1}{\rho_1(x_1,x_2) + \cfrac{x-x_2}{\rho_2(x_1,x_2,x_3) - f(x_1) + \cfrac{x-x_3}{\rho_3(x_1,x_2,x_3,x_4) - \rho_1(x_1,x_2) + \cdots}}} </math></big></big>
:: <big><big><math> \rho_1(x_0, x_1) = \frac{x_0 - x_1}{f(x_0) - f(x_1)} </math></big></big>
:: <big><big><math> \rho_2(x_0, x_1, x_2) = \frac{x_0 - x_2}{\rho_1(x_0, x_1) - \rho_1(x_1, x_2)} + f(x_1) </math></big></big>
:: <big><big><math> \rho_n(x_0,x_1,\ldots,x_n)=\frac{x_0-x_n}{\rho_{n-1}(x_0,x_1,\ldots,x_{n-1})-\rho_{n-1}(x_1,x_2,\ldots,x_n)}+\rho_{n-2}(x_1,\ldots,x_{n-1}) </math></big></big>
Demonstrate Thiele's interpolation function by:
# Building a '''32''' row ''trig table'' of values
#* '''sin'''
#* '''cos'''
#* '''tan'''
# Using columns from this table define an inverse - using Thiele's interpolation - for each trig function;
# Finally: demonstrate the following well known trigonometric identities:
#* <big><big> 6 × sin<sup>-1</sup> ½ =
#* <big><big> 3 × cos<sup>-1</sup> ½ =
#* <big><big> 4 × tan<sup>-1</sup> 1 =
<br><br>
|