1

Edited for readability

I'm having some trouble with this because I've tried solving this myself through the iterations, and I've also tried Matlab and an online calculator.

The first time I tried the iterations myself I began with x=1. On the second iteration I was getting $1-\frac{0}{0}$ which did not look right to me at all. I get the same behavior (an error of division by 0 when I try Matlab).

Here is what I am doing - now I have chosen $-.5$ because it is closer to the root (which is approx $-.47$ by looking at the graph of f(x)=arccos(x)−2x−3.

$$f(x) = arccos(x)-2x-3$$

$$f'(x) = \frac{-1}{\sqrt{1-x^2}} - 2$$

Newton's method : $$x - \frac{f(x)}{f'(x)} $$

which, in this particular case $$x - \frac{ arccos(x) - 2·x - 3}{ -\sqrt{ 1-x^2 }} - 2$$

Now when I plug in x=−.5 $$p1 = (-.5) - \frac{( arccos(-.5) - 2·(-.5) - 3 )}{ -\sqrt{ 1-(-.5)^2} } - 2 = -2.3910019244$$

$$p2 = (-2.3910019244)-\frac{arccos(-2.3910019244)-2·(-2.3910019244)-3}{-\sqrt{1-(-2.3910019244)^2}}-2$$

p2=not a real number

So this is where I am stuck because I can clearly see the root on the graph but I do not seem to be getting close to it.

Thanks for the help!

  • 1
    http://www.wolframalpha.com/input/?i=-.5-%28arccos%28-.5%29-2%28-.5%29-3%29%2F%281%2F-sqrt%281-%28-.5%29%5E2%29-2%29 I'm getting something different when I plug in -.5 . Also it looks like you entered in a different f' then what you have gotten. – randomgirl Feb 02 '15 at 21:58
  • Oh my gosh, I see what I was doing wrong. I was putting the -2 outside of f/f'. I've been going in circles with this, thanks so much for the clarity! – Mary Martinez Feb 02 '15 at 22:00

3 Answers3

1

Note that $f'(x)$ is undefined at $x= \pm 1$ because of division by zero. Newton's method works well if you start close to the root. If you graph it, the root is somewhere near $-0.4$. Starting at $-0.4$ I converge rapidly to $-0.4699722$

Ross Millikan
  • 374,822
0

sometimes it helps to look at a problem from a different angle. you will notice that your equation can be re-written as: $$ g(x) = x - \cos(2x+3) = 0 $$ now you have: $$ g'(x) = 1+2\sin(2x+3) $$ if you take $x_1 = -0.5$ then $$ x_2 = -0.5 - \left( \frac{-0.5 + \cos(2)}{1+2\sin(2)}\right) \\ = - 0.4703... $$

David Holden
  • 18,040
0

Edit

Darya found my mistake, I was placing the -2 from my f' outside of f/f' which is why I wasn't getting close to the root.

Therefore, this is Newton's method, in this particular case:

$$x - \frac{ arccos(x) - 2·x - 3}{ \frac {-1}{\sqrt{ 1-x^2} } -2}$$

Now when I plug in x=−.5 $$-.5 - \frac{ arccos(-.5) - 2·(-.5) - 3}{ \frac {-1}{\sqrt{ 1-(-.5)^2} } -2} = -4.7007795515$$