-2
$\begingroup$

Define a function when you are given a graph with points (0,3),(2,5),(10,4),(6,2)

$\endgroup$
  • $\begingroup$ Is this about Wolfram Mathematica? $\endgroup$ – Kuba May 16 at 10:23
1
$\begingroup$

You can use FindFormula:

list = {{0, 3}, {2, 5}, {10, 4}, {6, 2}};

ClearAll[f]
f = FindFormula[list];

f[x]

$ 3. + 2.12083 x - 0.65 x^2 + 0.0447917 x^3$

f /@ list[[All, 1]]

{3., 5., 4., 2.}

Alternatively, you can use Interpolation:

ClearAll[f2]
f2 = Interpolation[list];
f2 /@ list[[All, 1]]

{3, 5, 4, 2}

$\endgroup$

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