Numerical Analysis - Simple Newton-raphson method.

81 Views Asked by At

Question: $\tan(x)+\ln(x)$. Find a positive root of the equation with the Newton-Raphson method in 4 decimals.

This is a simple question about the Newton-Raphson method but I couldn't solve it. Would you help me?

1

There are 1 best solutions below

0
On BEST ANSWER

You are looking for the zero's of function $$f(x)=\tan(x)+\log(x)$$ This function is not very convenient because of the vertical asymptotes. So, it is better to consider $$g(x)=\sin(x)+\log(x) \cos(x)$$ and search for the solutions of this one.

If you had a look at the plot, you probably noticed that the solutions are closer and closer to $(2k+1)\frac \pi 2$. To get an estimate of the solution (it will become the $x_0$ for Newton method), build a Taylor expansion $$g(x)=1- \log \left((2k+1)\frac{\pi}{2}\right)\left(x-(2 k+1)\frac{\pi}{2} \right)+\cdots$$ Ignoring the higher order terms, the estimate of the $k^{th}$ root is then given by $$x_0^{(k)}=(2 k+1)\frac{\pi}{2}+\frac{1}{\log \left((2k+1)\frac{\pi}{2}\right)}$$

Except for the first and second roots, it seems to be quite good $$\left( \begin{array}{ccc} k & \text{estimate} & \text{solution} \\ 3 & 5.35747 & 5.25481 \\ 4 & 8.33918 & 8.29551 \\ 5 & 11.4127 & 11.3856 \\ 6 & 14.5147 & 14.4951 \\ 7 & 17.6297 & 17.6142 \\ 8 & 20.7519 & 20.7389 \end{array} \right)$$