Question: se Jupyter notebook to write a Python function myGE 6 1 ( A , b , TOL,info ) to implement the algorithm 6 . 1

se Jupyter notebook to write a Python function
myGE61(A,b,TOL,info)
to implement the algorithm 6.1 of Gaussian Elimination with Backward Substitution on
page 368. Your function should return [x,info], where vector x is the solution of Ax = b.
TOL is a tiny real number (say,10^14) for verifying whether a number is zero in coding:
in the outline, use |a_pi|>TOL to replace a_pi =0 and |a_Gaussian Elimination with Backward Substitution
To solve the nn linear system
E1:,a11x1+a12x2+cdots+a1nxn=a1,n+1
E2:,a21x1+a22x2+cdots+a2nxn=a2,n+1
vdots,vdots,vdots,vdots
En:an1x1+an2x2+cdots+axn=an,n+1
INPUT number of unknowns and equations n; augmented matrix A=[aij], where 1
in and 1jn+1.
OUTPUT solution x1,x2,dots,xn or message that the linear system has no unique solu-
tion.
Step 1 For i=1,dots,n-1 do Steps 2-4.(Elimination process.)
Step 2 Let p be the smallest integer with ipn and a0.
If no integer p can be found
then OUTPUT ('no unique solution exists');
STOP.
Step 3 If pi then perform (Ep)harr(Ei).
Step 4 For j=i+1,dots,n do Steps 5 and 6.
Step 5 Set mji=ajiaii.
Step 6 Perform (Ej-mjiEi)(Ej);
Step 7 If a=0 then OUTPUT ('no unique solution exists');
STOP.
Step 8 Set xn=an,n+1a.(Start backward substitution.)
Step 9 For i=n-1,dots,1 set xi=ai,n+1-j=i+1naijxjaii.
Step 10 OUTPUT (x1,dots,xn); (Procedure completed successfully.)
STOP.nn|
se Jupyter notebook to write a Python function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!