3

Why does it oscillate? I looked up the graph of it and I think it is convergent? And when the function is $0$, the solution is also 0. What is the difference of choosing diverse starting values? Thanks!

J.doe
  • 1,417
  • 1
  • 17
  • 31
  • What is the slope of a tangent line to the curve when $ \ x \ $ is far away from zero? What will the next $ \ x_i \ $ be using Newton's Method? Will the method ever get you to $ \ x = 0 \ $ for such starting values? – colormegone Feb 11 '16 at 02:36
  • I see, but how am I supposed to find the starting value of oscillation? – J.doe Feb 11 '16 at 02:44
  • 1
    @AndréNicolas With $x_0=\pi/4$, the iterates alternate sign but they nevertheless converge. Divergent oscillation starts around $x_0=\pm 1.4$. – Ian Feb 11 '16 at 03:47
  • @Ian: Thanks, I miscomputed. – André Nicolas Feb 11 '16 at 03:53

2 Answers2

3

Let $\phi(x) = x - {f(x) \over f'(x)} = x - (x^2+1) \arctan x$. This is the Newton update. Define the sequence $x_n$ starting at $x_0$ by $x_{n+1} = \phi(x_n)$,

Note that $\phi$ is odd and $\phi(0) = 0$, $\lim_{x \to -\infty} (\phi(x)-x) = \infty$ and $\lim_{x \to\infty} (\phi(x)+x) = - \infty$. We have $\phi'(x) = -2 x \arctan x$, hence $\phi$ is strictly decreasing.

Let $x^*$ be the unique positive $x$ satisfying $\phi(x^*) = -x^*$.

For $0<|x| < |x^*|$, we have $|\phi(x)| < |x|$, and for $|x| < |x^*|$, we have $|\phi(x)| \le |x|$

Hence if $|x_0| < |x^*|$, we have $|x_{n+1}| \le |x_n|$ for all $n$, and so $|x_n|$ converges to some value $y$ and continuity shows that $|y|=|\phi(y)|$, and so $y=0$ (since $|y| < |x^*|$). Hence $x_n \to 0$ if $|x_0| < |x^*|$.

If $|x_0| = |x^*|$, then the sequence is $x_0, -x_0, x_0,-x_0,...$, which neither converges nor diverges.

For $|x| > |x^*|$, we have $|\phi(x)| > |x|$, hence $|x_n|$ is non decreasing. If $|x_n|$ is bounded, then $|x_n| \to y$ for some $y$ and, as above, we have $|y|=|\phi(y)|$ which is a contradiction since $|y| > |x^*|$. Hence $|x_n|$ diverges to infinity.

It is not hard to estimate $x^* \approx 1.3917$.

copper.hat
  • 172,524
2

One of the basic properties of Newton's method is local convergence: if a function is continuously differentiable on a neighborhood of its root, then for any $x_0$ in a (generally smaller) neighborhood of the root, Newton's method converges. Examples like this one show us that it can have very erratic behavior otherwise. This is basically because linear approximation isn't actually good past a short range, and Newton's method is based on linear approximation.

Your problem shows an example of this: if you start too far away from $x=0$, $\arctan$ is around 1 or so, while its derivative is very small (in particular, much smaller than $1/x$). Consequently the first iteration sends you to a large value of the opposite sign, and then the phenomenon repeats.

Ian
  • 101,645
  • I get it! But how am I supposed to find the starting value from the graph? – J.doe Feb 11 '16 at 02:38
  • @J.doe Your question just wants you to try some examples in MATLAB, until you see both convergence and oscillation. I'm not sure if they want you to find an example of both bounded oscillation and unbounded oscillation, though. – Ian Feb 11 '16 at 02:40
  • It says to find the "starting value" of oscillation. Not sure if I get it right, but I think that means it wants us to find the point from where the whole function starts to oscillation? – J.doe Feb 11 '16 at 02:45
  • @J.doe They mean the sequence of Newton iterations. Try actually running it with $x_0=0.1,0.5,1$ and $10$ and see what happens. The behavior is really clear once you see an example. – Ian Feb 11 '16 at 02:47
  • 1
    @J.doe You're welcome. Note that I don't think your assignment wants you to actually find the points where the oscillation begins, which is good because that's actually not so easy (it turns out that you'd need to solve the equation $\arctan(x)(x^2+1)=2x$, which is itself a Newton's method problem!) – Ian Feb 11 '16 at 02:53