0% found this document useful (0 votes)
65 views14 pages

Roots of Nonlinear Equations

This document discusses numerical methods for solving nonlinear equations. It covers the bisection method, Newton-Raphson method, and secant method. Examples are provided to illustrate how to use each method to find the root of nonlinear equations within a given interval and accuracy. The bisection method uses interval halving to narrow down the range containing the root, while Newton-Raphson and secant methods use derivatives to iteratively estimate the root.

Uploaded by

Nabil Fikri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views14 pages

Roots of Nonlinear Equations

This document discusses numerical methods for solving nonlinear equations. It covers the bisection method, Newton-Raphson method, and secant method. Examples are provided to illustrate how to use each method to find the root of nonlinear equations within a given interval and accuracy. The bisection method uses interval halving to narrow down the range containing the root, while Newton-Raphson and secant methods use derivatives to iteratively estimate the root.

Uploaded by

Nabil Fikri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

➢ Roots of Nonlinear Equations

CHAPTER 3 ➢ Interpolation Polynomial


➢ Numerical Differentiation
➢ Numerical Integration
Numerical ➢ Numerical Solution of Ordinary
Differential Equations

Methods ➢ Numerical Solution of Partial Differential


Equations
ROOTS OF NON-LINEAR EQUATIONS

❑ Methods that can be used to solved non-linear equations.


❑ We want to know the solution of x, so that f (x)=0.
❑ Example of non-linear equations:

→ 3sin x + e x = 0
→ 3x3 + 3x + 1 = 0

Bisection method

Methods of Roots of Newton Raphson


Nonlinear Equations method

Secant method
f (a)

f (b)
x3
Example: Find the possible sub-interval that contain the solution of f ( x) = − x 2 + 1 To increase your speed in
3 obtaining the value using
in the interval  −2,3 , with step size (h) = 1, using intermediate value theorem. calculator? Learn it from
https://youtu.be/g6txNbJkrGk
Use 4 decimal points in your calculations.

x f (x) Sign of f (x)


-2 -5.6667 -ve
-1 -0.3333 -ve
[-1,0]
0 1.0000 +ve
[-2,3]
1 0.3333 +ve
[1,2]
2 -0.3333 -ve
[2,3]
3 1.0000 +ve

(−2)3
f (−2) = − (−2) 2 + 1 = −5.6667
3

x3
 There are three possible sub-interval that contain the solution of f ( x) = − x 2 + 1:  −1, 0 , 1, 2  and  2,3.
3
Roots of Non-linear Equations:
BISECTION METHOD
*Aim: We want to find the solution of x, so that f (x)=0.
(Find the root of solution f (x))

To increase your speed in obtaining the value using calculator?


Go to https://youtu.be/g6txNbJkrGk
Example 1: Find the solution of e − x - x = 0 in the interval  0,1 by using Bisection method.Use 3 decimal places in all calculations.

Check the sign of


ai + bi f (ai ) f (ci )  0 OR f (bi ) f (ci )  0
i ai bi ci = f (ai ) f (bi ) f (ci )
2
f (ai ) f (ci )  0 f (bi ) f (ci )  0

0 0 1 0.5 1.000 -0.632 0.107 /


1 0.5 1 0.75 0.107 -0.632 -0.278 /
2 0.5 0.75 0.625 0.107 -0.278 -0.090 /
3 0.5 0.625 0.563 0.107 -0.09 0.007 /
4 0.563 0.625 0.594 0.007 -0.09 -0.041 /
5 0.563 0.594 0.579 0.006 -0.042 -0.019 /
6 0.563 0.579 0.571 0.006 -0.019 -0.006 /
7 0.563 0.571 0.567 0.006 -0.006 0.000

 The solution of f ( x) = e x − x is 0.567.


Example 2: Find the root of x 4 − x − 10 = 0 accurate to  =0.015 in the interval 1.5, 2 by using Bisection method.
Use 3 decimal places in all calculations.

ai − ci   Check the sign of


ai ai + bi f (ai ) f (ci )  0 OR f (bi ) f (ci )  0
i bi ci = f (ai ) f (bi ) f (ci ) OR
2
bi − ci   f (ai ) f (ci )  0 f (bi ) f (ci )  0

0 1.5 2 1.75 -6.438 4 -2.371 0.25 /


1 1.75 2 1.875 -2.371 4 0.485 0.125 /
2 1.75 1.875 1.813 -2.371 0.485 -1.009 0.062 /
3 1.813 1.875 1.844 -1.009 0.485 -0.282 0.031 /
4 1.844 1.875 1.860 -0.282 0.485 0.109 0.015 - -

 The solution is 1.860.


Roots Of Non-linear Equations:
NEWTON-RAPHSON METHOD
Formula Newton Raphson method:
f ( xi )
xi +1 = xi −
f '( xi )

*Aim: We want to find the solution of x, so that f (x)=0.


(Find the root of solution f (x))
To increase your speed in obtaining the value using calculator?
Go to https://youtu.be/g6txNbJkrGk
Example 1: Solve x3 − 3x − 1 = 0 using Newton Rapson method with initial value x0 = 0. Use 6 decimal places in all calculations.

→ Find f '( x) = 3x 2 − 3 f ( x0 ) −1
x1 = x0 − = 0− = −0.333333
f '( x0 ) −3
→ substitute the initial value x0 = 0 into the f '( x)
f ( x1 ) −0.037037
= 3(0) − 3 = −3
2 x2 = x1 − = (−0.333333) − = −0.347222
f '( x1 ) −2.666667

Formula NRmethod:
f ( x2 ) −0.000196
f ( xi ) x3 = x2 − = (−0.347222) − = −0.347296
xi +1 = xi − f '( x2 ) −2.638310
f '( xi )

i x f ( xi ) f '( xi )
0 0 -1 -3
1 -0.333333 -0.037037 -2.666667
2 -0.347222 -0.000196 -2.638310
3 -0.347296 -0.000000 -

 This is the solution


Example 2: Solve x 2 − 4 x + 6 = 0 using Newton Rapson method with initial value x0 = 2.

→ Find f '( x) = 2 x − 4
→ substitute the initial value x0 = 2 into the f '( x)
2(2) − 4 = 0

i x f(x) f’(x)
0 2 2 0
1 Solution cannot be find - -

2
x1 = 2 − = not exist
0

 if f '( x0 ) = 0, we cannot find the solution of f ( x) using that x0 .


Example 3: Use the Newton Raphson method to estimate the root of f ( x) = x 2 + 2 x − 5 = 0 accurate to   0.001
and given an initial point is x0 = 1. Use 4 decimal places in all calculations.

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

→ substitute the initial value x0 = 0 into the f '( x)


f '(1) = 2(1) + 2 = 4

i x f ( xi ) f '( xi ) xi − xi −1
0 1 -2 4 -
1 1.5 0.25 5 x1 − x0 = 1.5 − 1 = 0.5
2 1.45 0.0025 4.9 x2 − x1 = 1.45 − 5 = −0.05 = 0.05
3 1.4495 0.00005  0.0001 4.8990 0.0005
4 1.4495 0.00005  0.0001 - -

 This is the solution


Roots of Non-linear Equations:
SECANT METHOD
Formula Secant method:
 xi − xi −1 
xi +1 = xi − f ( xi )  
 f ( xi ) − f ( xi −1 ) 

*Aim: We want to find the solution of x, so that f (x)=0.


(Find the root of solution f (x))
To increase your speed in obtaining the value using calculator?
Go to https://youtu.be/g6txNbJkrGk
Example 1: Solve x3 − 3x − 1 = 0 using Secant method with initial value x0 = 0 and x1 = 1. Use 6 decimal places in all calculations.

 xi − xi −1  x
xi +1 = xi − f ( xi )   i f ( xi )
 f ( xi ) − f ( xi −1 
)
0 0 -1
 x1 − x0 
x2 = x1 − f ( x1 )   1 1 -3
 f ( x1 ) − f ( x0 
)
 1− 0  2 -0.5 0.375
= 1 − (−3)   = −0.5
 (−3) − (−1)  3 -0.333333 -0.037037
 x2 − x1  4 -0.348315 0.002685
x3 = x2 − f ( x2 )  
 f ( x2 ) − f ( x1 
) 5 -0.347302 0.000016
 (−0.5) − 1 
= (−0.5) − (0.375)   6 -0.347296 -0.000000
 (0.375) − (−3) 
= −0.333333

 x3 − x2 
x4 = x3 − f ( x3 )  
 f ( x3 ) − f ( x2 
)
 (−0.333333) − (−0.5) 
= (−0.333333) − (−0.037037)  
 ( −0.037037) − (0.375) 
= −0.348315
*How to determine initial value if it is not given in the question?
Example: Solve 4 x cos(2 x) − ( x − 2) 2 in the interval  0, 5 using Bisection, Newton-Raphson & Secant method.
Use 3 decimal places in all calculations.

x f (x) Sign of f (x)


0 -4 -ve
1 -2.665 -ve
2 -5.229 -ve
3 10.522 +ve
4 -6.328 -ve
5 -25.781 -ve

You might also like