برای استفاده از امکانات سیستم، گزینه جاوا اسکریپت در مرورگر شما باید فعال باشد
صفحه
از
0
Numerical analysis using MATLAB and Excel
Karris, Steven T.
اطلاعات کتابشناختی
Numerical analysis using MATLAB and Excel
Author :
Karris, Steven T.
Publisher :
Orchard Publications,
Pub. Year :
2007
Subjects :
Numerical analysis -- Data processing. Mathematical analysis.
Call Number :
QA 297 .K37 2007
جستجو در محتوا
ترتيب
شماره صفحه
امتياز صفحه
فهرست مطالب
Cover Page
(1)
Back Page
(2)
Title Page
(3)
ISBN 1934404047
(4)
Preface
(5)
Table of Contents
(7)
1 Introduction to MATLAB
(14)
1.1 Command Window
(14)
1.2 Roots of Polynomials
(16)
1.3 Polynomial Construction from Known Roots
(17)
1.4 Evaluation of a Polynomial at Specified Values
(18)
1.5 Rational Polynomials
(21)
1.6 Using MATLAB to Make Plots
(22)
1.7 Subplots
(31)
1.8 Multiplication, Division and Exponentiation
(32)
1.9 Script and Function Files
(39)
1.10 Display Formats
(44)
1.11 Summary
(46)
1.12 Exercises
(50)
1.13 Solutions to End-of-Chapter Exercises
(51)
2 Root Approximations
(54)
2.1 Newton’s Method for Root Approximation
(54)
2.2 Approximations with Spreadsheets
(60)
2.3 The Bisection Method for Root Approximation
(72)
2.4 Summary
(80)
2.5 Exercises
(81)
2.6 Solutions to End-of-Chapter Exercises
(82)
3 Sinusoids and Phasors
(88)
3.1 Alternating Voltages and Currents
(88)
3.2 Characteristics of Sinusoids
(89)
3.3 Inverse Trigonometric Functions
(97)
3.4 Phasors
(97)
3.5 Addition and Subtraction of Phasors
(98)
3.6 Multiplication of Phasors
(99)
3.7 Division of Phasors
(100)
3.8 Exponential and Polar Forms of Phasors
(100)
3.9 Summary
(111)
3.10 Exercises
(114)
3.11 Solutions to End-of-Chapter Exercises
(115)
4 Matrices and Determinants
(119)
4.1 Matrix Definition
(119)
4.2 Matrix Operations
(120)
4.3 Special Forms of Matrices
(123)
4.4 Determinants
(127)
4.5 Minors and Cofactors
(131)
4.6 Cramer’s Rule
(136)
4.7 Gaussian Elimination Method
(138)
4.8 The Adjoint of a Matrix
(139)
4.9 Singular and Non-Singular Matrices
(140)
4.10 The Inverse of a Matrix
(141)
4.11 Solution of Simultaneous Equations with Matrices
(143)
4.12 Summary
(150)
4.13 Exercises
(154)
4.14 Solutions to End-of-Chapter Exercises
(156)
5 Differential Equations, State Variables, and State Equations
(162)
5.1 Simple Differential Equations
(162)
5.2 Classification
(163)
5.3 Solutions of Ordinary Differential Equations (ODE)
(167)
5.4 Solution of the Homogeneous ODE
(169)
5.5 Using the Method of Undetermined Coefficients for the Forced Response
(171)
5.6 Using the Method of Variation of Parameters for the Forced Response
(181)
5.7 Expressing Differential Equations in State Equation Form
(185)
5.8 Solution of Single State Equations
(188)
5.9 The State Transition Matrix
(189)
5.10 Computation of the State Transition Matrix
(191)
5.11 Eigenvectors
(199)
5.12 Summary
(203)
5.13 Exercises
(208)
5.14 Solutions to End-of-Chapter Exercises
(210)
6 Fourier, Taylor, and Maclaurin Series
(218)
6.1 Wave Analysis
(218)
6.2 Evaluation of the Coefficients
(219)
6.3 Symmetry
(224)
6.4 Waveforms in Trigonometric Form of Fourier Series
(229)
6.5 Alternate Forms of the Trigonometric Fourier Series
(242)
6.6 The Exponential Form of the Fourier Series
(246)
6.7 Line Spectra
(250)
6.8 Numerical Evaluation of Fourier Coefficients
(253)
6.9 Power Series Expansion of Functions
(257)
6.10 Taylor and Maclaurin Series
(258)
6.11 Summary
(265)
6.12 Exercises
(268)
6.13 Solutions to End-of-Chapter Exercises
(270)
7 Finite Differences and Interpolation
(279)
7.1 Divided Differences
(279)
7.2 Factorial Polynomials
(284)
7.3 Antidifferences
(290)
7.4 Newton’s Divided Difference Interpolation Method
(293)
7.5 Lagrange’s Interpolation Method
(295)
7.6 Gregory-Newton Forward Interpolation Method
(297)
7.7 Gregory-Newton Backward Interpolation Method
(299)
7.8 Interpolation with MATLAB
(302)
7.9 Summary
(317)
7.10 Exercises
(322)
7.11 Solutions to End-of-Chapter Exercises
(323)
8 Linear and Parabolic Regression
(331)
8.1 Curve Fitting
(331)
8.2 Linear Regression
(332)
8.3 Parabolic Regression
(337)
8.4 Regression with Power Series Approximations
(344)
8.5 Summary
(354)
8.6 Exercises
(356)
8.7 Solutions to End-of-Chapter Exercises
(358)
9 Solution of Differential Equations by Numerical Methods
(365)
9.1 Taylor Series Method
(365)
9.2 Runge-Kutta Method
(369)
9.3 Adams’ Method
(377)
9.4 Milne’s Method
(379)
9.5 Summary
(381)
9.6 Exercises
(384)
9.7 Solutions to End-of-Chapter Exercises
(385)
10 Integration by Numerical Methods
(391)
10.1 The Trapezoidal Rule
(391)
10.2 Simpson’s Rule
(396)
10.3 Summary
(404)
10.4 Exercises
(405)
10.5 Solution to End-of-Chapter Exercises
(406)
11 Difference Equations
(412)
11.1 Introduction
(412)
11.2 Definition, Solutions, and Applications
(412)
11.3 Fibonacci Numbers
(418)
11.4 Summary
(422)
11.5 Exercises
(424)
11.6 Solutions to End-of-Chapter Exercises
(425)
12 Partial Fraction Expansion
(428)
12.1 Partial Fraction Expansion
(428)
12.2 Alternate Method of Partial Fraction Expansion
(440)
12.3 Summary
(446)
12.4 Exercises
(449)
12.5 Solutions to End-of-Chapter Exercises
(450)
13 The Gamma and Beta Functions and Distributions
(456)
13.1 The Gamma Function
(456)
13.2 The Gamma Distribution
(471)
13.3 The Beta Function
(472)
13.4 The Beta Distribution
(475)
13.5 Summary
(477)
13.6 Exercises
(479)
13.7 Solutions to End-of-Chapter Exercises
(480)
14 Orthogonal Functions and Matrix Factorizations
(483)
14.1 Orthogonal Functions
(483)
14.2 Orthogonal Trajectories
(484)
14.3 Orthogonal Vectors
(486)
14.4 The Gram-Schmidt Orthogonalization Procedure
(489)
14.5 The LU Factorization
(491)
14.6 The Cholesky Factorization
(505)
14.7 The QR Factorization
(507)
14.8 Singular Value Decomposition
(510)
14.9 Summary
(512)
14.10 Exercises
(514)
14.11 Solutions to End-of-Chapter Exercises
(516)
15 Bessel, Legendre, and Chebyshev Functions
(522)
15.1 The Bessel Function
(522)
15.2 Legendre Functions
(531)
15.3 Laguerre Polynomials
(542)
15.4 Chebyshev Polynomials
(543)
15.5 Summary
(548)
15.6 Exercises
(553)
15.7 Solutions to End-of-Chapter Exercises
(554)
16 Optimization Methods
(559)
16.1 Linear Programming
(559)
16.2 Dynamic Programming
(562)
16.3 Network Analysis
(572)
16.4 Summary
(577)
16.5 Exercises
(578)
16.6 Solutions to End-of-Chapter Exercises
(580)
Appendix A Difference Equations in Discrete−Time Systems
(587)
A.1 Recursive Method for Solving Difference Equations
(587)
A.2 Method of Undetermined Coefficients
(587)
Appendix B Introduction to Simulink®
(599)
B.1 Simulink and its Relation to MATLAB
(599)
B.2 Simulink Demos
(618)
Appendix C Ill-Conditioned Matrices
(619)
Ill-Conditioned Matrices
(619)
his appendix supplements Chapters 4 and 14 with concerns when the determinant of the coefficient matrix is small. We will introduce a reference against which the determinant can be measured to classify a matrix as a well- or ill-conditioned.
(619)
C.1 The Norm of a Matrix
(619)
A norm is a function which assigns a positive length or size to all vectors in a vector space, other than the zero vector. An example is the two-dimensional Euclidean space denoted as . The elements of the Euclidean vector space (e.g., (2,5))...
(619)
The Euclidean norm of a matrix , denoted as , is defined as
(619)
(C.1)
(619)
and it is computed with the MATLAB function norm(A).
(619)
Example C.1
(619)
Using the MATLAB function norm(A), compute the Euclidean norm of the matrix , defined as
(619)
Solution:
(619)
At the MATLAB command prompt, we enter
(619)
A=[-2 5 -4 9; -3 -6 8 1; 7 -5 3 2; 4 -9 -8 -1]; norm(A)
(619)
and MATLAB outputs
(619)
ans =
(620)
14.5539
(620)
C.2 Condition Number of a Matrix
(620)
The condition number of a matrix is defined as
(620)
(C.2)
(620)
where is the norm of the matrix defined in relation (C.1) above. Matrices with condition number close to unity are said to be well-conditioned matrices, and those with very large condition number are said to be ill-conditioned matrices.
(620)
The condition number of a matrix is computed with the MATLAB function cond(A).
(620)
Example C.2
(620)
Using the MATLAB function cond(A), compute the condition number of the matrix defined as
(620)
Solution:
(620)
At the MATLAB command prompt, we enter
(620)
A=[-2 5 -4 9; -3 -6 8 1; 7 -5 3 2; 4 -9 -8 -1]; cond(A)
(620)
and MATLAB outputs
(620)
ans =
(620)
2.3724
(620)
This condition number is relatively close to unity and thus we classify matrix A as a well-condi tioned matrix.
(620)
We recall from Chapter 4 that if the determinant of a square matrix A is singular, that is, if , the inverse of A is undefined. Please refer to Chapter 4, Page 4-22.
(620)
Now, let us consider that the coefficient matrix is very small, i.e., almost singular. Accordingly, we classify such a matrix as ill-conditioned.
(621)
C.3 Hilbert Matrices
(621)
Let be a positive integer. A unit fraction is the reciprocal of this integer, that is, . Thus, are unit fractions. A Hilbert matrix is a matrix with unit fraction elements
(621)
(C.3)
(621)
(C.4)
(621)
MATLAB’s function hilb(n) displays the Hilbert matrix.
(622)
Example C.3
(622)
Compute the determinant and the condition number of the Hilbert matrix using MATLAB.
(622)
Solution:
(622)
At the MATLAB command prompt, we enter
(622)
det(hilb(6))
(622)
and MATLAB outputs
(622)
ans =
(622)
5.3673e-018
(622)
This is indeed a very small number and for all practical purposes this matrix is singular.
(622)
We can find the condition number of a matrix A with the cond(A) MATLAB function. Thus, for the Hilbert matrix,
(622)
cond(hilb(6))
(622)
ans =
(622)
1.4951e+007
(622)
This is a large number and if the coefficient matrix is multiplied by this number, seven decimal places might be lost.
(622)
Let us consider another example.
(622)
Example C.4
(622)
Let where and
(622)
Compute the values of the vector .
(622)
Solution:
(622)
Here, we are asked to find the values of and of the linear system
(622)
Using MATLAB, we define and , and we use the left division operation, i.e.,
(623)
A=[0.585 0.378; 0.728 0.464]; b=[0.187 0.256]'; x=b\A
(623)
x =
(623)
2.9428 1.8852
(623)
Check:
(623)
A=[0.585 0.378; 0.728 0.464]; x=[2.9428 1.8852]'; b=A*x
(623)
b =
(623)
2.4341
(623)
3.0171
(623)
but these are not the given values of the vector , so let us check the determinant and the condi tion number of the matrix .
(623)
determinant = det(A)
(623)
determinant =
(623)
-0.0037
(623)
condition=cond(A)
(623)
condition =
(623)
328.6265
(623)
Therefore, we conclude that this system of equations is ill-conditioned and the solution is invalid.
(623)
Example C.4 above should serve as a reminder that when we solve systems of equations using matrices, we should check the determinants and the condition number to predict possible floating point and roundoff errors.
(623)
References and Suggestions for Further Study
(624)
Index
(625)