# logarithmic equation from points

• May 27th 2006, 05:49 PM
asian5
logarithmic equation from points
i need to derive a logarithmic equation in the form y=aloge(x+b)+c
given that it passes through the points (0,0) (12,20) (30,30)
it is a positive log with a horizontal asymptote x<0
• May 27th 2006, 06:18 PM
ThePerfectHacker
Quote:

Originally Posted by asian5
i need to derive a logarithmic equation in the form y=aloge(x+b)+c
given that it passes through the points (0,0) (12,20) (30,30)
it is a positive log with a horizontal asymptote x<0

I presume you need to curve fit (0,0),(12,20),(30,30) such as,
$\displaystyle y=a\ln (x+b)+c$
Subsituting this into this equation yields,
$\displaystyle 0=a\ln (0+b)+c$
$\displaystyle 20=a\ln (12+b)+c$
$\displaystyle 30=a\ln (30+b)+c$
---------
From equation 1 we have,
$\displaystyle c=-a\ln b$
Substitute that into equation 2 and 3 thus,
$\displaystyle 20=a\ln (12+b)-a\ln b$
$\displaystyle 30=a\ln (30+b)-a\ln b$
Thus,
$\displaystyle 20=a(\ln (12+b)-\ln b)$
$\displaystyle 30=a(\ln (30+b)-\ln b)$
Divide these equation thus,
$\displaystyle \frac{2}{3}=\frac{\ln (12+b)-\ln b}{\ln (30+b)-\ln b}$
Cross multiply,
$\displaystyle 2\ln (30+b)-2\ln b=3\ln (12+b)-3\ln b$
Now raise $\displaystyle e$ to that power,
$\displaystyle e^{2\ln (30+b)-2\ln b}=e^{3\ln (12+b)-3\ln b}$
Thus,
$\displaystyle \frac{(30+b)^2}{b^2}=\frac{(12+b)^3}{b^3}$
Thus,
$\displaystyle b(30+b)^2=(12+b)^3$
Open sesame,
$\displaystyle 30^2b+2\cdot 30b^2+b^3=12^3+3\cdot 12^2b+3\cdot 12 b^2+b^3$
Thus,
$\displaystyle 24b^2-468b-1728=0$
Thus,
$\displaystyle b^2-19.5b-72=0$
<to be countinued>
this gives you b.
• May 27th 2006, 06:48 PM
ThePerfectHacker
In the previous post I gave you the analytic method, I do not know if you care for that but simply for a solution.
If you want that then,
$\displaystyle \left{ \begin{array}{c}a\approx 12.8\\ b\approx 3.173\\ c\approx -14.78$
And it gives you this curve below with the points bolded.
• May 28th 2006, 12:27 AM
asian5
thanks so much,
but would u b able to finish the working from the quadratic for "b" u came up with, and sub that value back into the approapriate equation to find the other values. correct to three decimal places
thanks
• May 28th 2006, 01:01 AM
CaptainBlack
Quote:

Originally Posted by ThePerfectHacker
Thus,
$\displaystyle 24b^2-468b-1728=0$
Thus,
$\displaystyle b^2-19.5b-72=0$
<to be countinued>
this gives you b.

Should be:

Thus,
$\displaystyle 24b^2+468b-1728=0$
Thus,
$\displaystyle b^2+19.5b-72=0$

which has roots $\displaystyle b=-22.675, b=3.175$, and if we want
$\displaystyle a$ and $\displaystyle c$ to be real this rules out the first of these
roots and so $\displaystyle b=3.175$, which is reassuringly in agreement
with the numerical result.

RonL
• May 28th 2006, 01:16 AM
asian5
finish
did you use the quadratic formula?
what equation do i sub this 'b' value into to give 'a' and 'c'? correct to 3 decimal places?
• May 28th 2006, 01:33 AM
CaptainBlack
Quote:

Originally Posted by asian5
did you use the quadratic formula?
what equation do i sub this 'b' value into to give 'a' and 'c'? correct to 3 decimal places?

Yes I used the quadratic formula.

Substitute the value of $\displaystyle b$ into any two of the three equations
given at the top of The PerfectHackers first post, say:

$\displaystyle 0=a\ln (0+b)+c$
$\displaystyle 20=a\ln (12+b)+c$

this will leave you with a pair of linear equations in $\displaystyle a$ and $\displaystyle b$.

$\displaystyle 0=a\ln (3.175)+c$
$\displaystyle 20=a\ln (15.175)+c$

or:

$\displaystyle 0=1.1553 a+c$
$\displaystyle 20=2.720 a+c$.

RonL
• May 28th 2006, 01:47 AM
asian5
now do u solve similtaneously?
can u take me through it please
• May 28th 2006, 03:35 AM
CaptainBlack
Quote:

Originally Posted by asian5
now do u solve similtaneously?
can u take me through it please

If you subtarct the first equation from the second:

$\displaystyle 20-0=2.720 a+c-(1.1553 a+c)=1.5644 a$

so:

$\displaystyle a=20/1.5644 \approx 12.785$

Substituting this back into the first of the equations gives:

$\displaystyle 0=1.1553 a+c=1.1553\times 12.785+c$

so:

$\displaystyle c=-14.771$

RonL
• May 28th 2006, 09:46 AM
ThePerfectHacker
Thank you CaptainBlack for finishing my post, saved me a lot of time.
• May 28th 2006, 09:50 AM
CaptainBlack
Quote:

Originally Posted by ThePerfectHacker
Thank you CaptainBlack for finishing my post, saved me a lot of time.

That's OK

RonL