联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> C/C++编程C/C++编程

日期:2022-03-31 10:04

Newton’s Method

Pros:

In general, Netwon’s method has quadratic convergence: the error is squared at each

iteration (the number of accurate digits doubles).

Cons:

1. Newton's method requires calculating the derivative. In many cases, the function is

given by a complex formula and an analytical expression for the derivative may not

be easy to calculate. Solution: We can use Secant method, which approximates the

derivative by using the slope of a line through two points on the function.

2. If the initial value is too far from the true zero, Newton's method may fail to

converge (has only local convergence). Solutions: Practical implementation of

Newton's method should put an upper limit on the size of the iterates. Instead, we can

use bisection to obtain a better estimate for the zero to use as an initial point.

Example: For some functions and some

starting points, it may enter an infinite cycle,

preventing convergence. Let

( ) 2 2 3 f x = x − x + and take 0 as the starting

point. The first iteration produces 1 and the

second iteration returns back to 0, so the

sequence will oscillate between the two

without converging to a root.

3. If the function is not continuously differentiable in a neighborhood of the root, it is

possible that Newton's method will always diverge or fail. Solution: Try another

initial point.

Example: Newton's method diverges for the cube root, which is continuous and

infinitely differentiable, except for x = 0, where its derivative is undefined:

3 f (x) = x → k

k

k

k k

x

f x

f x

x x 2 '( )

( ) 1 = − = − +

4. Newton's method will fail in cases where the derivative is zero. When the derivative

is close to zero, the tangent line is nearly horizontal and hence may overshoot the

desired root (numerical difficulties). Solution: Try another initial point.

5. In some cases the iterates converge, but do not converge quadratically. Solution: Use

simpler methods, like bisection, which in that case converge as quickly (linearly) as

Newton's method.

Example: If the first derivative is zero at the root, then convergence will not be

quadratic:

2 f (x) = x → '( ) 2

( ) 1

k

k

k

k k x

f x

f x

x = x − = +


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp