Student[NumericalAnalysis][IterativeFormula] - compute an iterative formula to approximate the solution to a linear system numerically
|
Calling Sequence
|
|
IterativeFormula(A, b, opts)
IterativeFormula(A, opts)
|
|
Parameters
|
|
A
|
-
|
Matrix; a square (-by-) matrix or an augmented -by- matrix of the form (A|b)
|
b
|
-
|
(optional) Vector; a vector of length
|
opts
|
-
|
(optional) equation(s) of the form keyword=value where keyword is one of digits, initialapprox, iterations, method, output, showsteps; the options for computing the iterative formula
|
|
|
|
|
Description
|
|
•
|
Given a system , the IterativeFormula command computes an equivalent fixed-point system of the form .
|
•
|
The IterativeFormula command can compute the iteration matrix and vector for the following methods: the Gauss-Seidel iterative, Jacobi iterative, and successive over-relaxation methods.
|
•
|
An initial vector is specified using the initialapprox option and then a sequence of approximate solution vectors is generated using the iterative formula .
|
•
|
Note that this iterative formula need not produce a converging sequence of vectors . It can be shown that such an iterative scheme converges if and only if the spectral radius of the matrix is strictly less than 1. This spectral radius can be returned as an output via the output option. See below for more details.
|
|
|
Options
|
|
|
Set the environment variable Digits to this value. By default, digits is set to the current value of Digits.
|
|
The maximum number of iterations to calculate. By default, this is set to .
|
•
|
method = gaussseidel, jacobi, SOR(numeric)
|
–
|
Gauss-Seidel method : ,
|
–
|
Jacobi method : ,
|
–
|
Successive Overrelaxation method : ,
|
•
|
output = one of L, U, D, T, c, spectralradius, iterates, or a list containing one of more of those
|
|
The return value of the command. For more than one output, specify a list of outputs in the order desired. By default, output = [L, U,D, T, c].
|
|
The outputs L, U, D, T, and c are as described in the above sections.
|
|
If the iterates option is specified, the list of approximate solution vectors is output. The total number of vectors returned is determined by the iterations option.
|
|
If the spectralradius option is specified, the spectral radius of the iteration matrix is output.
|
|
Whether to print helpful messages in the interface as the IterativeFormula command executes. By default, this option is set to false.
|
|
|
Notes
|
|
•
|
This procedure operates symbolically; that is, the inputs are not automatically evaluated to floating-point quantities, and computations proceed symbolically and exactly whenever possible. To obtain floating-point results, it is necessary to supply floating-point inputs.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
|
|