Assignment 2 VBA Function
Assignment 2 VBA Function
REPORT ON
FUNCTIONING
It was formally described in the 19th century with the development of rigorous
numerical analysis. Due to its simplicity and guaranteed convergence, it remains a
fundamental technique in numerical computing.
Mathematical Foundation
The bisection method relies on the following key principles:
i) If f is continuous on [a,b] and f(a) f(b)<0, then ∃c∈(a,b) such that f(c)=0.
ii) This theorem ensures that a root exists within the interval, provided the function
crosses zero.
iii) This process repeats until the interval width |b−a| is smaller than a predefined
tolerance ϵ.
Convergence Analysis
The bisection method guarantees linear convergence, meaning the error decreases by
approximately half in each iteration.
ì) Error Bound:
|bn-an| = |bo-ao|/2^n
|cn-c| ≤ |b-a|/2^n+1
where cn is the approximate root at the n-th iteration and c is the true root.
|b−a|<ϵ or |f(c)|<δ
2. No Need for Derivatives: The method does not require the computation of f'(x),
making it applicable to
non-differentiable functions.
Limitations
1. Slow Convergence: Since the error decreases linearly, it requires more iterations
compared to quadratically convergent methods like Newton-Raphson.
2. Requires Sign Change: The function must cross zero within the initial interval;
otherwise, the method fails.
3. Only Finds One Root: If multiple roots exist in [a,b], the bisection method will
find only one.
Applications
The bisection method is widely used in:
Conclusion
The bisection method is a robust and reliable technique for root-finding, particularly
useful when dealing with
continuous functions where the root is known to lie within a specific interval.
Although it converges slowly
numerical analysis.
For functions that are differentiable and well-behaved, faster methods like Newton-
Raphson may be preferred.
However, when stability and certainty of convergence are required, the bisection
method remains an excellent
choice.
Algorithm (Step-by-Step)
1. Define the function f(x) and interval [a,b];
2. i=1;
3. pi=1/2(ai+bi);
6. ai+1=pi, bi+1=bi;
7. i=i+1; go to 3;
8. ai+1=ai; bi+1=pi;
9. i=i+1; go to 3;