The Student Room Group

Find the solution to this equation using newton-raphson method

I have to find an approximate solution for the equation ln(x)=2-x by substituting suitable values of x.

so x=2-ln(x)
x1=2, x2= 1.306 and i end up with 1.557 as my approximate answer. Then it asks me to do the same using the newton raphson method.

From what i understand thats x2=x1-f(x)/f'(x) where f(x)=2-ln(x) and f'(x) = -1/x

so that means i have x1 - 2-ln(x) / -(1/x)

x-(-(2-ln(x))/1/x)) or x+x(2-ln(x))

but when i use 2 as x1 it converges to a completely different number than the first method.

Have I got the second part wrong? Thanks
Original post by Navm1
...


Using f(x)=2lnx f(x) = 2-\ln x is incorrect.

Good luck. :smile:
Original post by Navm1
I have to find an approximate solution for the equation ln(x)=2-x by substituting suitable values of x.

so x=2-ln(x)
x1=2, x2= 1.306 and i end up with 1.557 as my approximate answer. Then it asks me to do the same using the newton raphson method.

From what i understand thats x2=x1-f(x)/f'(x) where f(x)=2-ln(x) and f'(x) = -1/x

so that means i have x1 - 2-ln(x) / -(1/x)

x-(-(2-ln(x))/1/x)) or x+x(2-ln(x))

but when i use 2 as x1 it converges to a completely different number than the first method.

Have I got the second part wrong? Thanks


Try f(x)=lnx2+xf(x)=\ln x -2 + x

(You need it to equal zero)
Reply 3
Original post by Mr M
Try f(x)=lnx2+xf(x)=\ln x -2 + x

(You need it to equal zero)


i slept on it, dreamt about it then woke up and used 2-lnx-x=0 then ended up using

x1-(-(2-lnx-x/(x+1/x)) and got the answer. thanks for that too
Original post by Navm1
I have to find an approximate solution for the equation ln(x)=2-x by substituting suitable values of x.

so x=2-ln(x)
x1=2, x2= 1.306 and i end up with 1.557 as my approximate answer. Then it asks me to do the same using the newton raphson method.

From what i understand thats x2=x1-f(x)/f'(x) where f(x)=2-ln(x) and f'(x) = -1/x

so that means i have x1 - 2-ln(x) / -(1/x)

x-(-(2-ln(x))/1/x)) or x+x(2-ln(x))

but when i use 2 as x1 it converges to a completely different number than the first method.

Have I got the second part wrong? Thanks


What module is this and what exam board?
Reply 5
Original post by Hazard17
What module is this and what exam board?


Access to HE, think its included in the sequences and series module
Original post by Navm1
I have to find an approximate solution for the equation ln(x)=2-x by substituting suitable values of x.

so x=2-ln(x)
x1=2, x2= 1.306 and i end up with 1.557 as my approximate answer. Then it asks me to do the same using the newton raphson method.

You may be interested to know that Wolfram|Alpha does these.
Reply 7
Original post by Smaug123
You may be interested to know that Wolfram|Alpha does these.


thanks bro. i use wolfram and symbolab all the time but didnt think to try it with newton raphson

Quick Reply

Latest