[Math] Interpolation of a logarithmic function

interpolationlogarithms

I have a logarithmic function

$$m \ln(x) + b$$

And three points

$$(x_0, y_0), (x_1, y_1), (x_2, y_2)$$

The task is to find $m$ and $b$.

Do I understand right that the third point is redundant?
Because

$$\begin{cases}
m \ln(x_0) + b = y_0 \\
m \ln(x_1) + b = y_1
\end{cases}$$

Therefore

$$ y_0 – y_1 = m(\ln(x_0) – \ln(x_1)), $$
$$m = \frac{y_0 – y_1}{\ln(x_0) – \ln(x_1)}$$

and $b$ is found trivially from either equation.

Please correct me if I am mistaken.

Best Answer

If you have two parameters and three equations, the system is overdetermined and you can use the method of least squares, see this question I asked for the method using the transpose of the matrix.

Is the least squares solution to an overdetermined system a triangle center?

Related Question