# What really means when the teacher asks me to iterate on Gauss-Seidel considering a maximum variation of 0.01?

My teacher has a problem that asks me to iterate on Gauss-Seidel equations considering a maximum variation of 0.01. This means making the first iteration and get check if the max of each error is less that 1%?

err(x1) = (actual-guess)/actual = 100%
err(x2) = 100%
err = max(err(x1), err(x2))


Need another iteration because the err > than requested. Is this what it really means?

thanks

-

Don't think so. In real life, you never know what the true answer to your problem is (call it $x^*$ for convenience). In practice, you use deviation from the previous iterate as a stopping criterion. So instead of computing error as $|x_n - x^*|$, use $|x_n - x_{n-1}|$.

-
isn't the guess=x_n-1; and actual=x_n in my example? The difference is that in yours you don't divide by the actual=x_n – Totty.js Feb 21 '13 at 9:02
@Totty depending on the problem, you may want to use absolute error calculation (as in my answer) or relative error calculation (as you are suggesting, $|1 - x_n/x_{n-1}|$). Both are measures of how far the last step moved away from the previous one. The idea is, when convergence happens, iteration step size decreases... – gt6989b Feb 21 '13 at 15:27
but how do you find the real value? with another method? – Totty.js Feb 21 '13 at 20:11
@Totty You don't :). You never know what the real value is, otherwise why would you be engaged in a numerical procedure in the first place? – gt6989b Feb 21 '13 at 20:51
then how do you have the absolute error? From what I know absolute error is referred to the real value.. – Totty.js Feb 22 '13 at 17:32