Saturday, January 26, 2013

Basic Numerical Methods: Self Review

I actually found a good book for the Numerical Methods topic. It explains the concepts easily and this is what I summarized. The pictures were taken from the same book Introductory Numerical Analysis by Aquino-Ruivivar and Cureg.

Bisection Method. Basically what the Bisection method does, is to get its midpoint of the $x$'s such that the $f(x)$'s is approaching 0. It continues to iterate until the $f(x)=0$ or you tell it to stop using the valid stopping rules.


Here's what to remember.

1. Given the interval $[a,b]$, $f(a)f(b)<0$. That means there is a sign change in the $f(x)$'s.
2. The next point which is denoted by \[ x_1=\frac{a+b}{2} \]
3. We replace the value of $a$ or $b$ depending on the sign of $f(x_1)$.
4. Continue doing so, until $f(x)$ is close to zero, or then again used the stopping rules.

As excel reference, we can use this:


Regula Falsi. This method on the other hand, chooses the next point to be the one that passes through the x -axis. As shown on the picture below, it continues to iterate until the f(x) is closer to zero. Again it will stop because of the stopping rules.

Here's what to remember.

1. Given the interval $[a,b]$, $f(a)f(b)<0$. That means there is a sign change in the $f(x)$'s. $b
2. The next points which is denoted by \[ x_n=b_{n-1}-\frac{f(b_{n-1})(b_{n-1}-a_{n-1})}{f(b_{n-1}-f(a_{n-1}} \]
3. Continue doing so, until $f(x)$ is close to zero, or then again used the stopping rules.


As excel reference, we can use this:


Fixed Point Method. I got a little confused about this method. All I know is that we choose a $g(x)$ from the original $f(x)$ and then iterate until $g(x)=x$. For reference, the convergence and divergence of fixed point method is as follows:


Newton's Method. In the Newton's Method, it uses the slope of a point or the tangent line to get the next point to iterate. The $f(x)$ converges faster to zero than the other methods. However, there are some restrictions. 

Restrictions:
1. If the point we choice is not a tangent line, it will create an infinite loop.
2. If $f(x)=0$, then the next iterate will fly into infinity.

Here's a good representation of the Newton's method.



As excel reference, we can use the table below. We can get the next point by using this formula: \[x_n = x_{n-1}- \frac{f(x_{n-1})}{f'(x_{n-1})}\]


Secant Method. This method is like the Regula Falsi method. Only the sign change in the $f(x)$ doesn't matter. It is also like the Newton's Method, only that this method uses two points. For representation, look at the figure below. The $x_{-1}$ and $x_0$ will be your given points. It computes for the next point which is $x_1$ . Then we obtain the next point $x_2$ by connecting the points $x_0$ and $x_1$ to make a line. It goes on an on until $f(x)$ converges to 0.



Given $x_{-1}$ and $x_0$, to compute for the next points, the formula is as follows:
\[  x_n = x_{n-1} - f(x_{n-1}) \frac{x_{n-1}-x_{n-2}}{f(x_{n-1})-f(x_{n-1})}   \]


As excel reference, we can use the table below:




No comments:

Post a Comment