- •Затверджено
- •Contents Contents
- •The purpose and the contents of laboratory works
- •Laboratory work №1 Solution of Nonlinear Equations by the Bisection method and Chord method
- •1.1 Purpose of the work
- •1.2 Tasks for laboratory work
- •1.3 The basic theoretical knowledge
- •1.3.1 Bisection method
- •Figure 1.1 – Bisection method
- •Chord method
- •Figure 1.4 – Chord method
- •1.3.3 Matlab function fzero and roots
- •1.4 Individual tasks
- •1.5 Control questions
- •Laboratory work №2 Solution of Nonlinear Equations by the newton method and simple iteratIvE method
- •Figure 2.1 – Newton method
- •Figire 2.2 - Dependence of the number of iterations on the accuracy of methods for the bisection (upper line) and the Newton method (bottom line)
- •2.3.2 The method of simple iteration
- •A sufficient condition for the convergence of the iterative process
- •Individual tasks
- •Laboratory work №3 Solution system of Linear Algebraic Equations
- •3.3.1 Direct methods
- •Inverse matrix:
- •3.3.2 Iterative methods
- •Condition number of a
- •3.4 Individual tasks
- •3.5 Control questions
- •Laboratory work №4
- •Visualization of 3d data in matlab
- •Plot3(X, y, z, 'style')
- •4.3.2 Instructions: meshgrid, plot3, meshc, surfc
- •4.3.3 Instructions: sphere, plot3, mesh
- •4.3.4 The simple animation in 3d
- •1. Working with a sphere
- •4.3.5 Summary of 3d Graphics
- •Individual tasks
- •Laboratory work №5 Solving systems of nonlinear equations
- •5.1 Purpose of the work
- •5.2 Tasks for laboratory work
- •5.3 The basic theoretical knowledge
- •5.3.1 Newton method to solve systems of non-linear equations
- •5.3.2 Matlab function for Newton method for a system of nonlinear equations
- •5.3.3 The matlab routine function fsolve
- •Input Arguments
- •Individual tasks
- •5.5 Control questions
- •List of the literature
- •Appendix a.
- •Individual tasks to Lab number 1, 2
- •Appendex b. The task for self-examination to Lab number 1, 2
Condition number of a
The condition number
κ(A) ≡ cond(A)=
indicates the sensitivity of the solution to perturbations in A and b (where function cond(A) is MatLab’s function).
The condition number is always in the range 1 ≤ κ(A)≤∞, where κ(A) is a mathematical property of A. Any algorithm will produce a solution that is sensitive to perturbations in A and b if κ(A) is large. In exact math a matrix is either singular or non-singular. κ(A) = ∞ for a singular matrix. κ(A) indicates how close A is to being numerically singular. A matrix with large κ is said to be ill-conditioned
Summary of Limits to Numerical Solution of Ax = b:
1. κ(A) indicates how close A is to being numerically singular
2. If κ(A) is “large”, A is ill-conditioned and even the best numerical algorithms will produce a solution, ˆx that cannot be guaranteed to be close to the true solution, x
3. In practice, Gaussian elimination with partial pivoting and back substitution produces a solution with a small residual
r = b − Aˆx
even if κ(A) is large.
The condition number
3.4 Individual tasks
Compute the condition number of matrices A and C. Solve the system by means MatLab. Make the error in one element of the matrix and one element of the vector right. Again, choose the system and compare the solutions. Write down the error estimates.
Solve the system Cx = D using the formula of Cramer.
Check the program for solving the linear methods a) Jacobi, b) Seidel for a given system of linear algebraic equations.
Perform calculations with varying accuracy, calculating the required number of iterations. Construct the graphs of the number of iterations on the accuracy for different methods.
Table 3.1 – Variants of the tasks
№1 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№2 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№3 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№4 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№5 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№6 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№7 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№8 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№9 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№10 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№11 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№12 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№13 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№14 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№15 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№16 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№17 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№18 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№19 |
|
|
|||||||||||||||||||||||||||||||||||||||||
№20 |
|
|