Numerical Analysis
Numerical Analysis
- **Algorithm**:
1. Choose initial points \(a\) and \(b\) such that \(f(a) \cdot f(b) <
0\).
2. Compute the midpoint \(c = \frac{a + b}{2}\).
3. If \(f(c) = 0\) (or \(|f(c)|\) is sufficiently small), \(c\) is the root.
4. Otherwise, replace \(a\) or \(b\) with \(c\) depending on the
sign of \(f(c)\).
5. Repeat until convergence.
- **Algorithm**:
1. Choose initial points \(a\) and \(b\) such that \(f(a) \cdot f(b) <
0\).
2. Compute the new point \(c\) using the formula \(c = a - f(a) \
cdot \frac{b - a}{f(b) - f(a)}\).
3. If \(f(c) = 0\) (or \(|f(c)|\) is sufficiently small), \(c\) is the root.
4. Otherwise, replace \(a\) or \(b\) with \(c\) depending on the
sign of \(f(c)\).
5. Repeat until convergence.
- **Algorithm**:
1. Choose an initial guess \(x_0\).
2. Compute the next approximation using the formula \(x_{n+1}
= x_n - \frac{f(x_n)}{f'(x_n)}\).
3. Repeat until the difference between successive approximations
is smaller than a predefined tolerance level.