You are on page 1of 8

I.

INTRODUCTION

The Fixed Point Iteration method is a solution-finding process used predominantly in


computational mathematics. It provides a systematic approach to approximate the value of a
root or 'fixed point' of a function as closely as possible. This method is particularly useful when
an exact solution is difficult to obtain analytically or when dealing with complex functions.

The process begins by making an initial guess of the root of the function. (2) The
computed value is then inputted back into the function. (3) The result of this operation forms the
next approximation. (4) The operation repeats with this new approximation. (5) The iterative
process continues until the difference between two successive approximations becomes
negligible, or a pre-set number of iterations have been performed.

The simplicity of the Fixed Point Iteration method is one of its main attractions. It doesn't
require complex calculations or manipulations, making it straightforward to implement and
understand. This makes it a popular choice for beginners in numerical analysis. The method
involves repeatedly applying a function to an initial guess until a fixed point is reached. This
fixed point corresponds to the root of the original equation, providing an efficient way to
approximate solutions.

II. PROBLEM STATEMENT

Using the Fixed point method, find the roots of the equation f(x) = 2x4+5x3+2x2+7x+10
when the approximate error of 0.001.

III. METHODOLOGY

This uses Microsoft Excel script to find the roots of f(x) = 2x4+5x3+2x2+7x+10 with the
approximate error of 0.001. The algorithm below shows the procedure in locating the
root of a function using fixed-point iteration method.

1. Start.

2. Define the equation f(x).


3. Enter any values for initial guess.

4. Rearrange the value of the function so that x is on the left side of the equation:
g(x) = x

5. Plug in the initial guess of the root to the equation

6. Enter the tolerance, value i.e 0.01

7. Use the initial guess to compute the new estimate Xn

8. Find the approximate error for the equation using the error estimator:
Xn = | (Xn – Xprev) / Xn |*100%

9. Repeat steps for nth times until the required tolerance is achieved.

10. Write the root of the given equation, the number of the iteration and the approximate
error.

11. End

IV. Programming using Microsoft Excel VBA Script

The following code is used to find the roots of the equation f(x) =
2x4+5x3+2x2+7x+10. The code will ask the user to set two guesses and it will iterate the
value using the Regula Falsi method to find the roots. The code can be modified allowing
the user to change the tolerance value requirements. This code utilizes the Microsoft
Excel VBA programming language and it runs using the Macros feature in Microsoft.
Sub FixedPointIteration()

Dim x As Double

Dim xn As Double

Dim prevXn As Double ' Variable to store the previous iteration's value

Dim tolerance As Double, ea As Double

Dim maxIterations As Integer

Dim i As Integer

' Initial guess for the root

x = InputBox("Choose an initial guess")

' Initial tolerance input

tolerance = InputBox("Enter tolerance value:")

' Set the maximum number of iterations and tolerance for convergence

maxIterations = 1000

ea = 100

' Initialize prevXn with an initial value

prevXn = x

' Clear previous contents

Cells.ClearContents

' Set headers

Cells(1, 1).Value = "Iteration"

Cells(1, 2).Value = "xn"

Cells(1, 3).Value = "ea(%)" ' Display a new column for ea(%)

' Perform fixed-point iteration

For i = 1 To maxIterations

xn = (-5 * x ^ 3 - 2 * x ^ 2 - 10) / (2 * x ^ 3 + 7)

' Calculate for the ea

ea = Abs(xn - prevXn) / xn * 100

' Display values in the current iteration

Cells(i + 1, 1).Value = i

Cells(i + 1, 2).Value = xn
Cells(i + 1, 3).Value = ea

' Check for convergence

If Abs(ea) < tolerance Then

Cells(1, 5).Value = "-5 * x ^ 3 - 2 * x ^ 2 + 10 / (2 * x ^ 3 + 7)"

Cells(3, 5).Value = "Approximate roots:"

Cells(4, 5).Value = xn

Cells(5, 5).Value = "No. of Iteration"

Cells(6, 5).Value = i

Exit For

End If

' Update prevXn for the next iteration

prevXn = xn

x = xn

Next i

' If the loop completes without convergence, show a message

If i > maxIterations Then

MsgBox "Fixed-point iteration did not converge within the specified iterations."

End If

End Sub

V. GRAPH OF THE FUNTION


V. ALGORITHM FLOW CHART
VI. RESULTS

Using the Macros in MS Excel, the feature will run the program. The program will
ask for the value of the lower bound, upper bound, and tolerance. It will automatically
calculate and iterate the procedure until it reaches the tolerance value and stops. If the
maximum number of iterations is reached without finding the root, it displays an error in
the message box. This program is a practical tool for solving mathematical problems
using Excel.

 Using g(x) = (-5 * x ^ 3 - 2 * x ^ 2 - 10) / (2 * x ^ 3 + 7)


 Using g(x) = (-2 * x ^ 4 - 5 * x ^ 3 - 2 * x ^ 2 - 10) / 7

Therefore, the root of the function f(x) = 2x4+5x3+2x2+7x+10 with a tolerance


value of 0.001 is -2.31862 and -1.19872.

References:
https://www.collimator.ai/reference-guides/what-is-the-fixed-point-iteration-method
https://byjus.com/maths/fixed-point-iteration/

You might also like