2

find real root of given equation

$$5x - 2 \cos x -1=0 $$

I only know that I should use

$$x_n = \frac{ x_{n-2} f_{n-1} - x_{n-1} f_{n-2} } { f_{n-1} - f_{n-2} }$$ And I applied it, but didn't get desired answer

Can anyone explain me about some important point, to solve this type of problems.

akash
  • 127
  • at first i would have a look at the graph of $$f(x)=5x-2\cos(x)-1$$ – Dr. Sonnhard Graubner Jul 13 '16 at 15:29
  • Can you use MathJax? What you've written now is not really clear enough for me to even make an edit. Anyway, as for the problem itself, it helps to have some idea of where the solution might be before you do any calculation. Notice that $f(x) \leq 5x+1$ and $f(x)\geq 5x-3$. This means that if $5x+1<0$ then $x$ can't be a root and if $5x-3>0$ then $x$ can't be a root. Therefore the root is in the interval $[-1/5,3/5]$. This means that you should choose your initial guess (or guesses; it looks like you're using a secant method, which uses two guesses) in this interval. – Ian Jul 13 '16 at 15:29
  • or you use the Newton-Raphson method – Dr. Sonnhard Graubner Jul 13 '16 at 15:30
  • there is only one real root – Dr. Sonnhard Graubner Jul 13 '16 at 15:32
  • I guessed that where you wrote $X_n$ you actually intended $x_n$, so I changed it. $\qquad$ – Michael Hardy Jul 13 '16 at 15:44
  • Sir answer is 0.54 – akash Jul 13 '16 at 16:24
  • 1
    If you want help debugging the required secant method, then please add a table of $(x_n,f_n)$ to your question so that one can start to deduce what went wrong. – Lutz Lehmann Jul 13 '16 at 18:56

3 Answers3

2

As $f'(x)=5+2\sin(x)$ has no root, the function is monotonic and has at most one root.

Given the range of the cosine, you can write the bracketing

$$5x-3\le5x-2\cos x-1\le5x+1,$$ which gives two simple estimates, and $x\in(-\frac15,\frac35)$, from which you can start regula falsi.

enter image description here

  • Sir still I'm confused how to solve this.. there are 3methods. And I used all . But ans. Has not come.. and calculation become weird – akash Jul 13 '16 at 15:55
  • 1
    @akash: what starting values did you use ? What do you mean by "But ans. Has not come.." ? –  Jul 13 '16 at 16:02
  • @akash, what does 'calculation become weird' mean? – Yuriy S Jul 13 '16 at 16:18
  • X$o$=-1/5 And in rgula faldi method one term is there I.e X$n-1$ when we put n=0 then x$-1$ ??? – akash Jul 13 '16 at 16:18
  • Sir i mean to say when I used regula falsi method in this 1 term is there x$n-1$ which confused me. – akash Jul 13 '16 at 16:20
1

Using Ian's comment and Yves Daoust's answer, we get an initial value in the interval $(-1/5,3/5)$.

Since there is only one real root it makes sense to take an initial value inside this interval, for example $x_0=1/2$.

I don't see why you need a complicated procedure. The easiest way (for me) appears to be fixed point iteration:

$$x_n=\frac{1+2 \cos x_{n-1}}{5}$$

$$x_0=\frac{1}{2}=0.5$$

$$x_1=\color{blue}{0.5}51033024756149$$

$$x_2=\color{blue}{0.54}0793647370719$$

$$x_3=\color{blue}{0.542}920147441434$$

$$x_4=\color{blue}{0.542}481469458663$$

$$x_5=\color{blue}{0.5425}72091664505$$

The root is:

$$x=\color{blue}{0.5425565799894813}$$


If you need faster convergence, you can of course use another method.

Yuriy S
  • 31,474
1

By convexity there is just one real solution of $\cos(x)=\frac{5x-1}{2}$, and you may apply Newton's method with starting point $x_0=\frac{\pi}{6}$ to get it is $\approx 0.54255658$ with very few iterations.

Jack D'Aurizio
  • 353,855