Jacobi Iteration Method Example | Numerical Methods

preview_player
Показать описание
Here is a Jacobi iteration method example solved by hand. Jacobi Iteration is an iterative numerical method that can be used to easily solve non-singular linear matrices. In the next video, I will solve some an example in excel using the Jacobi Iteration Method.

This timeline is meant to help you better understand how to solve a system of linear equations using the Jacobi iteration method:
0:00 Introduction.
0:18 Requirements for Jacobi Iteration Method.
0:25 Diagonal dominance in iterative numerical methods.
0:56 Checking for diagonal dominance.
1:32 Jacobi Iteration Method Example.
3:36 Validating Jacobi Iteration Method Results.
4:31 Outro

Follow & Support StudySession:

This video is part of our Numerical Methods course. Numerical methods is about solving math problems through approximating the solution of problems that would be difficult or impossible to solve analytically. In this playlist we will cover topics such as solving systems of linear equations, solving systems of non-linear equations, numerical integration, numerical derivatives, etc..
Рекомендации по теме
Комментарии
Автор

1/14 is 0.0714 i think theres a typo in the first iteration

fahadkhan
Автор

you should be the one who have my tuition fee for my course hahaha

gioplaysgames
Автор

import numpy as np

def gauss_elimination(a_matrix, b_matrix):
#adding some contingencies to prevent future problems
if a_matrix.shape[0] != a_matrix.shape[1]:
print("ERROR: Squarematrix not given!")
return
if b_matrix.shape[1] > 1 or b_matrix.shape[0] != a_matrix.shape[0]:
print("ERROR: Constant vector incorrectly sized")
return

#initialization of nexessary variables
n=len(b_matrix)
m=n-1
i=0
j=i-1
x=np.zeros(n)
new_line="/n"

#create our augmented matrix throug Numpys concatenate feature
augmented_matrix = np.concatenate((a_matrix, b_matrix, ), axis=1, dtype=float)
print(f"the initial augmented matrix is:
print("solving for the upper-triangular matrix:")


#applying gauss elimination:
while i<n:
if augmented_matrix[i][i]==0.0: #fail-safe to eliminate divide by zero erroor!
print("Divide by zero error")
return
for j in range(i+1, n):

* augmented_matrix[i])
print(augmented_matrix) #not needed, but nice to visualize the process

i=i+1

#backwords substitution!

for k in range(n-2, -1, -1):
x[k]=augmented_matrix[k][n]
for j in range(k+1, n):



#displaying solution
print("The following x vector matrix solves the above augmented matrix:")
for answer in range(n):
print(f"x{answer} is {x[answer]}")





variable_matrix = np.array([[1, 1, 3], [0, 1, 3], [-1, 3, 0]])
constant_matrix = np.array([[1], [3], [5]])

gauss_elimination(variable_matrix, constant_matrix)

samramzi
Автор

That's very very very helpful. thank you!!❤️

a-
Автор

when calculation the iteration values from the first table it seems like your calculation is wrong. I do not find the same digits and non of my friends are

pumla
Автор

sir, what is the typer of error you wrote?

oldlaptop
Автор

at column 2 row 2 i think he forgot to write divide by 12

primalmachine
visit shbcf.ru