Student[NumericalAnalysis] - Maple Programming Help

Home : Support : Online Help : Education : Student Packages : Numerical Analysis : Computation : Student/NumericalAnalysis/ForwardSubstitution

Student[NumericalAnalysis]

 ForwardSubstitution
 solve A.x = b where A is a lower-triangular matrix

 Calling Sequence ForwardSubstitution(A, b) ForwardSubstitution(A)

Parameters

 A - Matrix; a lower-triangular $\mathrm{nxn}$ matrix or an augmented (A|b) $\mathrm{nxm}$ matrix (A|b) where $m=n+1$ b - (optional) Vector; a vector of length $n$

Description

 • The ForwardSubstitution command returns a solution to the equation A.x=b, where A is a lower-triangular matrix, using the forward substitution algorithm.

Examples

 > $\mathrm{with}\left({\mathrm{Student}}_{\mathrm{NumericalAnalysis}}\right):$
 > $A≔\mathrm{Matrix}\left(\left[\left[1.1,4.9,7.7\right],\left[4.4,7.5,8.1\right],\left[2.7,8,10\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{ccc}{1.1}& {4.9}& {7.7}\\ {4.4}& {7.5}& {8.1}\\ {2.7}& {8}& {10}\end{array}\right]$ (1)
 > $b≔\mathrm{Vector}\left(\left[3.4,5.4,3.3\right]\right)$
 ${b}{≔}\left[\begin{array}{c}{3.4}\\ {5.4}\\ {3.3}\end{array}\right]$ (2)
 > $\mathrm{Lower},\mathrm{Upper}≔\mathrm{MatrixDecomposition}\left(A,\mathrm{method}=\mathrm{LU},\mathrm{output}=\left['L','U'\right]\right)$
 ${\mathrm{Lower}}{,}{\mathrm{Upper}}{≔}\left[\begin{array}{ccc}{1}& {0}& {0}\\ {4.000000000}& {1}& {0}\\ {2.454545455}& {0.3328324570}& {1}\end{array}\right]{,}\left[\begin{array}{ccc}{1.1}& {4.9}& {7.7}\\ {0}& {-12.10000000}& {-22.70000000}\\ {0}& {0}& {-1.344703226}\end{array}\right]$ (3)
 > $c≔\mathrm{ForwardSubstitution}\left(\mathrm{Lower},b\right)$
 ${c}{≔}\left[\begin{array}{c}{3.4}\\ {-8.20000000}\\ {-2.316228400}\end{array}\right]$ (4)
 > $\mathrm{BackSubstitution}\left(\mathrm{Upper},c\right)=\mathrm{LinearSolve}\left(A,b,\mathrm{method}=\mathrm{LU}\right)$
 $\left[\begin{array}{c}{2.409319491}\\ {-2.553749034}\\ {1.722482965}\end{array}\right]{=}\left[\begin{array}{c}{2.409319491}\\ {-2.553749034}\\ {1.722482965}\end{array}\right]$ (5)