1
$\begingroup$

I'm not super with math but I need to make a function in my web app to get the value of a point on a curve when I know the curve points that are set. Here is what I did, I put a set of point with the x and y set at the know points then did an exponential trend line with limits of 1.15 to 3 for the x value. The y value ranges from 0-1000. I get for the formula output from excel as

y = 5.3785e0.7204x R² = 0.9898  

Here are the points I have

x        y 10      3 25      2.95 50      2.75 100     2.5 200     2 300     1.5 1000    1.15 

I short i need to have my web app say, what is the y value when x is 176. I know this is probably simple for you math guys but I'd be thankful the help. Cheers

2 Answers 2

1

Note that your text says y ranges from 0 to 1000 and x from 1.15 to 3, but your data is the reverse. When I plot it, the data doesn't fit an exponential at all. The last point is way off, with the rest fitting a straight line very well. If I had to use this data I would either throw away the point at 1000 or use a pair of linear fits, one from 10 to 300, and another from 300 to 1000.

The way to read your output from excel is $y=5.3785e^{0.7204x}$ and in the computer languages I have used you would write y=5.3785*exp(0.7204*x), but that can't be right because y increases with x while the data goes the other way. When I fit the data as presented to an exponential in excel, I get $y=2.7032e^{-.001x}$ and if I transpose x and y I get $y=10046e^{-2.054x}$

  • 0
    Yes your right this really doesn't fit an exponential function does it. Well those are the points.. um.. well i tried to adding 5.3785*exp(0.7204*A2) were A2 is a cell that is value of 10 so it should solve to 3 but it does not. I get 7233.00259.. for 2.7032*-EXP(0.001*A2) i get -2.730367612 .. all 3 you put don't seem to get the right number. The way i got the 5.3785e0.7204x was from the trend line. .. not she here.2012-08-28
0

Using Octave, I used least squares to fit a line of the form $x \mapsto ax+b$ to the data points $(x_i, \ln y_i)$ above, and ended up with $a \approx -0.95815 \times 10^{-3}$, $b \approx 0.99445$. This corresponds to a model $y = K e^{\alpha x}$ where $\alpha = a \approx -0.95815 \times 10^{-3}$ and $K = e^b \approx 2.7032$.

So the model should be $y = 2.7032 e^{-0.95815 \times 10^{-3} x}$.

  • 0
    I'm sorry I tried those and still don't get the right value.. at that I'm not sure how it's transposed cause excel did the graph.. lol. i seem to be quite lost here lol.2012-08-28