PDA

View Full Version : Solution for a logarithmic equation


Dashone
Apr 11, 2009, 06:02 AM
How would one solve the following for x?
y=ln(x+1)+x

galactus
Apr 11, 2009, 09:52 AM
There is no nice algebraic way to solve this for x.

Dashone
Apr 11, 2009, 10:55 AM
Galactus,
I did not think there was an "easy" algebraic solution. I guess what I am really asking is what numerical method could be used if I alread know the values for y?

galactus
Apr 11, 2009, 01:33 PM
OK. If we have a y value, let's use Newton's method.

That is always a good standby.

Let's say y=3.

ln(x+1)+x=3

f(x)=ln(x+1)+x-3

Find the derivative: f'(x)=\frac{1}{x+1}+1

Newton's method is x_{n+1}=x_{n}-\frac{f(x)}{f'(x)}

Start with an initial guess of, say, 1.5:

1.5-\frac{ln(1.5+1)+1.5-3}{\frac{1}{1.5+1}+1}=1.91693519152=\frac{5ln(2/5)+18}{7}

Do it again:

1.91693519152-\frac{ln(1.91693519152+1)+1.91693519152-3}{\frac{1}{1.91693519152+1}+1}=1.92626725634

Keep doing it until it converges close enough.

The actual solution is 1.92627106244. So we are very close.

Dashone
Apr 11, 2009, 04:01 PM
THANKS GALACTUS! I new there was some method, it was just escaping me.