How to find the function that is perfectly between y = x^2 and y = x

functions

At first, I thought it was as simple as taking both functions adding them together then dividing by two, but this is not the case for what I am looking for.
Here is a plot of the following:

y = x
y = x^2
y = 1/2*(x^2+x)
points exactly in between y = x and y = x^2

As you can see the red line representing y = 1/2*(x^2+x) does not land on the green points which are exactly in between the two functions y = x and y = x^2. What I am trying to learn how to do is figure out how to find the function which represents the exact middle between the two equations y = x and y = x^2.

I have already tried using an excel sheet to fit a line to all the green points I have calculated and still can't come up with a good line that fits.

I have looked into calculating the midpoint between two given points and that only helped calculate the points between the two equations, and didn't help towards obtaining a function that perfectly represents the line between y = x and y = x^2.

Thanks for any help or suggestions towards the right domain of math reserved for solving cases like this one.

cheers!!

Best Answer

The green dots in your plot have the coordinates

a = {{0, 0}, {1, 1}, {3, 4}, {6, 9}, {10, 16}, {15, 25}, {21, 36}, {28, 49}, {36, 64}, {45, 81}}

which can be calculated with the formula

f[x_] = (1 + 4 x - Sqrt[1 + 8 x])/2

Test:

f[10]
(*    16    *)
f[45]
(*    81    *)

How to find this formula: in Mathematica,

FindSequenceFunction[a, x]
(*    (-1 + 1/2 (1 + Sqrt[1 + 8 x]))^2    *)
Related Question