Re: How to solve this natural log problem?
- From: "Dirk Van de moortel" <dirkvandemoortel@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 29 Jan 2007 18:10:58 GMT
"David W. Cantrell" <DWCantrell@xxxxxxxxxxx> wrote in message news:20070129122419.199$HL@xxxxxxxxxxxxxxxxx
"Dirk Van de moortel" <dirkvandemoortel@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:<amy_burton2007@xxxxxxxxx> wrote in message
news:1170055954.369782.189430@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> How to solve for x?
>
> 4000x = -6.9 - ln x
Take excel and write a number in cell A1.
In cell A2 enter the formula
= A1 - ( 4000*A1 + 6.9 + LN(A1) ) / ( 4000 + 1/A1 )
and copy this down to about A20.
This is Newton's method with f(x) = 4000 x + 6.9 + ln(x)
You're going to need a very small number to start with in A1
Try putting 1, 0.1, 0.01, 0.001 etc... in A1 and see what happens.
If you don't have excel, just take a high precision calculator
and you'll find the result in a few minutes.
My first preference would be to use the Lambert W function, as Rob did.
Yes, although excel doesn't have the Lambert W function (and
I have *never* seen a home/garden/kitchen calculator offer it),
there is, at least on this group, a strange tendency to mention
Lambert W whenever someone is looking for a solution to this
kind of equations.
Strange :-)
My second preference would be to use some analysis to get an approximate
solution. Then, if that's not sufficiently accurate, it at least gives a
good value for A1 in Newton's (or some other iterative) method.
Knowing that x must be a small positive number, the equation
a x = -b - ln(x)
has the approximate solution
x = (2a + 3c - Sqrt(-2a^2 + 24ac + 9c^2)) / (a(a - 2c)) where c = e^b.
Using a = 4000 and b = 6.9 in the above, we get the approximate solution
x = 0.000308... For comparison, the solution, as mentioned by Rob, is
x = 0.0003016...
Yes, that's what Excel gives me after a mere 5 iterations
with a seed of 0.001.
Dirk Vdm
.
- Follow-Ups:
- Re: How to solve this natural log problem?
- From: David W . Cantrell
- Re: How to solve this natural log problem?
- From: Ioannis
- Re: How to solve this natural log problem?
- References:
- How to solve this natural log problem?
- From: amy_burton2007
- Re: How to solve this natural log problem?
- From: Dirk Van de moortel
- Re: How to solve this natural log problem?
- From: David W . Cantrell
- How to solve this natural log problem?
- Prev by Date: Re: Cantor Confusion
- Next by Date: Re: a simple(?) probability question...
- Previous by thread: Re: How to solve this natural log problem?
- Next by thread: Re: How to solve this natural log problem?
- Index(es):
Relevant Pages
|
Loading