Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

From my understanding about Linear Interpolation especially of that of Newton's Divided Difference Polynomial, we could get the value of F(x) from the given set of coordinates.

But would it be possible of the if x values itself is an expression, like 0.25X and having a constant value of 0.5. I don't know if I get the correct understanding of the NDDP: Linear Interpolation correctly given the scenario.

Given the set of coordinates. How would I find the value for X = 0.4x where x = is integer constant to the plane

X     Y
0     0.25
0.25x 0.5
0.5x  1
0.75x 2
x     4
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

See if this works for you, as I am not sure I understood the question well.

y[n_] /; n == 0 := 0.25;
y[n_] := 2*y[n - 1];
f[k_] := Table[{n*y[0] k, y[n]}, {n, 0, 5}]
constantToThePlane = 1;
data = f[constantToThePlane];
g = Interpolation[data];
p1 = Plot[g[x], {x, 0, data[[-1, 1]]}, AxesOrigin -> {0, 0}];
p2 = ListPlot[data, Mesh -> True, Filling -> Axis, 
     PlotStyle -> {Red, PointSize[0.015]}];
pt = {PointSize[.05], Point[{0.4 constantToThePlane, g[0.4 constantToThePlane]}]};
Show[p1, p2, Graphics[pt], Frame -> True]

Mathematica graphics

The plots plots the new point at 0.4 X, where X is your constantToThePlane. The actual value of 0.4*X is

 g[0.4 constantToThePlane]
 (*0.754*)

Update:

Here is an example of trying a quadratic polynomial:

y[n_] /; n == 0 := 0.25;
y[n_] := 2*y[n - 1];
f[k_] := Table[{n*y[0] k, y[n]}, {n, 0, 5}]
constantToThePlane = 1;
data = f[constantToThePlane];
p2 = ListPlot[data, Mesh -> True, Filling -> Axis, 
    PlotStyle -> {Red, PointSize[0.015]}];
guess1 = a + b x + c x^2;
guess1Data = FindFit[data, guess1, {a, b, c}, x]
Labeled[Show[Plot[guess1 /. guess1Data, {x, 0, data[[-1, 1]]}], p2, 
     Frame -> True, PlotRange -> All, AxesOrigin -> {0, 0}], 
 Row[{"fitting to ", guess1 /. guess1Data}]]

Mathematica graphics

share|improve this answer
    
Basing from the illustration, you got the right idea. Unfortunately, I can't read your solution properly. Sorry little bit of an rookie in your solution but what language did you use? –  Dr. Java Jan 9 at 2:49
    
@Dr.Java you ask what language did you use?, I am using Mathematica, or now known as Wolfram language. This is a programming language made by company called Wolfram research. They have student version, and also personal version and commerical version. see wolfram.com to buy a copy from the online store there. –  Nasser Jan 9 at 2:54
    
Thanks. For the mean time. Is there a direct equation/formula for the graph above? –  Dr. Java Jan 9 at 2:56
    
The formula would be more delighted. I didn't know that Mathematica was a program tool, instead of a SE about Math - in which was Mathematics. –  Dr. Java Jan 9 at 3:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.