0% found this document useful (0 votes)
7 views

Assignment2_CompMath

Uploaded by

Шар
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Assignment2_CompMath

Uploaded by

Шар
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Keneskhanov Madiyar, MSc, Teacher, [email protected].

kz

Astana IT University, Department of Computational and Data Science

Assignment 2 - Computational Mathematics


Week 3

Instructions
For each problem, please include:
- Source code with comments explaining all important steps.
- A screenshot of the program output and explanation.
- Include graphs or tables if the task requires them.

Save your answers as a PDF report and submit it to the Moodle.

Task 1: Jacobi Method and Convergence Analysis.

Problem:
1. Implement the Jacobi method to solve the system of linear equations:

2. Start with an initial guess x0=[0,0,0].


3. Check the convergence of the system using the diagonal dominance criterion.

Required:
1. Provide a detailed calculation of the iterations.
2. Check whether the diagonal dominance criterion is satisfied.
3. Explain how convergence depends on the structure of the system.

Task 2: Gaussian method with choice of leading element.

Problem:
1. Using Gauss's method, solve the system:

2. Enable leading element selection to minimize numerical errors.

Required:
1. Print the upper triangular matrix and the result of the inverse substitution.
2. Explain why the choice of the pivot is important for numerical stability.

Task 3: Gauss-Jordan method.

Problem:
1. Solve the following system using the Gauss-Jordan method:
2. Transform the augmented matrix of the system into diagonal form.

Required:
1. Provide the final diagonal matrix and the values ​of the variables.
2. Explain the advantages of the Gauss-Jordan method over the Gauss method.

Task 4: Gauss-Seidel method and stopping criterion.

Problem:
1. Implement the Gauss-Seidel method for the system:

2. Start with an initial guess x0=[0,0,0] and use a precision of 10−5.

Required:
1. Provide a table of iterations with current values ​of variables.
2. Explain how the stopping criterion (accuracy) affects execution time.

Task 5: Relaxation method.

Problem:
1. Solve the following system using the relaxation method with parameter ω=1.1:

2. Compare the execution time and number of iterations for ω=1.1 and ω=1.5.

Required:
1. Provide solutions for both values ​of ω.
2. Explain how the relaxation parameter affects the convergence of the method.

Task 6: Ill-conditioned systems.

Problem:
1. Solve the following ill-conditioned system:

2. Find the solution analytically and numerically.


3. Show how a small change in the coefficients affects the result.

Required:
1. Derive an analytical and numerical solution.
2. Explain why ill-conditioned systems are sensitive to change.

P.S. Please be prepared to explain your code/solution/answers.

You might also like