It's been 30 yrs since I've done this kind of math and I'm extremely weak on even the basics.
I need a function that is exponential ($y=a*b^x$) but will fit 2 data points. I think I came up with a way to develop a function but I used a calculator's "solver" function to give a decimal result rather than an expression. The problem with this is that the decimal based coefficient of the function causes y to be slightly higher than 1 if x=100,000. What would be the pure function expression for this?
- datapoint 1A) x=100,000 , y=1
- datapoint 2A) x=45,000,000 , y=450
What I did...
$y=a*b^x$
(solving for a)
1=a*b^100000
if... b=1 (because y=1 in the datapoint series and 1 is easy to work with)...
1=a*1^100,000 then a=1//
(then, solving for b)
$y=a*b^x$
450=1*b^4,500,000
(450/1)=b^4,500,000
then using solver, b=1.0000013576115
function that fits both points is: $y=1.0000013576115^x$
But if I substitute x=100,000 into this function, I get 1.1454081746 and not 1, per the original data point. I suspect it's because it would take a large number of decimal levels of precision to make y=1 when x=100,000. What would be the purely expression form of this function?
Also, I need to make a similar exponential function for these 2 data points, which is more difficult to solve because there's no y=1 to start with:
- datapoint 1B) x=100,000 , y=0.05 (5 is repeating)
- datapoint 2B) x=4,500,000 , y=25
1 Answer
$\begingroup$The issue is in how you solved for $a$. You cannot suppose that $b=1$ just because it simplifies the formula. Part of the problem is to find the value of $b$!
So you do have two correct equations
$1 = a b^{100000}$
and
$25 = ab^{4500000}$.
Now we have two equations and two unknowns. To find $b$ you can divide the two equations to get$25=b^{4500000-100000}=b^{4400000}$ which gives
$b = 25^{1/4400000}\approx 1.00000073$. Then you can find $a$ by plugging this back into either equation. Let's take the first:
$1 = a(1.00000073)^{100000}$ which gives
$a \approx .92960085$
So $y = .92960085(1.00000073)^x$.
The same process works for your other example. The fact that one of the $y$ values was $0$ wasn't particularly helpful. However, if one of your $x$ values is $0$, the corresponding $y$ value is $a$ and so this simplifies a bit.
$\endgroup$ 1