compute an iterative formula to approximate the solution to a linear system numerically - Maple Help

Home : Support : Online Help : Education : Student Package : Numerical Analysis : Computation : Student/NumericalAnalysis/IterativeFormula

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 ($n$-by-$n$) matrix or an augmented $n$-by-$n+1$ matrix of the form (A|b) b - (optional) Vector; a vector of length $n$ 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 $A\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}x=b$, the IterativeFormula command computes an equivalent fixed-point system of the form $x=T\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}x+c$.
 • The IterativeFormula command can compute the iteration matrix $T$ and vector $c$ 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 ${x}_{k+1}=T\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{x}_{k}+c$.
 • Note that this iterative formula need not produce a converging sequence of vectors ${x}_{k}$. It can be shown that such an iterative scheme converges if and only if the spectral radius of the matrix $T$ is strictly less than 1. This spectral radius can be returned as an output via the output option. See below for more details.

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

 > $\mathrm{with}\left(\mathrm{Student}[\mathrm{NumericalAnalysis}]\right):$
 > $A:=\mathrm{Matrix}\left(\left[\left[1.0,-0.1,2.,0.\right],\left[-0.1,1.1,-0.1,3.\right],\left[0.2,-0.1,1.0,-0.1\right],\left[0.,0.3,-0.1,0.8\right]\right]\right)$
 ${A}{:=}\left[\begin{array}{cccc}{1.0}& {-}{0.1}& {2.}& {0.}\\ {-}{0.1}& {1.1}& {-}{0.1}& {3.}\\ {0.2}& {-}{0.1}& {1.0}& {-}{0.1}\\ {0.}& {0.3}& {-}{0.1}& {0.8}\end{array}\right]$ (1)
 > $b:=\mathrm{Vector}\left(\left[0.6,2.5,-1.1,1.5\right]\right)$
 ${b}{:=}\left[\begin{array}{c}{0.6}\\ {2.5}\\ {-}{1.1}\\ {1.5}\end{array}\right]$ (2)
 > $\mathrm{IterativeFormula}\left(A,b,\mathrm{method}=\mathrm{jacobi},\mathrm{digits}=3,\mathrm{output}=\left['T','c'\right]\right)$
 $\left[\begin{array}{cccc}{0.}& {0.100}& {-}{2.00}& {0.}\\ {0.0909}& {0.}& {0.0909}& {-}{2.73}\\ {-}{0.200}& {0.100}& {0.}& {0.100}\\ {0.}& {-}{0.375}& {0.125}& {0.}\end{array}\right]{,}\left[\begin{array}{c}{0.600}\\ {2.27}\\ {-}{1.10}\\ {1.88}\end{array}\right]$ (3)
 > $\mathrm{IterativeFormula}\left(A,b,\mathrm{method}=\mathrm{SOR}\left(1.25\right),\mathrm{iterations}=5,\mathrm{initialapprox}=\mathrm{Vector}\left(\left[0.,0.,0.,0.\right]\right),\mathrm{digits}=4,\mathrm{output}=\left['\mathrm{iterates}'\right]\right)$
 $\left[\left[\begin{array}{c}{0.}\\ {0.}\\ {0.}\\ {0.}\end{array}\right]{,}\left[\begin{array}{c}{0.7500}\\ {2.926}\\ {-}{1.197}\\ {0.7850}\end{array}\right]{,}\left[\begin{array}{c}{3.920}\\ {-}{0.257}\\ {-}{1.990}\\ {1.958}\end{array}\right]{,}\left[\begin{array}{c}{4.713}\\ {-}{3.461}\\ {-}{2.244}\\ {3.127}\end{array}\right]{,}\left[\begin{array}{c}{4.749}\\ {-}{6.669}\\ {-}{2.444}\\ {4.309}\end{array}\right]{,}\left[\begin{array}{c}{4.839}\\ {-}{9.914}\\ {-}{2.673}\\ {5.498}\end{array}\right]\right]$ (4)