You are on page 1of 12

Newton and Secant Methods

Newton’s Method
• Can be applied only when 𝑓 𝑥 , 𝑓 ′ 𝑥 and 𝑓 ′′ (𝑥) can be computed at every point.
• Any quadratic function can be represented by the Taylor series expansion at a point 𝑥 𝑘

1 ′′ 𝑘 2
𝑓 𝑥 =𝑓 𝑥𝑘 + 𝑓′ 𝑥𝑘 𝑥− 𝑥𝑘 + 𝑓 𝑥 𝑥 − 𝑥𝑘 +⋯
2

• We can take the first three terms as a quadratic approximation

𝑘 ′ 𝑘 𝑘
1 ′′ 𝑘 𝑘 2
𝑞 𝑥 =𝑓 𝑥 +𝑓 𝑥 𝑥−𝑥 + 𝑓 𝑥 𝑥−𝑥
2
𝑞(𝑥 𝑘 ) = 𝑓 𝑥 𝑘 , 𝑞′ 𝑥 𝑘 = 𝑓′ 𝑥𝑘 , 𝑞′′ 𝑥 𝑘 = 𝑓′′(𝑥 𝑘 )
Newton’s Method
• Thus the properties of the original function at
that point are preserved in the approximation.
• Which means at the minimum or maximum

𝑞′ 𝑥 = 0

𝑓 ′ 𝑥 𝑘 + 𝑓 ′′ 𝑥 𝑘 𝑥 − 𝑥 𝑘 = 0

𝑓′ 𝑥𝑘
𝑥= 𝑥𝑘 − ′′ 𝑘 = 𝑥 𝑘+1
𝑓 𝑥
Newton’s Method
𝑓 𝑥 = 𝑥 4 − 14𝑥 3 + 60𝑥 2 − 70𝑥, in the interval [0,2].

Initialize at 𝑥 0 = 0.1

1
𝑓′ 𝑥0
0
𝑥 = 𝑥 − ′′ 0 = 0.6229
𝑓 𝑥

2
𝑓 ′ 𝑥1
1
𝑥 = 𝑥 − ′′ 1 = 0.7692
𝑓 𝑥

3
𝑓′ 𝑥2
2
𝑥 = 𝑥 − ′′ 2 = 0.7808
𝑓 𝑥

4
𝑓′ 𝑥3
3
𝑥 = 𝑥 − ′′ 3 = 0.7808
𝑓 𝑥
Newton’s Method

1
𝑓′ 𝑥0
0
𝑥 = 𝑥 − ′′ 0 = 0.6229
𝑓 𝑥

2
𝑓 ′ 𝑥1
1
𝑥 = 𝑥 − ′′ 1 = 0.7692
𝑓 𝑥

3
𝑓′ 𝑥2
2
𝑥 = 𝑥 − ′′ 2 = 0.7808
𝑓 𝑥

4
𝑓′ 𝑥3
3
𝑥 = 𝑥 − ′′ 3 = 0.7808
𝑓 𝑥

• The method will work iff 𝑓 ′′ 𝑥 > 0 everywhere.

• It may fail to converge if for some point 𝑓 ′′ 𝑥 < 0 .


Secant Method
• As 𝑓 ′′ 𝑥 may not always be available, here the Newton’s method is modified so that only 𝑓(𝑥)
and 𝑓′(𝑥) are required.

𝑓′ 𝑥 𝑘 −𝑓′(𝑥 𝑘−1 ) 𝑓′ 𝑥 𝑘
• We use the concept 𝑓 ′′ 𝑥𝑘 ≈ in 𝑥 𝑘+1 = 𝑥𝑘 −
𝑥 𝑘 −𝑥 𝑘−1 𝑓′′ 𝑥 𝑘

• The update equation now becomes


𝑘 𝑘−1
𝑥 − 𝑥
𝑥 𝑘+1 = 𝑥𝑘 − ′ 𝑘 𝑓′(𝑥 𝑘)
𝑓 𝑥 − 𝑓 ′ 𝑥 𝑘−1
Secant Method
𝑓 𝑥 = 𝑥 4 − 14𝑥 3 + 60𝑥 2 − 70𝑥, in the interval [0,2].
Initialize at 𝑥 0 = 0.1, 𝑥 1 = 0.2,

𝑘 𝑘−1
𝑥 − 𝑥
𝑥 𝑘+1 = 𝑥𝑘 − ′ 𝑘 ′ 𝑘−1
𝑓′(𝑥 𝑘 )
𝑓 𝑥 −𝑓 𝑥
Finding Roots of Equation: Newton’s Method
Using Newton’s Method

• To find roots of 𝑔 𝑥 = 0, we can make

𝑔 𝑥 = 𝑓′(𝑥).

• Since we stop at the point when 𝑓 ′ 𝑥 = 0, this will also mean that
at the same point 𝑔 𝑥 = 0.

• We can modify the Newton’s update

𝑘+1 𝑘
𝑓′ 𝑥𝑘 𝑘+1 𝑘
𝑔 𝑥𝑘
𝑥 = 𝑥 − ′′ 𝑘 ⇒ 𝑥 =𝑥 −
𝑓 𝑥 𝑔′ 𝑥 𝑘
Finding Roots of Equation: Newton’s Method

Using Newton’s Method

• Let the first approximation be 𝑥 (𝑘)

• The tangent drawn at 𝑥 (𝑘) on 𝑔(𝑥) intersects the


x-axis at at 𝑥 (𝑘+1) .

• If we keep drawing the tangents then we will


approach the 𝑔 𝑥 ∗ = 0 eventually.

• This is also called Newton’s Method of


Tangents.
Finding Roots of Equation: Newton’s Method

Using Newton’s Method

• Disadvantage: If the initial approximation of the


root is not good enough , i.e., 𝑔(𝑥 0 )/𝑔′ 𝑥 0 is
not small enough, then we may not reach the
solution.

• Here if we start too far away, then we will not


arrive at the solution at all.
Finding Roots of Equation: Secant Method
Using Secant Method

• To find roots of 𝑔 𝑥 = 0, we can make


𝑔 𝑥 = 𝑓′(𝑥).

• Since we stop at the point when 𝑓 ′ 𝑥 = 0, this will also mean that
at the same point 𝑔 𝑥 = 0.

• We can modify the Secant update

𝑘+1 𝑘
𝑓 ′ 𝑥 𝑘 − 𝑓 ′ 𝑥 𝑘−1 ′ 𝑘
𝑥 =𝑥 − 𝑓 𝑥
𝑥 𝑘 − 𝑥 𝑘−1

𝑘+1
𝑔 𝑥 𝑘 − 𝑔 𝑥 𝑘−1
𝑘
⇒𝑥 =𝑥 − 𝑘 𝑘−1
𝑔 𝑥𝑘
𝑥 −𝑥
Finding Roots of Equation: Secant Method
Using Secant Method

• Secant : “A straight line that cuts a curve in


two or more parts.”

• Here instead of tangents this method uses the


secant between the (k-1)th and kth points to
determine the (k + l)th point.

• Due to this it does not suffer from the


disadvantage of Newton’s Tangent Method.

You might also like