final-proj-word
final-proj-word
PROJECT
IN
CENUMES313
1st Semester 2024-2025
Page 1 of 30
METHOD: INTERNAL HALVING
INTRODUCTION:
Methods start with two values of x which bracket the root in the interval [a,b]. If f(a) and f(b) have opposite signs,
and if the function is continuous, then at least one root must be in the interval.
Bracketing methods are robust (they are guaranteed to obtain a solution since the root is trapped in the closed
interval)
The bisection method can be used to solve the equation f(x)=0 for a real variable x, given that f is a continuous
function defined on the interval [a,b]and f(a)and f(b)have opposite signs.
The process involves dividing the interval into two equal parts by calculating the midpoint, denoted as
( a+b )
c= , and evaluating the function f(c)at that position. If c is not the root, there exist two potential outcomes.
2
f(a) and f(c)exhibit different signs and enclose a root within their range.
f(c) and f(b) display different signs and enclose a root within their range.
A sub-interval is selected as the new interval for the subsequent step, and this repetition continues until the
interval reaches a suitable level of smallness.
If the signs of f(a) and f(c) differ, then c replaces b. When the signs of f(b) and f(c) differ, c replaces a. If f(c)
equals zero, c is considered the solution, and the process concludes.
Step 1: Find two points, a and b, where a is smaller than b, and the product of f(a)and f(b) is negative.
Step 3: If f(c) equals 00, then t is the root of the function. If not, proceed to the next step.
If the product of f(c) and f(a)is negative, there exists a root between c and a.
If the product of f(c) and f(b) is negative, there exists a root between c and b.
Step 5: Repeat the above three steps until f(c) equals 00.
Page 2 of 30
EXAMPLE PROBLEM #1:
Solve for the root/s of the equation x 5−2 x 4 +3 x 3−x 2+ 4 x−6=0 using Internal Halving (Bisection) process. Set the left
end of the bracket a = 1 and the right end bracket as b = 4. Use tolerance value for |f(c)| < = 0.00001.
Solution:
Initially, if the interval for locating the root is not provided, you establish your own interval by allocating a value of a and b.
5 4 3 2
Next, setup the function as f ( x )=x −2 x +3 x −x +4 x−6
It is preferable to solve it in tabular form for this method. This is simple to program in a spreadsheet. Thus, begin by
completing the table's first row, which stands for the initial iteration. You begin by writing the given a and b values.
Then, apply the “halving” process by finding the value of c using the formula c = (a + b)/2.
Lastly, for the first iteration, get the product of f(a) and f(c).
Verify the tolerance level before moving on to the next iteration. If |f(c)| already falls below the level of tolerance 0. 00001,
the iteration must be stopped. In the current iteration, f(c) = 1 > 0. 000001, thus the iterative procedure needs to continue.
You have to determine a new value for a and b for the second iteration. This will depend on how much the ratio of f(a) to
f(c). The value of a is the same as in the previous iteration if the product is negative. While the value of c is substituted
with b. The value of b is equal to the previous value if the product is positive while a is replaced the value of c.
For this particular example, the product f(a)f(c) is −64.15625 which is negative, of course. So, the value of a retains while
b is replaced by the value of c.
Next, implement the “halving” technique by determining the value of c with the equation c = (a + b)/2.
Page 3 of 30
Iteration a c b f(a) f(c) f(a) f(c)f(a)
1 1 2.5 4 -1 64.15625 -64.15625
2 1 1.75 2.5
Then, you can complete the following three columns labeled f(a), f(b), and f(c). Utilize the function f(x). Enter the values of
a, b, and c above.
Lastly, for the first iteration, get the product of f(a) and f(c).
Before moving on to the next iteration, first verify the tolerance level. If |f(c)| is already lower than the tolerance level 0.
00001, you should halt the iteration. For this particular iteration, |f(c)| equals |64.15625| = 64.15625, which is greater than
0. 000001, so we must continue the iterative process. The product f(a)f(c) equals -64.15625, which is indeed positive.
Therefore, the value of b remains unchanged while a is substituted with the value of c.
Page 4 of 30
18 1.11421 1.11422 1.11423 -0.00005 0.00005 0.00016 -0.00000000
19 1.11421 1.11421 1.11422 -0.00005 -0.000003 0.00005 0.000000000
After completing the 19th iteration, the value of |f(c)| = |−0. 00000 ... | = 0. 00000 ... is less than 0. 000001. Therefore, it is
appropriate to halt the iteration. The root of the function is represented by the most recent value of c, which is x =
1.11421.
Page 5 of 30
Solve for the root/s of the equation x 5−5 x 4 + 4 x3 +2 x 2+ x=0 using Internal Halving (Bisection) process. Set the left end
of the bracket a = 0 and the right end bracket as b = 3. Use tolerance value for |f(c)| < = 0.00001.
Solution:
Initially, if the interval for locating the root is not provided, you establish your own interval by allocating a value of a and b.
5 4 3 2
Next, setup the function as f ( x )=x −5 x + 4 x +2 x + x=0
It is preferable to solve it in tabular form for this method. This is simple to program in a spreadsheet. Thus, begin by
completing the table's first row, which stands for the initial iteration. You begin by writing the given a and b values.
Then, apply the “halving” process by finding the value of c using the formula c = (a + b)/2.
Lastly, for the first iteration, get the product of f(a) and f(c).
Verify the tolerance level before moving on to the next iteration. If |f(c)| already falls below the level of tolerance 0. 00001,
the iteration must be stopped. In the current iteration, f(c) = 1 > 0. 000001, thus the iterative procedure needs to continue.
You have to determine a new value for a and b for the second iteration. This will depend on how much the ratio of f(a) to
f(c). The value of a is the same as in the previous iteration if the product is negative. While the value of c is substituted
with b. The value of b is equal to the previous value if the product is positive while a is replaced the value of c.
For this particular example, the product f(a)f(c) is 0. So, the value of b retains while a is replaced by the value of c.
Next, implement the “halving” technique by determining the value of c with the equation c = (a + b)/2.
Page 6 of 30
Iteration a c b f(a) f(c) f(b) f(c)f(a)
1 0 1.5 3 0 1.78125 -33 0
2 1.5 2.25 3 1.78125 -12.54199 -33
Lastly, for the first iteration, get the product of f(a) and f(c).
Before moving on to the next iteration, first verify the tolerance level. If |f(c)| is already lower than the tolerance level 0.
00001, you should halt the iteration. For this particular iteration, |f(c)| equals |−33| = 33, which is greater than 0. 000001,
so we must continue the iterative process. The product f(a)f(c) equals 0, which is indeed positive. Therefore, the value of
b remains unchanged while a is substituted with the value of c.
After completing the 19th iteration, the value of |f(c)| = |−0. 00000 ... | = 0. 00000 ... is less than 0. 000001. Therefore, it is
appropriate to halt the iteration. The root of the function is represented by the most recent value of c, which is x =
1.66823.
INTRODUCTION:
Page 7 of 30
The interval-halving method, also known as the bisection method, works by finding a root within the interval (a, b)
and approximating it as the midpoint of the interval. On the other hand, the false position method, also known as regula
falsi, assumes that the nonlinear function f(x) can be approximated by a linear function g(x) within the interval (a, b). The
root of the linear function g(x), denoted as x = c, is then used as the next approximation for the root of the nonlinear
function f(x), denoted as x = α.
The method known as linear interpolation is also referred to as the false position method, derived from its Latin
name "regula falsi." In this method, the root of the linear function g(x), denoted as x = c, is not the root of the nonlinear
function f(x). This distinction leads to the false position designation. We end up with two intervals, namely (a, c) and (c, b).
Similar to the interval-halving (bisection) method, we retain the interval that contains the root of the nonlinear function f(x),
ensuring that the root remains bracketed. The equation for the linear function g(x) is as follows:
f ( c )−f ( b )
=g' ( x )
c−b
f ( b )−f ( a )
g' ( x ) =
b−a
f ( b)
c=b− '
g (x)
Note that f(a) and a could have been used in the above equation instead of f(b) and b. The equation for c above is
applied repetitively until either one or both of the following two convergence criteria are satisfied: |b − a| < ε1 and/or |f(c)| ≤
ε2.
Solution:
Step 1:
5 4 3 2
The equation should be written in the form f ( x )=x −5 x + 3 x −2 x + 4 x−1
Step 2:
Evaluate the value of f(b) since b and f(b) will be fixed all throughout the simulation.
5
b=2 f ( 2 )=(2) −5 ¿
Step 3:
Construct a table that includes the specified column headers and enter the value of the left endpoint, a.
Step 4:
Evaluate f(a).
Step 5:
f ( b )−f ( a ) −23−1
g' ( x ) = = =−12
b−a 2−0
Step 6:
Given that b and f(b) remain constant during the simulation, the formula to find c can be revised
f ( b) −23
c=b− =2−
'
g (x) −12
Step 7:
Page 9 of 30
Interval a f(a) g'(x) c f(c)
1 0 1 -12 0.08333 1.32094
Step 8:
Determine whether the value of f(c) is below the tolerance threshold. Given that it still exceeds the tolerance level, after
which the repetition must continue.
The values of c and f(c), respectively, are the new values of a and f(a) for the second iteration from the earlier version.
Step 9:
Evaluate the value of the new g’(x). And solve for the new c and f(c).
Given that f(c) is below the tolerance threshold, the function's root is x = 1.21817. According to the analytical approach,
this is roughly equivalent to the true solution x = 1.
Solution:
Step 1:
The equation should be written in the form f ( x )=x 5−4 x 4 +3 x 2−2 x 2−x+ 2
Step 2:
Evaluate the value of f(b) since b and f(b) will be fixed all throughout the simulation.
5
b=2 f ( 2 )=(2) −4 ¿
Step 3:
Construct a table that includes the specified column headers and enter the value of the left endpoint, a.
Step 4:
Evaluate f(a).
Step 5:
f ( b )−f ( a ) −16−(−1)
g' ( x ) = = =−15
b−a 2−1
Step 6:
Given that b and f(b) remain constant during the simulation, the formula to find c can be revised
f ( b) −16
c=b− =2−
'
g (x) −15
Step 7:
Page 11 of 30
Interval a f(a) g'(x) c f(c)
1 1 -1 -15 0.93333 -0.56354
Step 8:
Determine whether the value of f(c) is below the tolerance threshold. Given that it still exceeds the tolerance level, after
which the repetition must continue.
The values of c and f(c), respectively, are the new values of a and f(a) for the second iteration from the earlier version.
Step 9:
Evaluate the value of the new g’(x). And solve for the new c and f(c).
By the twenty-sixth iteration, the value of f(c) is already less than the required tolerance level, so the iteration can now be
stopped. The value of x = 0.83064
Fixed-point iteration method is an open-root numerical method used to identify the fixed point of a given
equation in which the values of x n in sequence converges to the root of the equation. In identifying the fixed point, we first
need to express our equation, f(x) = 0 as x = g(x). The fixed point will always be at the same input that makes f(x) = 0.
The fixed-point iteration method computes the solution to the given equation by repeatedly applying the comcept
of a fixed point. A fixed-point is a point in the domain of effect of a function g,
where g(x) = x. The fixed-point iteration method algebraically converts the provided function to the form g(x) = x
Suppose we have an equation f(x) = 0, for which we have to find the solution. The equation can be expressed as
x = g(x). After rearranging, we need to choose g(x) such that the maximum interval for |g’(x)| < 1 at our initial guess x 0,
ensuring that the sequence will converge. There may be multiple possibilities for g(x) from the given equation, and in such
cases, select the one with the minimum value of g’(x).
Once we identified if a certain equation is able to be solved using fixed-point method, then the iterative method is
applied by successive approximations given by the formula:
x n=g(x n−1 )
that is, x₁ = g(x₀), x₂ = g(x₁) and so on.
After performing the iterations to get a good value of g(x) to which the convergence criteria are satisfied, it must
be checked by the stopping condition:
The point where the approximate value converges after successive iterations is to be considered as the root of the
given equation.
Page 13 of 30
EXAMPLE PROBLEM #1.
Solve for the root/s of the equation x 5 −3 x 4 +2x3 −4 x 2 +6 x−2=0, using the Fixed-Point Iteration Method, starting with
the point x=0 . Use a tolerance value for | x i+1−x i | ≤ ε1 = 0.00001.
Solution:
Step 1:
Manipulate the functions such that a variable x is on the left side while the rest are on the other side of the equation.
1 5 1 4 −1 3 2 2 1
6 x = x 5 + 3 x 4 −2 x 3 + 4 x 2 + 2 → x = −¿ x + x x + x +
6 2 3 3 3
This equation could be written as;
1 5 1 4 −1 3 2 2 1
x i+1 = −¿ x i + xi xi + xi +
6 2 3 3 3
Step 2:
To simplify the calculations, create the table below to present the steps.
Iteration xi
1 0
1 5 1 4 −1 3 2 2 1
f(0) = −¿ (0) + (0) (0) + (0) + = 0.33333
6 2 3 3 3
After, you must always check the tolerance after every iteration.
To check for the tolerance, the difference between two consecutive iterations.
The difference ∣ 0.33333 −¿ 0.00001 ∣ = 0.33333 is clearly larger than the tolerance of 0.00001, so the iteration is not yet
complete. We need to keep applying the fixed-point iteration method until the difference is sufficiently small.
The value of x for the second iteration is the value of x i in the previous iteration.
Iteration xi
1 0.00000
2 0.33333
1 1 −1 2 1
f(0.33333) = −¿ (0.33333)5 + (0.33333)4 (0.33333)3 + (0.33333)2 +
6 2 3 3 3
f(0.33333) = 0.40055
Page 14 of 30
Checking the tolerance.
Iteration xi
1 0.00000
2 0.33333
3 0.40055
4 0.43002
5 0.44475
6 0.45254
7 0.45678
8 0.45911
9 0.46041
10 0.46114
11 0.46155
12 0.46178
13 0.46190
14 0.46198
15 0.46202
16 0.46204
17 0.46205
18 0.462059
19 0.462063
20 0.462065
21 0.4620671
22 0.4620678
23 0.46206826
24 0.46206849
25 0.4620861
26 0.46206868
27 0.46206872
28 0.46206875
29 0.46206876
30 0.462068771
31 0.46206878
32 0.46206878
Page 15 of 30
EXAMPLE PROBLEM #2.
Solve for the root/s of the equation x 5 + 4 x 4 −2x3 −6 x 2 + x−1=0, using the Fixed-Point Iteration Method, starting with
the point x=1. Use a tolerance value for | x i+1−x i | ≤ ε1 = 0.00001.
Solution:
Step 1:
Manipulate the functions such that a variable x is on the left side while the rest are on the other side of the equation.
2 6 1 1
x 5 ¿−4 x 4 +2x3 +6 x 2 −x +1 → x = −¿ 4 + + −¿ 3 + 4
x x2 x x
This equation could be written as;
2 6 1 1
x i+1 = −¿ 4 + x + 2 −¿ 3 + 4
i xi xi xi
Step 2:
To simplify the calculations, create the table below to present the steps.
Iteration xi
1 1
2 6 1 1
f (1) = −¿ 4+ + 2 −¿ 3 + 4 =4
(1)i (1)i (1)i (1)i
After, you must always check the tolerance after every iteration.
To check for the tolerance, the difference between two consecutive iterations.
The difference ∣ 4 −¿ 1 ∣ = 3 is clearly larger than the tolerance of 0.00001, so the iteration is not yet complete. We need
to keep applying the fixed-point iteration method until the difference is sufficiently small.
The value of x for the second iteration is the value of x i in the previous iteration.
Iteration xi
1 1
2 4
Calculate the next approximation as f(4):
Page 16 of 30
2 6 1 1
f(4) = −¿ 4+ + 2 −¿ 3 +
( 4)i ( 4)i 4
( 4)i ( 4)i
f(4) = -3.13671875
Iteration xi
1 1
2 4
3 -3.13671875
4 -3.985059131
5 -4.104290857
6 -4.11312242
7 -4.113727189
8 -4.113768366
9 -4.113771169
10 -4.113771359
11 -4.113771372
12 -4.113771373
Checking the tolerance.
Additional Notes:
In using fixed-point iteration method, the multiple possibilities of g(x) have various chances of working, hence
needed to be checked if they fit the convergence criteria.
If |g’(x)| < 1, then it is guaranteed that there is a unique fixed point for the given equation, and the method will
converge.
Page 17 of 30
METHOD: NEWTON-RAPHSON METHOD
INTRODUCTION
One iterative numerical approach for determining a nonlinear function's roots (or zeros) is the Newton-Raphson
Method. It is a productive technique for estimating answers to equations of the following kind:
f(x) = 0.
in which the function f(x) is continuous and distinguishable.
This approach is based on the linear approximation concept, which approximates the root of the function by using
the tangent line to a curve. In situations where obtaining a precise algebraic solution is challenging or impossible, it is a
potent and effective method of solving problems.
Newton-Raphson often converges fast and may be used for different problems with only a few iterations needed
to provide a very precise answer. However, if the derivative of the function, f'(x)=0, since the procedure includes division
by zero, it will not work. This may occur at locations when the function's tangent is horizontal.
First, manipulate the function, then get the derivative of the function. With the given left or right end bracket for xi, the
Newton-Raphson method updates this value iteratively using the formula below until it converges to the actual root.
f (x )i
X i +1=X i −
f '(x )i
where:
X i is the current approximation of the root,
f (x)i is the value of the function at X i ,
f ' (x)i is the derivative of the function at X i ,
X i +1 is the next approximation for the root.
To solve for the next values of X i , repeat the process using X i +1as the new X i , and solve the next iteration X i
using the same formula.
f (x )i
X i +1=X i −
f '(x )i
Then, continue doing the process until the difference between consecutive iterations gets exceedingly narrow, or
until the absolute difference between X i +1 and X i is less than a predetermined tolerance level, signifying the accuracy of
the root.
Page 18 of 30
EXAMPLE PROBLEM #1:
Find the root of the fifth-degree polynomial: f(x) = x⁵+2x⁴−x³−3x²+x−1= 0 using the Newton’s Method. Set the left end of
the bracket Let a = −2 and right end of the bracket b = 2. Use a tolerance ϵ <= 0.00001.
Solution:
Step 1:
Step 2:
We are given the interval a= − 2 and b = 2. Typically, we would start with a midpoint or an educated guess. Let's choose b
= 2, as the initial X i .
Knowing that,
f (x )i
X i +1=X i −
f '(x )i
To simplify the calculations, you can present the steps in a table format.
Iteratio
n Xi f (x)i f ' (x)i X i +1
1 2
Calculate f (2):
Page 19 of 30
f (2) = (2)⁵ + 2(2)⁴ -(2)³ -3(2)² + 2 - 1 = 45
Calculate f ′(2):
45
X i +1=¿ 2 - = 1.62810
121
Iteratio
n Xi f (x)i f ' (x)i X i +1
1 2 45 121 1.62810
Then, the value of x for the second iteration is the value of X i +1 in the previous iteration.
Iteratio
n Xi f (x)i f ' (x)i X i +1
1 2 45 121 1.62810
2 1.62810
Calculate f (1.62810):
f (1.62810) = 13.85229
Calculate f ′(1.62810):
f ′(1.62810) = 52.93543
13.85229
X i +1=¿ 1.62810 - = 1.36642
52.93543
1 2 45 121 1.62810
1.6281
2 0 13.85229 52.93543 1.36642
Page 20 of 30
The difference ∣ 1.36642 − 1.62810 ∣ = 0.26168 is clearly larger than the tolerance of 0.00001, so the iteration is not yet
complete. We need to keep applying the Newton-Raphson Method until the difference is sufficiently small.
1 2 45 121 1.62810
1.6281
2 0 13.85229 52.93543 1.36642
1.3664
3 2 3.94937 25.04024 1.20870
1.2087
4 0 0.90854 14.16350 1.14455
1.1445
5 5 0.11152 10.77795 1.13420
1.1342
6 0 0.00258 10.28228 1.13395
1.1339
7 5 0.00000 10.27045 1.13395
Find the root of the fifth-degree polynomial: f(x) = x⁵−3x⁴+2x³−x²+5x−8 = 0 using the Newton’s Method. Set the left end of
the bracket Let a = −2 and right end of the bracket b = 3. Use a tolerance ϵ <= 0.00001.
Solution:
Step 1:
f (x) = x⁵−3x⁴+2x³−x²+5x−8
f ′(x) = 5x⁴−12x³+6x²−2x+5
Step 2:
We are given the interval a= − 2 and b = 3. Typically, we would start with a midpoint or an educated guess. Let's choose b
= 3, as the initial X i .
Knowing that,
f (x )i
X i +1=X i −
f '(x )i
To simplify the calculations, you can present the steps in a table format.
Page 21 of 30
Iteration 1 (Starting with X i = 3):
Iteratio
n Xi f (x)i f ' (x)i X i +1
1 3
Calculate f (3):
f (3) = (3)⁵−3(3)⁴+2(3)³−(3)²+5(3)−8 = 52
Calculate f ′(2):
52
X i +1=¿ 3 - = 2.61194
134
Iteratio
n Xi f (x)i f ' (x)i X i +1
1 3 52 134 2.61194
Then, the value of x for the second iteration is the value of X i +1 in the previous iteration.
Iteratio
n Xi f (x)i f ' (x)i X i +1
1 3 52 134 2.61194
2 2.61194
Calculate f (2.61194):
f (2.61194) = (2.61194)⁵−3(2.61194)⁴+2(2.61194)³−(2.61194)²+5(2.61194)−8
f (2.61194) = 15.81459
Calculate f ′(2.61194):
f ′(2.61194) = 5(2.61194)⁴−12(2.61194)³+6(2.61194)²−2(2.61194)+5
f ′(2.61194) = 59.59261
15.81459
X i +1=¿ 2.61194 - = 2.34656
59.59261
Page 22 of 30
1 3 52 134 2.61194
2.6119
2 4 15.81459 59.59261 2.34656
The difference ∣2.34656 - 2.61194 ∣ = 0.26538 is clearly larger than the tolerance of 0.00001, so the iteration is not yet
complete. We need to keep applying the Newton-Raphson method until the difference is sufficiently small.
Page 23 of 30
METHOD: SECANT METHOD
INTRODUCTION
In Newton's method, a straight line that intersects the curve at a certain point, also referred to as the tangent line,
can be used to find the root of a function. It iteratively improves the guess for the root by taking the function's derivative. If
the derivative is difficult to compute or the function lacks a simple closed-form derivative, the Secant Method can be a
viable option.
A line connecting two points on the curve can be used to solve the function’s root in place of a tangent line. These
two points, x0 and x1, are the starting estimates required to begin the Secant Method and determine where the line
crosses the x-axis. This method is based on interpolation, which involves estimating the behavior of a function between
two points. The slope of the secant that passes through xi−1 and xi is determined by,
'
f ( x i )−f ( x i−1 )
g ( xi ) =
x i−x i−1
Page 24 of 30
'
f ( x i+1 )−f ( x i )
g ( xi ) =
x i+1−x i
f ( xi )
x i+1=x i− '
g ( xi )
Until one or both of the two convergence criteria listed below are met, this equation is applied repeatedly:
Solution:
First, create a table but this time, start with the 0th (zeroth) iteration.
Page 25 of 30
On this table, write the given value x 0=0 and x 1=1 in the x i column, respectively.
0 x0 = 0
1 x1= 1
5 4 3 2
f ( 0 )=( 0 ) −( 0 ) + 2 ( 0 ) + 4 ( 0 ) +2 ( 0 ) + 8=8
5 4 3 2
f ( 1 ) =( 1 ) −( 1 ) +2 ( 1 ) +4 ( 1 ) +2 ( 1 ) +8=16
0 0 8
1 1 16
'
f ( x i+1 )−f ( x i )
g ( xi ) =
x i+1−x i
' 16−8
g ( xi ) = =8
1−0
0 0 8
1 1 16 8
f ( xi )
x i+1=x i−
g' ( xi )
16
x i+1=1− =−1
8
0 0 8
1 1 16 8 -1
Page 26 of 30
And for the second iteration, use the previous value of x i+1 as new x i. Substitute it to f ( x i ) formula, then get the g ’ ( x i ) to
get new value for x i+1.
0 0 8
1 1 16 8 -1
2 -1 6 5 -2.2
0 0 8
1 1 16 8 -1
2 -1 6 5 -2.2
Page 27 of 30
EXAMPLE PROBLEM #2:
5 4 3 2
f ( x )=5 x −5 x −x −2 x +5 x+ 2, using the Secant Method.
Solve for the root/s of the polynomial function
Starting from the initial approximations x 0=0❑ and x 1=1. The iterations proceed until the tolerance value
|x i+1 −xi|≤ ε 1=0.0001.
Solution:
First, create a table but this time, start with the 0th (zeroth) iteration.
Page 28 of 30
1
On this table, write the given value x 0=0 and x 1=1 in the x i column, respectively.
0 x0 = 0
1 x1= 1
0 x0 = 0 2
1 x1= 1 4
'
Then, using the formula for g ( xi ) ,
'
f ( x i+1 )−f ( x i )
g ( xi ) =
x i+1−x i
' 4−2
g ( xi ) = =2
1−2
Iteration xi f(xi) g’(xi) xi+1
0 0 2
1 1 4 2
0 0 2
1 1 4 2 -1
And for the second iteration, use the previous value of x i+1 as new x i. Substitute it to f ( x i ) formula, then get the g ( xi ) to
'
Page 29 of 30
Iteration xi f(xi) g’(xi) xi+1
0 0 2
1 1 4 2 -1
2 -1 -14 9 0.55556
0 0 2
1 1 4 2 -1
2 -1 -14 9 0.55556
Page 30 of 30