Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2007-08-22 17:02:14

mikau
Member
Registered: 2005-08-22
Posts: 1,504

molding a polynomial

its easy enough to make a polynomial that crosses the x axis at any given set of real numbers.

take for instance, 1, 2, 3, 4, 5, just define
y= (x - 1)(x-2)(x-3)(x-4)(x-5) and we're done.

Its easy enough to make a polynomial that is equal to some constant C for a given set of numbers.

y= (x - 1)(x-2)(x-3)(x-4)(x-5)+C

but what if we want to make a polynomial that passes through a given set of y values for a given set of x values, in otherwords, a polynomial that passes through a given set of points.  (assuming there are no two points (a,b) and (a,c) in the set such that a != c)

hmm...maybe we could do it with taylor or maclauren series perhaps?

my initial thought is that you could make each point of the set a turning point on the graph (where the derivative is zero) we can make this happen if we let dy/dx = (x - 1)(x-2)(x-3)(x-4)(x-5), multiply all the binomials to get the polynomial into standard form (okay, you can do that if you really want to wink ) then integrate this poly, and we'll get y = a polynomial + C.  this garantees that the graph will turn at the x coordinate of each point, but it doesn't fix the y value does it. x_x

any more ideas?

Last edited by mikau (2007-08-22 17:05:16)


A logarithm is just a misspelled algorithm.

Offline

#2 2007-08-23 03:59:11

bossk171
Member
Registered: 2007-07-16
Posts: 301

Re: molding a polynomial

I think this is a polynomial...

points (a,A);(b,B);(c,C)

You can see how at point (a,A) the right two terms collapse to 0 and the left term collapses to A. This is called the Langrangian interpolation and I got it out of a book named "Meta Math" by Gregory Chaitin.

It's easy (but a little tedious) to add more points on to this.


There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.

Offline

#3 2007-08-23 05:02:45

mikau
Member
Registered: 2005-08-22
Posts: 1,504

Re: molding a polynomial

wow, thats COOL!


A logarithm is just a misspelled algorithm.

Offline

#4 2007-09-01 17:17:29

mikau
Member
Registered: 2005-08-22
Posts: 1,504

Re: molding a polynomial

hmm.. this is wierd.

before hearing about that Lagrangian interpolation you mentioned, i worked out the coefficients with a 6x6 matrix to create a polynomail formula for the nth term of the sequence 8,15,16,23, 42 (the mysterious sequence from the hit tv series LOST)  the polynomial I got was 60 -122.4*n + 91.75*n^2 -29.375*n^3 + 4.25*n^4 -0.225*n^5

this polynomail has fractional coefficients but for some odd reason, it APPEARs to only produce integers. I wrote a program to test it and hear is the evaluation from 1 to 100

1: 3.9999999999999942
2: 7.9999999999999885
3: 14.99999999999995
4: 16.000000000000085
5: 23.0
6: 41.99999999999977
7: 45.999999999999545
8: -52.00000000000091
9: -426.0
10: -1364.0
11: -3295.0000000000073
12: -6816.000000000007
13: -12719.0
14: -22018.000000000015
15: -35976.0
16: -56132.0
17: -84328.0
18: -122736.0
19: -173885.0
20: -240688.0
21: -326469.0000000001
22: -434990.00000000023
23: -570478.0
24: -737652.0000000002
25: -941750.0
26: -1188556.0
27: -1484427.0000000002
28: -1836320.0000000002
29: -2251819.0000000005
30: -2739162.0
31: -3307268.0000000005
32: -3965764.0
33: -4725011.999999999
34: -5596136.0
35: -6591049.0
36: -7722480.0
37: -9004001.0
38: -1.0450054E7
39: -1.2075978000000002E7
40: -1.3898036E7
41: -1.5933441999999998E7
42: -1.8200388000000004E7
43: -2.0718071E7
44: -2.3506720000000007E7
45: -2.6587623E7
46: -2.9983154E7
47: -3.37168E7
48: -3.7813188E7
49: -4.229811200000001E7
50: -4.719856E7
51: -5.254274100000001E7
52: -5.8360112E7
53: -6.4681405000000015E7
54: -7.1538654E7
55: -7.8965222E7
56: -8.6995828E7
57: -9.566657400000001E7
58: -1.0501497200000001E8
59: -1.15079971E8
60: -1.25901984E8
61: -1.37522915E8
62: -1.49986186E8
63: -1.63336764E8
64: -1.77621188E8
65: -1.92887596E8
66: -2.0918575199999997E8
67: -2.2656707300000006E8
68: -2.45084656E8
69: -2.6479330500000003E8
70: -2.85749558E8
71: -3.08011714E8
72: -3.3163986E8
73: -3.56695898E8
74: -3.83243572E8
75: -4.11348495E8
76: -4.41078176E8
77: -4.7250204699999994E8
78: -5.0569149000000006E8
79: -5.407198640000001E8
80: -5.77662532E8
81: -6.16596888E8
82: -6.57602384E8
83: -7.00760557E8
84: -7.461550560000001E8
85: -7.93871669E8
86: -8.4399835E8
87: -8.96625246E8
88: -9.518447240000002E8
89: -1.0097513980000001E9
90: -1.070442156E9
91: -1.134016187E9
92: -1.200575008E9
93: -1.2702224910000002E9
94: -1.34306489E9
95: -1.419210868E9
96: -1.498771524E9
97: -1.58186042E9
98: -1.6685936080000002E9
99: -1.759089657E9
100: -1.85346968E9

as you can see, it APPEARS to be producing only ints (minor differences most likely due to limited precision)

I'm wondering, could you prove this polynomail always produces an integer for ever integer value of n?

I'm guessing, since this is also a 5th degree polynomial molded around those values, that the above polynomial is just the lagrangian interpolation in standard polynomial form. So maybe because of all the integer values in the lagrangian interpolation formula, the thing is just full of integer..ness.


A logarithm is just a misspelled algorithm.

Offline

Board footer

Powered by FluxBB