Homework answers / question archive /
Homework 7: Solving system of linear equations
(due on Friday, Dec 3, 2021)
Upload your solution as a PDF and the relevant
Homework 7: Solving system of linear equations
(due on Friday, Dec 3, 2021)
Upload your solution as a PDF and the relevant
Math
Share With
Homework 7: Solving system of linear equations
(due on Friday, Dec 3, 2021)
 Upload your solution as a PDF and the relevant .mlx and/or .m files to the Canvas page.
 Purpose: introduce you to computer methods for solving systems of simultaneous linear equations. You will perform hand calculations that solves the equations using Gauss Elimination (direct solver) and GaussSeidel (iterative solver) approaches and then and write a computer program that does the same.
Problem 1: Given the system of equations Ax = b, as defined below:
? 2
3
?
−1

−2
2
2



 Use MATLAB’s backslash operator ‘\’ to solve

Determine the solution by hand using Gauss Elimination
 Use GaussSeidel method to solve (by implementing a function that performs GaussSeidel iterations for a given matrix A and vector b.)
Problem 2: Given the system of equations Ax = b, as defined below:
? 8
2
?
−3

2
5
1



 Use MATLAB’s backslash operator ‘\’ to solve
 Carry out three iterations of the GaussSeidel method by hand, assuming an initial values of x equal to zero. After the third iteration, compute the error for each estimate with relative to the true values (you can use backslash operator to obtain the true solution.)
 Use GaussSeidel method to solve (by implementing a function that performs GaussSeidel iterations for a given matrix A and vector b.)
1
The University of Texas at Austin
Dept. of Civil, Arch. & Env. Eng.
CE 311K, Fall 2021
Homework no. 7
Problem 3: Solve the axial forces F_{i }for the following truss with pinjoints and 13 members. The resulting system of 13 equations is:
F_{2 }+ 0.707F_{1 }= 0 F_{3}− 0.707F_{1}− 2000 = 0
0.707F_{1 }+ F_{4 }+ 6229 = 0 −F_{2 }+ 0.659F_{5 }+ F_{6 }= 0
−F_{4}− 0.753F_{5}− 600 = 0
−F_{3}− 0.659F_{5 }+ F_{7 }= 0
F_{8 }+ 0.753F_{5 }= 0
−F_{6 }+ 0.659F_{9 }+ F_{10 }= 0
−F_{8}− 0.753F_{9}− 800 = 0
−F_{7}− 0.659F_{9 }+ F_{11 }= 0
F_{12 }+ 0.753F_{9}− 2429 = 0
−F_{10 }+ 0.707F_{13 }= 0
−F_{12}− 0.7071F_{13}− 600 = 0
 How many unknowns and how many equations does the system of equations have?
 Solve this system of equations using the backslash operator
 Solve this system of equations using your GaussSeidel function (implemented in Problem 1) using initial values of F equal to zero.
 Explain what is happening when you try to solve this problem using GaussSeidel.