Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.07 KB

newtons-method.md

File metadata and controls

31 lines (22 loc) · 1.07 KB

← Return to Index

Newton's Method

Another method of finding the roots of a function f(x).

Algorithm

  1. Set n = 0 and make an initial guess, X0
  2. Compute Xn+1 = Xn - f(Xn)/f'(Xn)
  3. If |Xn+1 / Xn | < threshold
    • Return Xn+1
  4. Else, go to step 2

Intuition

  • h = X0 - X1
  • tan(θ) = f(X0)/h
  • Tangent of a curve f(X) at a point X0 is f'(X0)
  • f'(X0) = f(X0)/h
  • h = f(X0)/f'(X0) = X0 - X1
  • Hence, X1 = X0 - f(X0)/f'(X0)

Limitations

Although Newton's method is a very powerful technique, and it converges on the root much faster than the Interval Bisection method:

  • Calculating the derivative may be difficult or expensive
  • The derivative may be 0 and will halt due to divison by 0
  • May fail to converge
    • e.g. if f(x) = 1 - x2 and initial guess is 0