numerically approximate the solution to a linear system - Maple Help

Online Help

All Products    Maple    MapleSim


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

Student[NumericalAnalysis][LinearSolve] - numerically approximate the solution to a linear system

Calling Sequence

LinearSolve(A, b, opts)

LinearSolve(A, opts)

Parameters

A

-

Matrix; a square nxn matrix or an augmented (A|b) nxm matrix where m=n+1

b

-

(optional) Vector or Matrix; a vector of length n or a matrix of column length n

opts

-

(optional) equation(s) of the form keyword = value, where keyword is one of initialapprox, maxiterations, method, stoppingcriterion, tolerance; options for numerically approximating the solution to a linear system

Description

• 

The LinearSolve command numerically approximates the solution to the linear system A.x=b, using the specified method.

• 

The IterativeApproximate command and the MatrixDecomposition command are both used by the LinearSolve command.

• 

If b is a matrix, then the systems A.x=bi will be solved for each column bi of b, and hence there will be multiple solutions returned.

• 

Different options are required to be specified in opts, depending on the method.  These dependencies are outlined below.

• 

The Notes section in the Student[NumericalAnalysis][IterativeApproximate] help page lists conditions under which the Jacobi, Gauss-Seidel, and successive over-relaxation iterative methods produce a solution.

Examples

withStudent[NumericalAnalysis]:

A:=Matrix10.,1.,2.,0.,1.,11.,1.,3.,2.,1.,10.,1.,0.,3.,1.,8.

A:=10.1.2.0.1.11.1.3.2.1.10.1.0.3.1.8.

(1)

b:=Vector6.,25.,11.,15.

b:=6.25.11.15.

(2)

LinearSolveA,b,method=SOR1.25,initialapprox=Vector0.,0.,0.,0.,maxiterations=100,tolerance=104

0.99997764402.0000015780.99999423340.9999867498

(3)

LinearSolveA,b,method=LU

1.0000000002.0000000001.0000000000.9999999999

(4)

Try solving multiple systems (but with the same coefficient Matrix)

B:=Matrix6.,25.,11.,15.,7.,8.,16.,4.,4.,2.,9.,5.,17.,6.,3.,22.

B:=6.25.11.15.7.8.16.4.4.2.9.5.17.6.3.22.

(5)

LinearSolveA,B,method=PLU

0.50953346860.14820824860.52643678162.135226505,2.6235294120.83529411770.20000000000.4117647058,1.2109533471.4651791751.2873563210.01352265042,1.3760649090.26004056810.48965517242.908722110

(6)

See Also

Student[LinearAlgebra], Student[NumericalAnalysis], Student[NumericalAnalysis][BackSubstitution], Student[NumericalAnalysis][ComputationOverview], Student[NumericalAnalysis][ForwardSubstitution], Student[NumericalAnalysis][IterativeApproximate], Student[NumericalAnalysis][MatrixDecomposition]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam