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)=x^2-10x+9$, we can solve for the zeroes by factoring. Hence,
\[ \begin{split} x^2-10x+9 &= 0 \\
(x-1)(x-9) &= 0 \\
x & =1,9 \end{split} \]
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 $x_1$ and $x_2$. Solve for $f(x_1)$ and f(x_2)$.
2. If one of $f(x) is 0, we stop. If not, solve for its midpoint $md = \frac{x_1+x_2}{2}$ and its $f(md)$.
3. If $f(md)=0$, we stop. If not, replace one of the two points $x_1$ and $x_2$ 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)=x^2-10x+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. $|x_n-x_n-1|<absolute error$
4. limit number or iterations
5. percentage change of midpoints(or the relative absolute error) is small enough.
Labels:
Basic Numerical Methods,
Class Notes,
Optimization
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment