# How can I find formula of the function of this graph?

I want to plot the graph in this picture, but I don't know formula of the function. I tried

 f[x_] := a x^9 + b x^8 + c x^7 + d x^6 + e x^5 + n x^4 + g x^3 +
h x^2 + k x + l ;
NSolve[{f[-2] == -2, f == 2, f == 4, f == 6, f[1.5] == 3,
f' == 0, f'[2.5] == 0, f'[1.5] == 0, f[2.5] == 1.5,
f'[1.2] == 0}, {a, b, c, d, e, n, g, h, k, l}, Reals]


I got

{{a -> 0.23626, b -> -2.61292, c -> 9.81292, d -> -9.83145, e -> -26.1737, n -> 76.7269, g -> -67.1827, h -> 16.1222, k -> 0., l -> 6.}}

But the result don't exactly.

How can I find formula of the function of this graph? • What are your thoughts about the inflexion point within $(1,2)$? Sep 9, 2017 at 8:01

We can extract the data from the picture ,then use the "FindFormula" to find formula of the function.(It is difficult to extract data directly through image processing, so I erased interference in the picture firstly) . imgdat = Sort[ImageValuePositions[Thinning@ColorNegate@Binarize[IMG], 1]];
dat = ({Rescale[#1, MinMax[imgdat[[;; , 1]]], {-2.1, 4.4}], Rescale[#2, MinMax[imgdat[[;; , 2]]], {-2.7, 6.4}]} & @@@ imgdat);
fits = FindFormula[dat, x, 1, "Score" ]
Show[ListPlot[dat],
Plot[First@fits, {x, -2.1, 4.4}, PlotRange -> All,
PlotStyle -> Directive[Red, Thick]], AspectRatio -> 1] maybe help.

• Another approach is used here mapleprimes.com/questions/… . Sep 9, 2017 at 18:27
• @jiaoeyuhushu Where can I put my picture? Sep 10, 2017 at 7:38
• If my picture has name is pic.PNG, how to put it in your code? Sep 10, 2017 at 8:36
• @toandhsp RemoveAlphaChannel[pic.PNG] or Save as pic.JPG Sep 10, 2017 at 9:41
• How I input pic.JPG? Where the command contain pic.JPG? Sep 10, 2017 at 9:47