07 Jacobi Iteration
Summary
TLDRIn this educational video, Gabriel Gamana introduces the concept of Jacobi Iteration, a method for solving systems of linear equations. The video explains how to rearrange equations for iterative computation and checks for diagonal dominance to ensure convergence. Gamana demonstrates the process with an example, showing how to achieve a solution through iterative refinement until a stopping criterion is met. The video concludes with a practical demonstration of implementing Jacobi Iteration in MS Excel, showcasing the power of iterative methods in solving complex mathematical problems.
Takeaways
- 📚 The video introduces Chapter 2 on systems of equations, focusing on the Jacobi iteration method.
- 🔍 Jacobi iteration is a technique used for solving systems of linear equations iteratively.
- 💡 The method involves rearranging equations to isolate each variable, similar to the fixed point method.
- 📏 For Jacobi iteration to converge, the matrix must be diagonally dominant, where the absolute value of each diagonal element is greater than the sum of the absolute values of the off-diagonal elements in its row.
- 📝 The video demonstrates how to check if a matrix is diagonally dominant by comparing the absolute values of the elements.
- 🔢 The script includes a practical example where a system of linear equations is solved using Jacobi iteration with a stopping criterion of 0.001.
- 🔄 Iterative steps are shown, with initial guesses and subsequent refinements until the stopping criterion is met.
- 📊 The video concludes with a demonstration of how to implement the Jacobi iteration method using MS Excel and VBA for automated computation.
- 💻 The script explains the use of arrays in VBA to handle multiple values efficiently, which is crucial for solving systems of equations.
- 🔗 The video provides a step-by-step guide on setting up the VBA code for Jacobi iteration, including defining variables, using loops for iteration, and presenting results.
Q & A
What is the main topic discussed in Chapter 2 of the video?
-The main topic discussed in Chapter 2 of the video is the system of equations, with a focus on the first topic, Jacobi iteration.
What is the difference between the problems discussed in Chapter 1 and Chapter 2?
-In Chapter 1, the focus is on determining the value of 'x' that satisfies a single equation, f(x) = 0. In contrast, Chapter 2 deals with determining the values of x1, x2, up to xn that simultaneously satisfy a set of equations, which can be either linear or non-linear.
What is meant by a 'simultaneous correction method' in the context of Jacobi iteration?
-A 'simultaneous correction method' refers to the approach where no component of an approximation is used until all components of that approximation have been computed, as opposed to using an updated value as soon as it's available.
How is the Jacobi iteration method different from the fixed point method?
-While both methods involve rearranging equations, the Jacobi iteration method specifically ensures that no component of an approximation is used until all components of the current iteration have been computed.
What is a diagonally dominant matrix and why is it important for Jacobi iteration?
-A diagonally dominant matrix is one where the absolute value of the diagonal element in each row is greater than the sum of the absolute values of the off-diagonal elements in that row. This property is important for Jacobi iteration because it helps ensure the convergence of the method.
What is the stopping criterion used in the example problem in the video?
-The stopping criterion used in the example problem is 0.001, which means the iteration process will stop when the relative error between successive approximations is less than or equal to 0.001.
How does the video demonstrate the convergence of the Jacobi iteration method?
-The video demonstrates the convergence of the Jacobi iteration method by solving a system of linear equations manually and showing that after 10 iterations, the solution converges with a stopping criterion of 0.001.
What is the purpose of using arrays in the computerized computation of Jacobi iteration as shown in the video?
-Arrays are used in the computerized computation to efficiently handle and store multiple values, such as the coefficients and variables in the matrix, instead of using individual variables for each element.
How does the video guide the viewer to implement the Jacobi iteration method in MS Excel using VBA?
-The video guides the viewer through creating a VBA macro that performs the Jacobi iteration method. It involves defining variables, using arrays to handle matrix data, and implementing iterative loops with a stopping criterion to find the solution.
What is the significance of the 'U-Bound' function mentioned in the video?
-The 'U-Bound' function in VBA is used to determine the upper bound of an array, which helps in understanding the size of the matrix and is crucial for correctly implementing the Jacobi iteration method.
Outlines
📚 Introduction to Systems of Equations and Jacobi Iteration
Gabriel Gamana introduces Chapter 2 on systems of equations, focusing on the Jacobi iteration method. The chapter aims to find values of variables that satisfy multiple equations simultaneously, which can be linear or non-linear. The general form of linear algebraic equations is presented, and the concept of matrix form is introduced. The video discusses iterative methods for solving these systems, particularly the Jacobi iteration, which is a simultaneous correction method. The method involves rearranging equations similar to the fixed point method and requires the matrix to be diagonally dominant for convergence. An example problem is presented to demonstrate the method, with a stopping criterion of 0.001.
🔍 Implementing Jacobi Iteration with Initial Guesses
The video script details the process of implementing Jacobi iteration with initial guesses for the variables. The first iteration is calculated using the rearranged equations, and the results are presented. The relative errors for each variable are calculated and compared against the stopping criterion. The process continues for subsequent iterations, refining the values of the variables and recalculating the relative errors until convergence is achieved. The script illustrates the iterative process with specific numerical examples, showing how the values of the variables are updated in each iteration.
💻 Automating Jacobi Iteration with Excel and VBA
The script transitions to a discussion on automating the Jacobi iteration process using Microsoft Excel and Visual Basic for Applications (VBA). It explains the use of arrays to store matrix values and the process of defining variables and their types for the VBA script. The iterative process is implemented using a series of 'Do Until' loops within the VBA code. The script includes instructions for extracting matrix information from Excel using input boxes and functions like 'UBound'. The video concludes with a demonstration of the VBA code's output, showing the number of iterations required for convergence and the final values of the variables.
🎓 Conclusion and Final Thoughts on Jacobi Iteration
The final paragraph of the script summarizes the video's content, highlighting the key takeaways from the manual and computerized computations of the Jacobi iteration. The presenter expresses hope that the viewers have gained a new understanding of solving systems of equations using the Jacobi method. The video concludes with a thank you to the viewers and a reminder to stay safe, signaling the end of the tutorial.
Mindmap
Keywords
💡Systems of Equations
💡Jacobi Iteration
💡Convergence
💡Diagonally Dominant Matrix
💡Matrix Form
💡Relative Error
💡Stopping Criterion
💡VBA (Visual Basic for Applications)
💡Array
💡Excel Computation
Highlights
Introduction to Chapter 2 on systems of equations and the first topic, Jacobi Iteration.
Explaining the shift from solving a single equation to determining values for multiple variables in a set of equations.
General form of linear algebraic equations and their matrix form representation.
Discussion on advanced algebra topics and iterative methods for solving matrix forms.
Introduction to Jacobi Iteration as a simultaneous correction method.
Explanation of rearranging equations in the same manner as in the fixed point method for Jacobi Iteration.
Convergence criteria for Jacobi Iteration involving diagonally dominant matrices.
Practical example of checking if a matrix is diagonally dominant.
Detailed step-by-step solution of a system of linear equations using Jacobi Iteration.
Stopping criterion for the iterative process set at 0.001.
Manual computation process demonstrating the convergence of the solution.
Iterative calculation with initial guesses and determination of variable values.
Calculation of relative errors and comparison with the stopping criterion.
Refinement of variable values through subsequent iterations.
Final solution and satisfaction of the stopping criterion after 10 iterations.
Introduction to computerized computation using Jacobi Iteration in MS Excel.
Explanation of using arrays in VBA to handle multiple values efficiently.
Demonstration of the iterative process using VBA with input from MS Excel.
Final output of the VBA computation showing convergence and root values.
Transcripts
hello good day everyone
welcome again this is gabriel gamana on
this video we will start the title
chapter 2 which is the systems of
equation
with its first topic the so-called
jacobi iteration
but before i dive into the topic let me
first introduce the chapter itself
so let's start in chapter 1 we determine
the value of x that satisfies a single
equation
f of x equals 0. now
we will deal with the keys of
determining the values of x sub 1
x sub 2 up to x sub n that
simultaneously satisfies a set of
equations
such system can be either linear or
non-linear
the general form of linear algebraic
equations is given by the equation
while rewriting the equation in matrix
form can give us
at this of the matrix form using exact
solution
here are the list of topics that deals
with the problem
and since these topics are normally
discussed in advanced algebra
i'm not going to discuss it on this
video on the other hand
those matrix form can also be solved
using iterative methods
as shown on this list which will also be
discussed in chapter 2
under this video series so let's dive
into the first topic
the jacobi iteration jacobi iteration is
a simultaneous correction method
where no component of an approximation x
sub n
is used until all components of x sub n
have been computed we are going to
rearrange the equation
the same way as we do in fixed point
method
so the jacobi equation for the system of
linear equation is
i know it looks so technical so let me
explain it much easier
say if we have a system of equations and
we are asked to determine
the point of their intersection under
jacobi
iteration we have to rearrange the
equation the same manner
as we do in fixed point method then
using this equation
we will implement the iteration process
until we arrive on the convergence
speaking of convergence in order for the
jacobi iteration to converge
the diagonal element must be greater
than the off diagonal element
such matrix is called diagonally
dominant matrix
for example we have a matrix and we are
asked to check
if it is a diagonally dominant matrix
for the first row the absolute value of
6
must be greater than the absolute value
of negative
2 plus the absolute value of 1
as well as for the other rows
to deeply understand the principle let's
solve a problem
find a solution for the system of linear
equations below
with a stopping criterion of 0.001
obviously this is the example i used to
test the diagonal dominance of a matrix
so the problem will converge using
jacobi iteration
and before we start the solution let's
rearrange the equation as what we did in
the fixed point method
so x sub n plus one is equals to
one over six
multiplied by eleven
minus negative 2
multiplied by y sub n
minus z sub n
and for y sub n plus 1 that is equals to
1 over 7
times 5 minus
negative 2 multiplied by x sub n
minus two multiplied by c sub n
and for z sub n plus one
it is equals to one over
negative prime
multiplied by minus one
minus x sub n
minus 2 multiplied by y and n
using these equations we can now
determine the defined value of the
variables
let's set this area as the number of
iteration
the value of x sub n
the value of y sub n and the value of z
sub n
to start the solution let's have an
initial guesses of
negative prime four
negative three under the first iteration
then immediately let's determine the
defined value of the variables
so x sub n plus one is equals to
one over six times eleven
plus two multiplied by negative four
minus negative three
[Music]
and that is equals to one
for y sub n plus one that is equals to
one over seven multiplied by five
plus two times negative five
minus 2 times negative 3
and that is equals to
[Music]
0.143
for x of n plus 1 that is equals to one
over negative five
times negative one
minus one
times negative time
minus two times negative four
and that is equals to negative 2.4
[Music]
and for the relative error epsilon sub x
is equal to the absolute value of 1
minus negative five
all over one
and that is equals to six which is
greater than
the stop in criterion
for epsilon sub y
that is equal to the absolute value of
0.143
minus negative four
all over zero point
one four three
that is equals to 29
which is greater than the stopping
criterion
well epsilon sub z is equals to
negative 2.4
minus negative 3
all over
negative 2.4
absolute value and that is equals to
0.25 which is also greater than
the stepping 3 billion since all the
relative errors are greater than the
staffing criterion
we will proceed the solution
for the second iteration the refined
value of the limits will become
1 0.143
and negative 2.4
then immediately let's determine the
defined value of the variables
so x sub n plus 1
is equals to 1 over 6
multiplied by eleven plus two
times zero point one fourteen
minus negative two point four
that is equals to two point
two eight one
for y sub n plus one
that is equals to one over seven
multiplied by five plus two
times one
minus two multiplied by
negative two point four
and that is equals to
one point six eight six
well for z sub n plus one
that is equals to one over negative five
multiplied by negative one
minus one minus
2 multiplied by 0.143
and that is equals to 0.457
for the relative error
epsilon sub x is equals to 2.281
minus 1 all over
2.281
[Music]
absolute value that is equal to 0.562
greater than the stopping criterion
for the epsilon sub y
that is equals to 1.686
minus 0.143
all over 1.686
absolute value and that is equals to
0.915
greater than the stopping criterion and
for the epsilon sub z
that is equals to zero point
four times seven
minus negative two point four
all over zero point
absolute value that is equals to
[Music]
6.25
still greater than the stopping
criterion
since all of the relative errors are
greater than the stopping criterion
we will proceed the solution so for the
third iteration
the refined value of the limits will
become
2.281
1.686
[Music]
and 0.457
well now i suppose that you now
understand how to determine
the point that satisfies simultaneously
the equations
using jacobi iteration so let me now
show you my ms excel computation that
presents the convergence of the solution
as you seen it took 10 iterations
satisfy the stopping criterion
with the point value of 2
1 and 1. it means that this equation
will simultaneously satisfy
with the said coordinates so that
concludes the discussion
of the manual computation using jacobi
iteration
this last part of the video is for the
computerized competition using jacobi
iteration
again insert another module for our new
method
and rename it as jacobi iteration
then create a sub procedure and name it
as jacobi
then let's define the variable and their
variable types
this time we will use a variable that
contains more than one value
the so-called array array is a
multi-dimensional function that contains
a vast amount of information
so instead of using hundreds of
variables
we will now use a single array that can
contain hundreds of information or even
thousands
well to make it simple the variables
that we defined earlier as a string
integers and double can contain only one
value
like the letter a on this equation while
array on the other hand is a matrix of
information
it can be one dimensional or
multi-dimensional
so this type of array is called dynamic
array
since the size is not yet determined due
to the fact that the problems
have different matrix sizes instead of
putting the content
of matrix one by one inside the vba
we will use input box and we'll just
select
the content of the matrix within ms
excel
then using u-bound function we will
determine the size of the matrix
and using the redeem function we will
now specify the size of the matrix
which is left blank before the selection
of the matrix info
[Music]
for the iterative process we will use a
series of do until loops
where this line is for the summation
part of the jacobi iteration equation
or in simple word the coefficient times
the variables
while this line over here is the full
equation
object of the iteration while the setup
lines will repeat the process in other
equations
i just want to highlight that to extract
the maximum content of this array
we will use worksheet function
and to present the output of vba after
satisfying the inheritance process
we will use do until the since we have
three different
outputs with the aid of a message box
so if i run the code by pressing f5 it
will ask me
to select the coefficient matrix
[Music]
as well as the constant matrix
the initial values
and this typing criterion
and by clicking ok the code has a first
output of
10 iterations with a root value of 2 and
a relative error of 0.00297
for the second iteration 10 iterations
with root value of 1
with a relative error of 0.000405
for third output 10 iterations with root
value
of 1 and a relative error of 0 0 0
934 so that's it for this video
hopefully you learned something new
thank you for watching and see you soon
keep safe guys
Voir Plus de Vidéos Connexes
Iteration - GCSE Higher Maths
Solve a Linear System by Graphing | jensenmath.ca | grade 10
SOLVING SYSYEM OF NONLINEAR EQUATIONS || PRECALCULUS
Zeros de funções Método Iterativo Linear
SPLDV [Part 1] - Mengenal SPLDV + Metode Grafik
Recurrence Relation | Solution of Recurrence Relation | Discrete Mathematics by Gp sir
5.0 / 5 (0 votes)