Loading [MathJax]/jax/output/HTML-CSS/jax.js

Friday, January 25, 2013

Bisection Method


Root Finding

This the reliance of finding the roots/zeroes.

Optimization

Given a polynomial f(x), these are the following steps to determine the minimum or maximum points.

1. Solve for the first derivative of  f(x).
2. Equate f(x)=0 and solve for the critical points.
3. Solve for the second derivative of f(x).
4. If f(x)=0, then there is an inflection.
    If f(x)>0, then the critical point is a minimum. (concave up)
    If f(x)<0, then the critical point is a maximum. (concave down)

Finding for the zeroes

Given f(x)=x210x+9, we can solve for the zeroes by factoring. Hence,
 x210x+9=0(x1)(x9)=0x=1,9
There are other ways to find the zero using the quadratic formula, completing the square, graphing, etc. But in real life, nobody knows what the values of x. And if we are given polynomials that are non linear or difficult to find the zeroes, we can use the numerical methods such as the bisection methods. Bisection Method

Assumptions:
1. Function is continuous.
2. There is a certain point of time that it passes through the horizontal line.

Method:
1. Choose two points x1 and x2. Solve for f(x1) and f(x_2).2.Ifoneoff(x) is 0, we stop. If not, solve for its midpoint md=x1+x22 and its f(md).
3. If f(md)=0, we stop. If not, replace one of the two points x1 and x2 with md of the same sign.
4. Continue steps 2 and 3 and stop only when f(x)=0.

Example:  Can be seen on numericalmethods.xlsx

Given f(x)=x210x+9, use the bisection method to get one of the points.


Core issues:

If you have bad starting point, when will you stop?
1. if answer keeps on repeating (logic of the rule), or no change in iterate
2. trivial answer: f(x)=0

Valid stopping rules:
3. |xnxn1|<absoluteerror
4. limit number or iterations
5. percentage change of midpoints(or the relative absolute error) is small enough.

No comments:

Post a Comment