Use Newton's method to find root for the following equations

288 Views Asked by At

I have to use Newton's method to find the roots with accuracy $10^{-5}$ of the following equation :

$e^{x} + 2^{-x} +2\cos x -6 =0$ in the interval $(1,2)$

So $f'(x)= e^x - [2^{-x}]*[\log(2)] -2\sin x$

$x_{n} = x_{n-1} - [f(x)/f´(x)] $

Thing is,I don't have an $x_0$ here,so I can find $x_1$ and so on....also how am I going to use the fact that the accuracy needed is $10^{-5}$ here?

1

There are 1 best solutions below

3
On BEST ANSWER

We are given:

$$f(x) = 2^{-x}+e^x+2 \cos x-6$$

We are asked to use Newton's Method to find the roots with accuracy $10^{-5}$ in the interval $(1,2)$.

A plot of the function over the range shows:

enter image description here

There is a root at $x \approx 1.83$, so lets verify that using Newton's Method.

The Newton iteration is given by:

$$x_{n+1} = x_n- \dfrac{f(x_n)}{f'(x_n)} = x_n - \dfrac{2^{-x_n}+e^{x_n}+2 \cos x_n-6}{e^{x_n}-(\ln 2)~ 2^{-x_n}-2 \sin x_n}$$

Performing the iterations, we have:

  • $x_0 = 1.500000000$ (randomly chosen, but experiment with other values)
  • $x_1 = 1.956489721, error = |x_1 - x_0| = 0.45649$
  • $x_2 = 1.841533061, error = |x_2 - x_1| = 0.114957$
  • $x_3 = 1.829506013, error = |x_3 - x_2| = 0.012027$
  • $x_4 = 1.829383614, error = |x_4 - x_3| = 0.000122399$
  • $x_5 = 1.829383602, error = |x_5 - x_4| = 1.25603 \times 10^{-8}$

So, we get the desired accuracy after five-steps.