`[img]link to picture[/img]`

If you want to upload images from your computer, I *think* you need to upload them onto another site first and then link to it.

P1(x1;y1)

P2(x2;y2)

P3(x3;y3)

.

.

.

Pn(xn;yn)

Polynomial method

--------------------------------------------

My polynomial method consists of solving n equations to n variables (wich isn't very fun when you have 50 pts or more)

For n points, it seems that you only need a polynomial of degree n-1 or lower (I haven't proved it).

y1=a1.x1^(n-1) + a2.x1^(n-2) + a3.x1^(n-3) + ... + a(n-1).x1 + an

y2=a1.x2^(n-1) + a2.x2^(n-2) + a3.x2^(n-3) + ... + a(n-1).x2 + an

y3=a1.x3^(n-1) + a2.x3^(n-2) + a3.x3^(n-3) + ... + a(n-1).x3 + an

.

.

.

yN=a1.xn^(n-1) + a2.xn^(n-2) + a3.xn^(n-3) + ... + a(n-1).xn + an

(Solve for a1,a2,a3,...,a(n-1),an)

Mixed Method

--------------------------------------------

When studying the polinomial method, I came up with an ideia - mixing polynomials with trigonometric (then periodic) functions

*The 'one-point only' case*

We know that cos(0)=1.

If we have one point K(a;1) we can say that the function θ(x)=cos(x-a) contains that point. But what if that abcyss wasn't 1? We could multiply θ(x) for the y-value since θ(a)=1. For K(a;b) we can build the function θ(x)=bcos(x-a) containing the point.

*And what if more points are given?*

We could build separate θ-functions for each point and then find a way to connect all that information into a single equation!

To make things simpler lets consider 3 points.

P1(x1;y1) P2(x2;y2) and P3(x3;y3)

We must find a function , so that P1∈, P2∈ and P3∈. In another way:

(x1)=y1 (x2)=y2 (x3)=y3

Now we build the θ-funcs:

θ1(x)=y1.cos(x-x1)

θ2(x)=y2.cos(x-x2)

θ3(x)=y3.cos(x-x3)

θ1 has the solution for P1. We don't want **θ1** to 'influentiate' **θ2** and **θ3**. So for x=x2 and x=x3, θ1 must be zero.

θ2 has the solution for P2. We don't want **θ2** to 'influentiate' **θ1** and **θ3**. So for x=x1 and x=x3, θ2 must be zero.

θ3 has the solution for P3. We don't want **θ3** to 'influentiate' **θ1** and **θ2**. So for x=x2 and x=x3, θ1 must be zero.

If we have a polynomial with zeros at x2 and x3, we can multipy it by θ1 to assure that θ1 doesn't mess up with the other points

Such polinomial is simple to find P1(x)=(x-x2)(x-x3)

The same applies to θ2 and θ3

P2(x)=(x-x1)(x-x3)

P3(x)=(x-x1)(x-x2)

Multiply now.

θ1(x)P1(x)

θ2(x)P2(x)

θ3(x)P3(x)

Build the function

s(x)=θ1(x)P1(x)+θ2(x)P2(x)+θ3(x)P3(x)

lets analyse it...

s(x1)=θ1(x1)P1(x1)+0+0=θ1(x1)P1(x1)

s(x2)=0+θ2(x2)P2(x2)+0=θ2(x1)P2(x2)

s(x3)=0+0+θ3(x3)P3(x3)

Ok! we are very near!

If we divide each factor for Pj(xj) (to 'undo the effects' of multiplication by the polynomial at that point) we get:

g(x1)=θ1(x1)P1(x1)/P1(x1)=θ1(x1)=(x1)

g(x2)=θ2(x2)P2(x2)/P2(x2)=θ2(x2)=(x2)

g(x3)=θ3(x3)P3(x3)/P3(x3)=θ3(x3)=(x3)

So the function is defined like this:

(x)=θ1(x)P1(x)/P1(x1)+θ2(x)P2(x)/P2(x2)+θ3(x)P3(x)/P3(x3)

where:

θj=yjcos(x-xj)

Pj=(x-x1)(x-x2)(x-x3)/(x-xj)

You can extend this to the number of points you want. But I haven't proved anything. Proofs are welcome : )

And this poly-trig method has some interesting properties like translation and scaling wich I'm researching rigth now.

I hope that's not as hard to understand as it was to explain...

And things sometimes get difficult because English is not my natural language and my level of education is pre-college.

Feel free to make questions,comments,corrections,suggestions,etc..

--------------------------------------------

&btw.. can I post pictures here? it would be a lot easier to show some things I will post in a few days : |

B-splines can do a neater job, but are not a single "function" as such, they are more like polynomial-segments (I can't remember the details, though)

]]>Anyone has ideias on this topic? I leave you with an example:

Find a continuous function that contains the following points

P1(-5;2) P2(3;8) P3(0;0) P4(7;-8) P5(1/2;-5)

(completely random pts)

Any suggestions please add a brief demonstration plz.

]]>