Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is a simple formula to find 2 intermediate values between 2 known values?

f(1)=a, f(2)=?, f(3)=?, f(4)=b

If there would be only 1 unknown, then it would be mean ((a+b)/2), but what to do when there are 2 intermediate values to calculate?

share|cite|improve this question
up vote 2 down vote accepted


$$f (x) := a + \left(\frac{b-a}{3}\right) (x-1)$$

and then evaluate $f (2)$ and $f (3)$. You should obtain

$$f (2) = \frac{2 a + b}{3}, \quad{} f (3) = \frac{a + 2 b}{3}$$

which are weighted averages of $a$ and $b$. If you had $4$ known values, you would be able to use a cubic interpolating polynomial, but since you only have $2$, you must use an affine polynomial.

share|cite|improve this answer

The four numbers are:

$a=\frac{3a+0}3, \frac{2a+b}3, \frac{a+2b}3, \frac{0+3b}3=b$

share|cite|improve this answer

Your Answer


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.