SlideShare a Scribd company logo
1 of 24
Download to read offline
Department of Mechanical Engineering, BUET
1 ME6185
ME 6185
Sheikh Mohammad Shavik, PhD
Assistant Professor
Dept. of Mechanical Engineering, BUET
Office: Room no. ME421, ME Building
Email: shavik@me.buet.ac.bd
Advanced Numerical Analysis
Lecture – 2
Solution of System of Equations
April 2022
Department of Mechanical Engineering, BUET
2 ME6185
Difference between Systems of Linear and
Nonlinear Equations
Linear system Nonlinear system
Department of Mechanical Engineering, BUET
3 ME6185
System of Linear Equations
f1(x1, x2, ..., xn) = 0
f2(x1, x2, ..., xn) = 0
...
fn(x1, x2, ..., xn) = 0
Linear Algebraic Equation: An equation of the form f(x)=0 where, f
is a polynomial with linear terms.
a11x1 + a12x2 + ... + a1nxn = b1
a21x1 + a22x2 + ... + a2nxn = b2
... ... ... ...
an1x1 + an2x2 + ... + annxn = bn
Matrix Form: [A] {x} = {b}
[A] nxn Coefficient matrix
{x} nx1 Unknown vector
{b} nx1 Right-Hand-Side (RHS) vector
A general set of equations. n equations, n unknowns.
A general set of linear algebraic equations.
n equations, n unknowns.
Department of Mechanical Engineering, BUET
4 ME6185
Numerical Solution of Systems of Linear
Algebraic Equations
Department of Mechanical Engineering, BUET
5 ME6185
(Naive) Gauss Elimination Method
§ Consider the following system of n equations.
a11x1 + a12x2 + ... + a1nxn = b1 (1)
a21x1 + a22x2 + ... + a2nxn = b2 (2)
………
………
an1x1 + an2x2 + ... + annxn = bn (n)
Step 0 (optional): Form the augmented matrix of [A|B].
Step 1 Forward Elimination: Reduce the system to an upper triangular system.
(1.1) First eliminate x1 from 2nd to nth equations.
- Multiply the 1st eqn. by a21/a11 & subtract it from the 2nd equation. This is the new 2nd eqn.
- Multiply the 1st eqn. by a31/a11 & subtract it from the 3rd equation. This is the new 3rd eqn.
...............
- Multiply the 1st eqn. by an1/a11 & subtract it from the nth equation. This is the new nth eqn.
Important: In these steps the 1st eqn is the pivot equation and a11 is the pivot element. Note that a
division by zero may occur if the pivot element is zero. Naive-Gauss Elimination does not check for
this.
Johann Carl Friedrich Gauss
(1777–1855)
Department of Mechanical Engineering, BUET
6 ME6185
Step 0: Form Augmented matrix
b1
b2
b3
bn b1
b2
bn
Department of Mechanical Engineering, BUET
7 ME6185
Step 1.1: eliminate x1 from 2nd to nth
equations
Department of Mechanical Engineering, BUET
8 ME6185
Step 1.1: eliminate x1 from 2nd to nth
equations
Department of Mechanical Engineering, BUET
9 ME6185
Department of Mechanical Engineering, BUET
10 ME6185
Step 1.1: eliminate x1 from 2nd to nth equations
Department of Mechanical Engineering, BUET
11 ME6185
Step 1.2: eliminate x2 from 3rd to nth equations
Department of Mechanical Engineering, BUET
12 ME6185
Step 1.3: eliminate x2 from 4th to nth equations
Department of Mechanical Engineering, BUET
13 ME6185
…….Step 1.n-1: eliminate xn-1 from nth equation
Department of Mechanical Engineering, BUET
14 ME6185
Forward Elimination
Department of Mechanical Engineering, BUET
15 ME6185
Step 2 Back substitution: Find the unknowns starting from
the last equation.
(2.1) Last equation involves only xn. Solve for it.
(2.1) Use this xn in the (n-1)th equation and solve for xn-1.
.......
……..
(2.n) Use all previously calculated x values in the 1st eqn and
solve for x1.
(Naive) Gauss Elimination Method
Department of Mechanical Engineering, BUET
16 ME6185
Back Substitution
Department of Mechanical Engineering, BUET
17 ME6185
Gauss Elimination: Recipe in a Flow Chart
Department of Mechanical Engineering, BUET
18 ME6185
Gauss Elimination: Recipe in a Flow Chart
Department of Mechanical Engineering, BUET
19 ME6185
Gauss Elimination: Recipe in a Flow Chart
Department of Mechanical Engineering, BUET
20 ME6185
MATLAB
Code
Department of Mechanical Engineering, BUET
21 ME6185
Using MATLAB code
Department of Mechanical Engineering, BUET
22 ME6185
§Example: Solve the following system using Naive Gauss
Elimination
6x1 – 2x2 + 2x3 + 4x4 = 16
12x1 – 8x2 + 6x3 + 10x4 = 26
3x1 – 13x2 + 9x3 + 3x4 = -19
-6x1 + 4x2 + x3 - 18x4 = -34
Step 0: Form the augmented matrix
6 –2 2 4 | 16
12 –8 6 10 | 26
3 –13 9 3 | -19
-6 4 1 -18 | -34
Example: Naive Gauss Elimination Method
Department of Mechanical Engineering, BUET
23 ME6185
Step 1: Forward elimination
(1.1) Eliminate x1
(1.2) Eliminate x2
(1.3) Eliminate x3
6 –2 2 4 | 16 (Does not change. Pivot is 6)
0 –4 2 2 | -6
0 –12 8 1 | -27
0 2 3 -14 | -18
6 –2 2 4 | 16 (Does not change.)
0 –4 2 2 | -6 (Does not change. Pivot is -4)
0 0 2 -5 | -9
0 0 4 -13 | -21
6 –2 2 4 | 16 (Does not change.)
0 –4 2 2 | -6 (Does not change.)
0 0 2 -5 | -9 (Does not change. Pivot is 2)
0 0 0 -3 | -3
Example: Naive Gauss Elimination Method
Department of Mechanical Engineering, BUET
24 ME6185
Step 2: Back substitution
(2.1) Find x4 x4 = (-3)/(-3) = 1
(2.2) Find x3 x3 = (-9+5*1)/2 = -2
(2.3) Find x2 x2 = (-6-2*(-2)-2*1)/(-4) = 1
(2.4) Find x1 x1 = (16+2*1-2*(-2)-4*1)/6 = 3
Example: Naive Gauss Elimination Method

More Related Content

Similar to Lecture2_system of equations.pdf

Applied mathematics for complex engineering
Applied mathematics for complex engineeringApplied mathematics for complex engineering
Applied mathematics for complex engineeringSahl Buhary
 
12b applications
12b applications12b applications
12b applicationslaiba javed
 
Ouantitative technics
Ouantitative technics Ouantitative technics
Ouantitative technics Gayu Joseph
 
WCS Specialist Maths An Introduction to Matrices PowerPoint
WCS Specialist Maths An Introduction to Matrices PowerPointWCS Specialist Maths An Introduction to Matrices PowerPoint
WCS Specialist Maths An Introduction to Matrices PowerPointKingp18
 
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docxM166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docxinfantsuk
 
Chapter 4 Simplex Method ppt
Chapter 4  Simplex Method pptChapter 4  Simplex Method ppt
Chapter 4 Simplex Method pptDereje Tigabu
 
lecture0003-numerical-methods-topic-3-solution-of-systems-of-linear-equations...
lecture0003-numerical-methods-topic-3-solution-of-systems-of-linear-equations...lecture0003-numerical-methods-topic-3-solution-of-systems-of-linear-equations...
lecture0003-numerical-methods-topic-3-solution-of-systems-of-linear-equations...wafahop
 
Gaussian Elimination
Gaussian EliminationGaussian Elimination
Gaussian EliminationZunAib Ali
 
OConnor_SimulationProject
OConnor_SimulationProjectOConnor_SimulationProject
OConnor_SimulationProjectKevin O'Connor
 
SG 8 Lecture 15 Simplex - Min - 2 phase.pptx
SG 8 Lecture 15 Simplex - Min - 2 phase.pptxSG 8 Lecture 15 Simplex - Min - 2 phase.pptx
SG 8 Lecture 15 Simplex - Min - 2 phase.pptxyashchotaliyael21
 
MITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submissionMITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submissionAshutosh Katti
 

Similar to Lecture2_system of equations.pdf (20)

Applied mathematics for complex engineering
Applied mathematics for complex engineeringApplied mathematics for complex engineering
Applied mathematics for complex engineering
 
12b applications
12b applications12b applications
12b applications
 
Ouantitative technics
Ouantitative technics Ouantitative technics
Ouantitative technics
 
WCS Specialist Maths An Introduction to Matrices PowerPoint
WCS Specialist Maths An Introduction to Matrices PowerPointWCS Specialist Maths An Introduction to Matrices PowerPoint
WCS Specialist Maths An Introduction to Matrices PowerPoint
 
the inverse of the matrix
the inverse of the matrixthe inverse of the matrix
the inverse of the matrix
 
matrix
matrixmatrix
matrix
 
Big m method
Big   m methodBig   m method
Big m method
 
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docxM166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
 
gmrit-cse
gmrit-csegmrit-cse
gmrit-cse
 
Chapter 4 Simplex Method ppt
Chapter 4  Simplex Method pptChapter 4  Simplex Method ppt
Chapter 4 Simplex Method ppt
 
lecture0003-numerical-methods-topic-3-solution-of-systems-of-linear-equations...
lecture0003-numerical-methods-topic-3-solution-of-systems-of-linear-equations...lecture0003-numerical-methods-topic-3-solution-of-systems-of-linear-equations...
lecture0003-numerical-methods-topic-3-solution-of-systems-of-linear-equations...
 
Matlab
MatlabMatlab
Matlab
 
Gaussian Elimination
Gaussian EliminationGaussian Elimination
Gaussian Elimination
 
OConnor_SimulationProject
OConnor_SimulationProjectOConnor_SimulationProject
OConnor_SimulationProject
 
Lelt 240 semestre i-2021
Lelt   240 semestre i-2021Lelt   240 semestre i-2021
Lelt 240 semestre i-2021
 
P3_Kron.pptx
P3_Kron.pptxP3_Kron.pptx
P3_Kron.pptx
 
simplex method
simplex methodsimplex method
simplex method
 
1565 matrix01-ppt
1565 matrix01-ppt1565 matrix01-ppt
1565 matrix01-ppt
 
SG 8 Lecture 15 Simplex - Min - 2 phase.pptx
SG 8 Lecture 15 Simplex - Min - 2 phase.pptxSG 8 Lecture 15 Simplex - Min - 2 phase.pptx
SG 8 Lecture 15 Simplex - Min - 2 phase.pptx
 
MITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submissionMITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submission
 

Recently uploaded

ALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfMadan Karki
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisDr.Costas Sachpazis
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxMustafa Ahmed
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...IJECEIAES
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxKarpagam Institute of Teechnology
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxMustafa Ahmed
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...Amil baba
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Studentskannan348865
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksIJECEIAES
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxMustafa Ahmed
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashidFaiyazSheikh
 
Piping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdfPiping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdfAshrafRagab14
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfJNTUA
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024EMMANUELLEFRANCEHELI
 
Lab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docxLab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docxRashidFaridChishti
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfJNTUA
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2T.D. Shashikala
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.benjamincojr
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxMANASINANDKISHORDEOR
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemSampad Kar
 

Recently uploaded (20)

ALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptx
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
Piping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdfPiping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdf
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Lab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docxLab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docx
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptx
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating System
 

Lecture2_system of equations.pdf

  • 1. Department of Mechanical Engineering, BUET 1 ME6185 ME 6185 Sheikh Mohammad Shavik, PhD Assistant Professor Dept. of Mechanical Engineering, BUET Office: Room no. ME421, ME Building Email: shavik@me.buet.ac.bd Advanced Numerical Analysis Lecture – 2 Solution of System of Equations April 2022
  • 2. Department of Mechanical Engineering, BUET 2 ME6185 Difference between Systems of Linear and Nonlinear Equations Linear system Nonlinear system
  • 3. Department of Mechanical Engineering, BUET 3 ME6185 System of Linear Equations f1(x1, x2, ..., xn) = 0 f2(x1, x2, ..., xn) = 0 ... fn(x1, x2, ..., xn) = 0 Linear Algebraic Equation: An equation of the form f(x)=0 where, f is a polynomial with linear terms. a11x1 + a12x2 + ... + a1nxn = b1 a21x1 + a22x2 + ... + a2nxn = b2 ... ... ... ... an1x1 + an2x2 + ... + annxn = bn Matrix Form: [A] {x} = {b} [A] nxn Coefficient matrix {x} nx1 Unknown vector {b} nx1 Right-Hand-Side (RHS) vector A general set of equations. n equations, n unknowns. A general set of linear algebraic equations. n equations, n unknowns.
  • 4. Department of Mechanical Engineering, BUET 4 ME6185 Numerical Solution of Systems of Linear Algebraic Equations
  • 5. Department of Mechanical Engineering, BUET 5 ME6185 (Naive) Gauss Elimination Method § Consider the following system of n equations. a11x1 + a12x2 + ... + a1nxn = b1 (1) a21x1 + a22x2 + ... + a2nxn = b2 (2) ……… ……… an1x1 + an2x2 + ... + annxn = bn (n) Step 0 (optional): Form the augmented matrix of [A|B]. Step 1 Forward Elimination: Reduce the system to an upper triangular system. (1.1) First eliminate x1 from 2nd to nth equations. - Multiply the 1st eqn. by a21/a11 & subtract it from the 2nd equation. This is the new 2nd eqn. - Multiply the 1st eqn. by a31/a11 & subtract it from the 3rd equation. This is the new 3rd eqn. ............... - Multiply the 1st eqn. by an1/a11 & subtract it from the nth equation. This is the new nth eqn. Important: In these steps the 1st eqn is the pivot equation and a11 is the pivot element. Note that a division by zero may occur if the pivot element is zero. Naive-Gauss Elimination does not check for this. Johann Carl Friedrich Gauss (1777–1855)
  • 6. Department of Mechanical Engineering, BUET 6 ME6185 Step 0: Form Augmented matrix b1 b2 b3 bn b1 b2 bn
  • 7. Department of Mechanical Engineering, BUET 7 ME6185 Step 1.1: eliminate x1 from 2nd to nth equations
  • 8. Department of Mechanical Engineering, BUET 8 ME6185 Step 1.1: eliminate x1 from 2nd to nth equations
  • 9. Department of Mechanical Engineering, BUET 9 ME6185
  • 10. Department of Mechanical Engineering, BUET 10 ME6185 Step 1.1: eliminate x1 from 2nd to nth equations
  • 11. Department of Mechanical Engineering, BUET 11 ME6185 Step 1.2: eliminate x2 from 3rd to nth equations
  • 12. Department of Mechanical Engineering, BUET 12 ME6185 Step 1.3: eliminate x2 from 4th to nth equations
  • 13. Department of Mechanical Engineering, BUET 13 ME6185 …….Step 1.n-1: eliminate xn-1 from nth equation
  • 14. Department of Mechanical Engineering, BUET 14 ME6185 Forward Elimination
  • 15. Department of Mechanical Engineering, BUET 15 ME6185 Step 2 Back substitution: Find the unknowns starting from the last equation. (2.1) Last equation involves only xn. Solve for it. (2.1) Use this xn in the (n-1)th equation and solve for xn-1. ....... …….. (2.n) Use all previously calculated x values in the 1st eqn and solve for x1. (Naive) Gauss Elimination Method
  • 16. Department of Mechanical Engineering, BUET 16 ME6185 Back Substitution
  • 17. Department of Mechanical Engineering, BUET 17 ME6185 Gauss Elimination: Recipe in a Flow Chart
  • 18. Department of Mechanical Engineering, BUET 18 ME6185 Gauss Elimination: Recipe in a Flow Chart
  • 19. Department of Mechanical Engineering, BUET 19 ME6185 Gauss Elimination: Recipe in a Flow Chart
  • 20. Department of Mechanical Engineering, BUET 20 ME6185 MATLAB Code
  • 21. Department of Mechanical Engineering, BUET 21 ME6185 Using MATLAB code
  • 22. Department of Mechanical Engineering, BUET 22 ME6185 §Example: Solve the following system using Naive Gauss Elimination 6x1 – 2x2 + 2x3 + 4x4 = 16 12x1 – 8x2 + 6x3 + 10x4 = 26 3x1 – 13x2 + 9x3 + 3x4 = -19 -6x1 + 4x2 + x3 - 18x4 = -34 Step 0: Form the augmented matrix 6 –2 2 4 | 16 12 –8 6 10 | 26 3 –13 9 3 | -19 -6 4 1 -18 | -34 Example: Naive Gauss Elimination Method
  • 23. Department of Mechanical Engineering, BUET 23 ME6185 Step 1: Forward elimination (1.1) Eliminate x1 (1.2) Eliminate x2 (1.3) Eliminate x3 6 –2 2 4 | 16 (Does not change. Pivot is 6) 0 –4 2 2 | -6 0 –12 8 1 | -27 0 2 3 -14 | -18 6 –2 2 4 | 16 (Does not change.) 0 –4 2 2 | -6 (Does not change. Pivot is -4) 0 0 2 -5 | -9 0 0 4 -13 | -21 6 –2 2 4 | 16 (Does not change.) 0 –4 2 2 | -6 (Does not change.) 0 0 2 -5 | -9 (Does not change. Pivot is 2) 0 0 0 -3 | -3 Example: Naive Gauss Elimination Method
  • 24. Department of Mechanical Engineering, BUET 24 ME6185 Step 2: Back substitution (2.1) Find x4 x4 = (-3)/(-3) = 1 (2.2) Find x3 x3 = (-9+5*1)/2 = -2 (2.3) Find x2 x2 = (-6-2*(-2)-2*1)/(-4) = 1 (2.4) Find x1 x1 = (16+2*1-2*(-2)-4*1)/6 = 3 Example: Naive Gauss Elimination Method