Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CE 09 | NUMERICAL SOLUTIONS TO

CE PROBLEMS
LECTURE NO.4 SEPT. 24, 2023

CONTINUATION OF ROOTS OF NON-LINEAR EQUATIONS Step by Step procedure to perform the Newton-Raphson
Method (the initial given is xn):
Perhaps the most common and most accurate root-finding
technique is the Newton-Raphson Method. This method 1. Determine the first derivative of the function, f’(x).
involves the use of the slope of the tangent to the curve. 2. Solve for f(xn) and f’(xn)
Consider the graphical illustration of this method shown in 3. Solve for the new value of x, xn+1
Figure 1.3. Let xn as the last assumed value of the root. 𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 −
According to this method, the next value of the root, xn+1, is the 𝑓′(𝑥𝑛 )
intersection of the tangent line to the curve at the x-axis.
4. Repeat steps 2 and 3 for every new value of x until its
value can be accepted as the root. The tabular
presentation of the results of iteration is helpful.

Example 3:

Determine the root of 3x4 + 7x3 -15x2 + 5x = 17 using the


Newton-Raphson method. Perform 7 iterations and use x0 =
0.

The previous example demonstrates that despite its accuracy


and speed, the main problem with the Newton-Raphson
Method is obtaining the derivative of a complicated function.
Thus, a new method is modified by substituting the first
Figure 1.3
derivative, f’(x), by the slope of the secant line connecting the
first two iterations, and is called as secant method.
𝑦 − 𝑓(𝑥𝑛 ) = m(𝑥 − 𝑥𝑛 )

The coordinate of the point where the tangent intersects the x- Consider the graphical representation shown in Figure 1.4.
axis is (xn+1,0) and from differential calculus, its slope if f’(xn).
Substituting these values in the previous equation:

0 − 𝑓(𝑥𝑛 ) = f′(𝑥𝑛 )(𝑥𝑛+1 − 𝑥𝑛 )

Isolating xn+1 in the equation:

𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 −
𝑓′(𝑥𝑛 )
Figure 1.4

CVMina Page 1 of 2
CE 09 | NUMERICAL SOLUTIONS TO
CE PROBLEMS
LECTURE NO.4 SEPT. 24, 2023

The secant line passes through (xn-1,f(xn-1)) and (xn,f(xn)). Thus, its
slope is:
𝑓(𝑥𝑛 ) − 𝑓(𝑥𝑛−1 )
𝑚𝑠𝑒𝑐𝑎𝑛𝑡 =
𝑥𝑛 − 𝑥𝑛−1

Replacing f’(x) in the Newton-Raphson formula into msecant:


𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 −
𝑓(𝑥𝑛 ) − 𝑓(𝑥𝑛−1 )
𝑥𝑛 − 𝑥𝑛−1

By some algebraic manipulation:


𝑓(𝑥𝑛 )(𝑥𝑛 − 𝑥𝑛−1 )
𝑥𝑛+1 = 𝑥𝑛 −
𝑓(𝑥𝑛 ) − 𝑓(𝑥𝑛−1 )

Step by Step procedure to perform the Secant Method (the


initial given is xn-1 and xn):

1. Solve for f(xn-1) and f(xn)


2. Solve for the new value of x, xn+1
𝑓(𝑥𝑛 )(𝑥𝑛 − 𝑥𝑛−1 )
𝑥𝑛+1 = 𝑥𝑛 −
𝑓(𝑥𝑛 ) − 𝑓(𝑥𝑛−1 )

3. Repeat steps 1 and 2 for every new value of x until its


value can be accepted as the root. The tabular
presentation of the results of iteration is helpful.

Example 4:

Determine the root of 3x4 + 7x3 -15x2 + 5x = 17 between


[1, 2]. Use the Secant method and perform 7 iterations.

For Practice:

1. Determine the negative root of 3x4 + 7x3 -15x2 + 5x = 17


using the newton-raphson method. Perform 7 iterations.
2. Determine the root of 3x4 + 7x3 -15x2 + 5x = 17 between
[-4,-3] using the secant method. Perform 7 iterations.

CVMina Page 2 of 2

You might also like