# Thread: numerical methods for natural logarithms

1. ## numerical methods for natural logarithms

Hello,
I am writing a program that is looking at a sensor exposed to a shower of carbon particles. The data that comes out has to thermally equilibrate but falls along a natural log curve. I want to discover, given a few points of data. there the curve will end up. So - I want to know the constant associated with the Ln curve given just a few data points. Thank you in advance ~ keith

2. I don't know what you mean by "the constant associated with the Ln curve". Is your function of the form Cln(x), or ln(x+ C), or ln(x)+ C?

3. Originally Posted by keithcausey
Hello,
I am writing a program that is looking at a sensor exposed to a shower of carbon particles. The data that comes out has to thermally equilibrate but falls along a natural log curve. I want to discover, given a few points of data. there the curve will end up. So - I want to know the constant associated with the Ln curve given just a few data points. Thank you in advance ~ keith
You will need logarithmic regression to find the equation of the logarithm curve. Refer, Linear Regression Log Transformation | Tutorvista.com for more information.

4. ## constants associated with Ln

Pardon the lack of clarity in my original post. I think that the data I am looking at is a thermal change. As such the curve it follows is a natural log. I am trying to find "C" where "C" is a constant of the form C*Ln(X). Without seeing the entire curve I want to derive "C" from the data to establish where the curve resolves itself asymptotically. I can provide a spreadsheet along with a description of the physical system involved if you feel that would clarify the problem.

Originally Posted by HallsofIvy
I don't know what you mean by "the constant associated with the Ln curve". Is your function of the form Cln(x), or ln(x+ C), or ln(x)+ C?

5. Great. Since there is only one unknown, C, you really only need one data point. If a data point is x= a, y= b, then y= C ln(x) becomes b= C ln(a) and so $C= \frac{b}{ln(a)}$.

If your data gives an exact logarithm function, it won't matter which point you use. If it is not exact (and real data seldom is) you might want to calculate "C" separately for as many points as you have and average the result.

6. Thank you for your quick response. In attempting to apply this method I noticed that the data I have is not fixed to a specific "X" coordinate. The "X" coordinate is a function of time and can occur translated anywhere along the "X" axis. Is there a way to normalize the "X" coordinate by examining two coordinates with the understanding that they are parts of a ln function with an unknown "C"?

7. Correct me if I'm misunderstanding, but can't you take your first measurement and call it your start, $t = 0$? Then interpret your desired function as something of the form $A \ln(t+B) + C$, take three data points and solve for all the variables. For greater certainty take more data points and average the results.

Alternately, you might just drop the $C$ and take fewer data points, though this might provide less flexibility to fit the data for large values of $t$.

Edit: Actually, doing it this way you'll possibly need four data points.