[Math] Graphing: Given two points on a graph, find the logarithmic function that passes through both.

functionsgraphing-functionslogarithmspolynomials

Is there such a method to do this? I would like to come up with a logarithmic function (a graph that looks like a square root graph) that passes through two given points. Haven't had any luck in searching so far and I'm not sure where I should start.

Let's say that the points at $(1,150), (99, 300)$ for argument's sake.

Best Answer

We want to find $a$ and $b$ such that, say, $y=a\ln(b\,x)$, passes through the given distinct points $(x_1,y_1)$ and $(x_2,y_2)$. This leads to the $2\times 2$ system \begin{align} y_1&=a\ln(b\,x_1),\\ y_2&=a\ln(b\,x_2). \end{align} Solving for $a$ and $b$, we find $$ a={y_1-y_2\over \ln(x_1/x_2)}, \qquad b=\exp\left({y_2\ln(x_1)-y_1\ln(x_2)\over y_1-y_2}\right). $$

You can check that with these value for $a$ and $b$, indeed $y=a\ln(b\,x)$ passes through your two points $(1,150)$ and $(99,300)$.