Use Newton's Method to solve the equation? #lnx+e^x=0#

2 Answers
Mar 26, 2017

See below.

Explanation:

According to Taylor expansion for #f(x)# near #x_0#

#f(x)=f(x_0)+((df)/(dx))_(x_0)(x-x_0)+O(abs(x-x_0)^2)#

Now supposing that #x_0 approx 0# then we can assume

#f(x_1)=f(x_0)+((df)/(dx))_(x_0)(x_1-x_0) =0#

This gives rise to an iterative approximation procedure

#f(x_k) = ((df)/(dx))_(x_k)(x_(k+1)-x_k) =0# or

#x_(k+1) = x_k - ((df)/(dx))_(x_k)^(-1)f(x_k)#

In this case we have

#((df)/(dx))_(x_k) = 1/x_k+e^(x_k)# so

#x_(k+1)=x_k-x_k/(1+x_ke^(x_k))(log(x_k)+e^(x_k))#

or

#x_(k+1)=(1-(log(x_k)+e^(x_k))/(1+x_ke^(x_k)))x_k#

With #x_0 = 0.5# the iteration history is

#((x_k, f(x_k)),(0.5, 0.955574),(0.238107, -0.166189),(0.268497, -0.00692001),(0.269872, -0.0000118326),(0.269874, -3.4569*10^-11),(0.269874, 0.))#

Mar 26, 2017

#x=0.2698741376# to 10dp.

Explanation:

We have:

# f(x) = lnx+e^x #

Our aim is to solve #f(x)=0#. First let us look at the graph:
graph{ln(x)+e^x [-5, 5, -10, 10]}

We can see that there is one solution in the interval #0 lt x lt 1#. Let us start with an initial approximation #x=1#.

To find the solution numerically, using Newton-Rhapson method we use the following iterative sequence

# { (x_1,=1), ( x_(n+1), = x_n - f(x_n)/(f'(x_n)) ) :} #

Therefore we need the derivative:

# \ \ \ \ \ \ \f(x) = lnx+e^x #
# :. f'(x) = 1/x+e^x #

Then using excel working to 10dp we can tabulate the iterations as follows:
enter image source here

We could equally use a modern scientific graphing calculator as most new calculators have an " Ans " button that allows the last calculated result to be used as the input of an iterated expression.

And we conclude that we have very rapid convergence, and the solution is #x=0.2698741376# to 10dp.