Thiele's interpolation formula: Difference between revisions
Content added Content deleted
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: | Line 3: | ||
<br> |
<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]]: |
'''[[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]]: |
||
:<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><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 </math></big></big> represents the [[wp:reciprocal difference|reciprocal difference]], demonstrated here for reference: |
|||
:<math>\rho_1(x_0, x_1) = \frac{x_0 - x_1}{f(x_0) - f(x_1)}</math> |
:: <big><big><math> \rho_1(x_0, x_1) = \frac{x_0 - x_1}{f(x_0) - f(x_1)} </math></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><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> |
||
:<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><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: |
Demonstrate Thiele's interpolation function by: |
||
# Building a 32 row ''trig table'' of values |
# Building a '''32''' row ''trig table'' of values for <big><big><math> x </math></big></big> from '''0''' by '''0.05''' to '''1.55''' of the trig functions: |
||
#* '''sin''' |
|||
#* '''cos''' |
|||
#* '''tan''' |
|||
# Using columns from this table define an inverse - using Thiele's interpolation - for each trig function; |
# Using columns from this table define an inverse - using Thiele's interpolation - for each trig function; |
||
# Finally: demonstrate the following well known trigonometric identities: |
# Finally: demonstrate the following well known trigonometric identities: |
||
#* 6 × sin<sup>-1</sup> ½ = |
#* <big><big> 6 × sin<sup>-1</sup> ½ = <math> \pi </math> </big></big> |
||
#* 3 × cos<sup>-1</sup> ½ = |
#* <big><big> 3 × cos<sup>-1</sup> ½ = <math> \pi </math> </big></big> |
||
#* 4 × tan<sup>-1</sup> 1 = |
#* <big><big> 4 × tan<sup>-1</sup> 1 = <math> \pi </math> </big></big> |
||
<br><br> |
<br><br> |
||