Prove that the equation $x+\ln x=5$ has at least one root, and find it with precision of 2 digits

488 Views Asked by At

I need to prove that the equation $x+\ln x=5$ has at least one root, and to find that root in precision of two digits after the decimal point.

I know how to prove the root's existence using the intermediate value theorem:

I defined $f(x)=x+\ln x-5$, and $f(1)=-4<0$ and $f(e^5)=e^5>0$ so the root exists.

I don't know how to find it, and how to prove that the precision is good enough.

2

There are 2 best solutions below

0
On

A tighter bound follows from $f(3)=\ln 3-2<\ln(e^2)-3<0$ and $f(4)=\ln 4-1>\ln e-1=0$.

To find the root $x^*\in(3,4)$, you could rewrite as $x=5-\ln x$ and so motivate the recursion $x_{n+1}=g(x_n)=5-\ln x_n$ and hope that this converges quickly to the fixpoint $x^*$ of $g$. From $g'(x)=-\frac1x<0$ (and $>-\frac13$) for $x\in (3,4)$, it follows with $$x_{n+1}-x^*=g(x_n)-g(x^*)=(x_n-x^*)\cdot g'(\xi), $$ that the sequence $x_n$ alternates between too big and too small. So as soon as two consecutive terms agree to two digits, we have found the desired result. Start with $x_0=3$, say and apply the recursion six times to find a good enough approximation of $x^*$.

0
On

Consider that you look for the zero's of function $$f(x)=x+\log(x)-5$$ We have $$f'(x)=1+\frac 1x$$ which is aloways positive in the real domain because of the logarithm. So, $f(x)$ is an increasing function with only one zero.

Now, to make life easier, use inspection for $x=e^k$ $(k=0,1,2,\cdots)$ and you will see that the root is between $e$ $(f(e)=e-4\approx -1.28 <0)$ and $e^2$ $(f(e^2)=e^2-3\approx 4.39>0)$. So, the root is more than likely closer to $e$ than to $e^2$.

If you do not want (or cannot) use Lambert function, you need a numerical method such as Newton for example. So, using $x_0=e$ the iterates will be $$\left( \begin{array}{cc} n & x_n \\ 0 & 2.71828 \\ 1 & 3.65529 \\ 2 & 3.69340 \\ 3 & 3.69344 \end{array} \right)$$

You could also expand $f(x)$ as a Taylor series built around $x=e$. This would give $$f(x)=(e-4)+\left(1+\frac{1}{e}\right) (x-e)-\frac{(x-e)^2}{2 e^2}+\frac{(x-e)^3}{3 e^3}+O\left((x-e)^4\right)$$ Using the expansion to $O\left((x-e)^2\right)$, this would give (as an approximation) $x \sim \frac{5 e}{1+e} \approx 3.65529$ which is, by definition, the first iterate of Newton method. Using the expansion to $O\left((x-e)^3\right)$ gives a quadratic equation is $(x-e)$ and the solution would be $x \sim e \left(2+e-\sqrt{e (4+e)-7}\right)\approx 3.70329$ which is better.

Starting from the above expansion, you could also use series reversion which would give $$x=e+t+\frac{t^2}{2 e (1+e)}+\frac{(1-2 e) t^3}{6 e^2 (1+e)^2}+O\left(t^4\right) \qquad \text{where} \qquad t=\frac{e (f(x)-e+4)}{1+e}$$ Making $f(x)=0$ that is to say $t=\frac{(4-e) e}{1+e}$ would give $$x=e+\frac{(4-e) e}{1+e}+\frac{(e-4)^2 e}{2 (1+e)^3}+\frac{(e-4)^3 e (2 e-1)}{6 (1+e)^5}+\cdots \approx 3.69277$$ which is almost the solution.