Using Newton Raphson method to find x2 and x3

600 Views Asked by At

I have the following question where I am asked to find the values of $x_2$ and $x_3$:

enter image description here

Here is my attempt is this correct?

enter image description here

2

There are 2 best solutions below

4
On BEST ANSWER

You are on the right track

$$ f(x) = x + \frac{1}{2}\sin(2x) -\frac{\pi}{4} \\ f'(x) = 1 + \cos(2x) $$

So that

$$ x_{n+1} = x_n -\frac{f(x_n)}{f'(x_n)} $$

These are the first few iterations

$$ \begin{array}{c|c}\hline n & x_n \\ \hline 0 & 0.4 \\ 1 & 0.415748 \\ 2 & 0.415856 \\ 3 & 0.415856 \\ \hline \end{array} $$

If you go to Wolfram Sandbox you can enter this code to get the first 10 iterations

f[x_] := x + Sin[2x]/2 -\[Pi]/4;
fp[x_] := 1 + Cos[2x];

NestList[(#-f[#]/fp[#])&, 0.4, 10]
0
On

You made the following mistake:

You have calculated

$$\frac{(0.4-0.4+0.5\cdot \sin(2*0.4)-\pi/4)}{1+\cos(2\cdot0.4)}=\frac{0.4267}{1.967}$$

I would fist calculate $$\frac{x_0+0.5\cdot \sin(2\cdot x_0)-\pi/4}{1+\cos(2\cdot x_0)}$$

and then substract this result from $x_0.$

For $x_0=0.4$ we get

$$\frac{0.4+0.5\cdot \sin(2\cdot 0.4)-\pi/4}{1+\cos(2\cdot 0.4)}=-0.015748$$ -

Substracting: $0.40000-(-0.01575)=0.40000+0.015748=0.415748$