All 11 Chapters Covered
SOLUTIONS
, @LECTJULIESOLUTIONSSTUVIA
Table of Contents
Acknowledgments..................................................................................................................... iii
Table of Contents....................................................................................................................... iv
CHAPTER 1. INTRODUCTION ................................................................................................ 1
1.2 Analytical Versus Numerical Analysis............................................................................. 1
1.4 Applications ........................................................................................................................ 1
Computer Programs ................................................................................................................ 6
CHAPTER 2. MATRICES ........................................................................................................... 9
2.1 Introduction ........................................................................................................................ 9
2.2 Matrix Operations ............................................................................................................ 11
2.3 Vectors............................................................................................................................... 14
2.4 Determinants. ................................................................................................................... 17
2.5 Rank of a Matrix ............................................................................................................... 18
2.6 Applications ...................................................................................................................... 19
CHAPTER 3. INTRODUCTION TO NUMERICAL METHODS........................................... 20
3.1 Introduction ...................................................................................................................... 20
3.2 Accuracy, Precision, and Bias.......................................................................................... 20
3.3 Significant Figures............................................................................................................ 22
3.4 Analysis of Numerical Errors .......................................................................................... 23
CHAPTER 4. ROOTS OF EQUATIONS .................................................................................. 27
4.1 Introduction ...................................................................................................................... 27
4.2 Eigenvalue Analysis......................................................................................................... 30
4.3 Direct-Search Method ...................................................................................................... 30
4.4 Bisection Method. ............................................................................................................. 32
4.5 Newton-Raphson Iteration. ............................................................................................. 35
4.6 Secant Method .................................................................................................................. 50
4.8 Synthetic Division ............................................................................................................ 55
4.9 Multiple Roots .................................................................................................................. 70
4.10 Systems of Nonlinear Equations ................................................................................... 70
CHAPTER 5. SIMULTANEOUS LINEAR EQUATIONS. ..................................................... 72
5.2 Gaussian Elimination. ...................................................................................................... 72
5.3 Gauss-Jordan Elimination................................................................................................ 74
5.5 LU Decomposition ........................................................................................................... 76
5.6 Iterative Equation-Solving Methods. .............................................................................. 81
5.6.1 Jacobi Iteration....................................................................................................................................... 81
5.6.2 Gaussian-Seidel Iteration ...................................................................................................................... 85
5.6.3 Convergence Consideration of the Iterative Methods ........................................................................ 90
5.7 Use of Determinants......................................................................................................... 94
5.8 Matrix Inversion ............................................................................................................... 99
5.9 Applications .................................................................................................................... 101
Computer Programs ............................................................................................................ 103
CHAPTER 6. NUMERICAL INTERPOLATION .................................................................. 105
6.2 Method of Undetermined Coefficients ......................................................................... 105
6.3 Gregory-Newton Interpolation Method ....................................................................... 109
6.4 Finite Difference Interpolation ...................................................................................... 112
6.5 Newton’s Method........................................................................................................... 114
iv
, @LECTJULIESOLUTIONSSTUVIA
6.6 Lagrange Polynomials ................................................................................................... 119
6.7 Interpolation Using Splines ........................................................................................... 124
6.9 Multi-Dimensional Interpolation .................................................................................. 133
CHAPTER 7. DIFFERENTIATION AND IN T
SeSE
@@ G
iesim
smiciR
iicsioA
sloaltT
aiotinI
oOn N ................................................... 135
7.1 Numerical Differentiation.............................................................................................. 135
7.2. Numerical Integration................................................................................................... 142
CHAPTER 8. Differential Equations...................................................................................... 150
8.1 Introduction .................................................................................................................... 150
8.2 Taylor Series Expansion................................................................................................. 150
8.3 Euler’s Method ............................................................................................................... 154
8.4 Modified Euler’s Method............................................................................................... 157
8.5 Runge-Kuta Methods ..................................................................................................... 159
8.6 Predictor-Corrector Methods ........................................................................................ 164
8.7 Least-Squares Method.................................................................................................... 167
8.8 Garlekin Method ............................................................................................................ 170
8.9 Higher-Order Differential Equations ........................................................................... 172
8.10 Boundary Value Problems........................................................................................... 172
8.11 Integral Equations ........................................................................................................ 176
CHAPTER 9. Data Description and Treatment .................................................................... 177
9.2 Classification of Data ..................................................................................................... 177
9.3 Graphical Description of Data....................................................................................... 177
9.5 Histograms and Frequency Diagrams.......................................................................... 185
9.6 Descriptive Measures..................................................................................................... 187
CHAPTER 10. Curve Fitting and Regression Analysis........................................................ 190
10.1 Introduction .................................................................................................................. 190
10.2 Correlation Analysis .................................................................................................... 190
10.3 Introduction to Regression .......................................................................................... 200
10.4 Principle of Least Squares............................................................................................ 201
10.5 Reliability of the Regression Equation........................................................................ 204
10.8 Correlation Versus Regression .................................................................................... 207
10.9 Application of Bivariate Regression Analysis............................................................ 209
10.8 Multiple Regression Analysis...................................................................................... 213
10.9 Regression Analysis of Nonlinear Models ................................................................. 220
CHAPTER 11. Numerical Optimization................................................................................ 238
11.1 Introduction .................................................................................................................. 238
11.2 The Response Surface Analysis................................................................................... 238
11.3 Numerical Least Squares ............................................................................................. 239
11.4 Steepest Descent Method ............................................................................................. 247
v
,@LECTJULIESOLUTIONSSTUVIA
vi
, @LECTJULIESOLUTIONSSTUVIA
CHAPTER 1. INTRODUCTION
1.2 Analytical Versus Numerical Analysis
Problem 1-1.
Solution not provided.
Problem 1-2.
The two methods differ on the basis of their respective algorithms. The analytical method
is based on analytical calculus while the numerical method is based on finite differences
arithmetic.
Analytical approaches provide direct solutions and will result in exact solutions if they
exist. Analytical methods usually require less time to find a solution. Analytical solution
procedure becomes considerably more complex when constraints are involved.
Numerical analysis, on the other hand, can be used to find solutions of moderately
complex problems, and it is quite easy to include constraints on the unknowns in the
solutions. However, numerical methods most often require a considerable number of
iterations in order to find a solution with a reasonable accuracy. The solution provided by
the numerical methods is usually not exact. Therefore, error analysis and error
estimations are required.
1.4 Applications
Problem 1-3.
2
cos( x) 1 x x4 .......
2! 4!
For h = 0.1
x = x0 + h = 0 + 0.1 = 0.1
cos(0.1) 1.00000000 (one term)
(0.1) 2
cos(0.1) 1 (two terms)
0.99500000 2
(0.1) 2 (0.1) 4
cos(0.1) 1 (three terms)
0.99500417
2 24
True value = 0.99500417
The following table summarizes the results for h = 0.1 to 1.0 in an increment of 0.1:
1
, @LECTJULIESOLUTIONSSTUVIA
f (x 0+h ) f (x 0+h ) f (x 0+h )
x h True value
one term two terms three terms
0.1 0.1 1.00000000 0.99500000 0.99500417 0.99500417
0.2 0.2 1.00000000 0.98000000 0.98006667 0.98006658
0.3 0.3 1.00000000 0.95500000 0.95533750 0.95533649
0.4 0.4 1.00000000 0.92000000 0.92106667 0.92106099
0.5 0.5 1.00000000 0.87500000 0.87760417 0.87758256
0.6 0.6 1.00000000 0.82000000 0.82540000 0.82533561
0.7 0.7 1.00000000 0.75500000 0.76500417 0.76484219
0.8 0.8 1.00000000 0.68000000 0.69706667 0.69670671
0.9 0.9 1.00000000 0.59500000 0.62233750 0.62160997
1.0 1.0 1.00000000 0.50000000 0.54166667 0.54030231
From the table above, it is clear that as the terms of the Taylor series are added
incrementally, the accuracy improves as compared with the true values. This is specially
true as the separation distance increases.
Problem 1-4.
3
sin( x) x x x5 .......
3! 5!
For h = 0.1
x = x0 + h = 0 + 0.1 = 0.1
sin(0.1) 0.100000000 (one term)
(0.1)3
sin(0.1) 0.1 (two terms)
0.09983333 6
(0.1) 3 (0.1)5
sin(0.1) 0.1 (three terms)
0.09983342
6 120
True value = 0.09983342
The following table summarizes the results for h = 0.1 to 1.0 in an increment of 0.1:
f (x 0+h ) f (x 0+h ) f (x 0+h )
x h True value
one term two terms three terms
0.1 0.1 0.10000000 0.09983333 0.09983342 0.09983342
0.2 0.2 0.20000000 0.19866667 0.19866933 0.19866933
0.3 0.3 0.30000000 0.29550000 0.29552025 0.29552021
0.4 0.4 0.40000000 0.38933333 0.38941867 0.38941834
0.5 0.5 0.50000000 0.47916667 0.47942708 0.47942554
0.6 0.6 0.60000000 0.56400000 0.56464800 0.56464247
0.7 0.7 0.70000000 0.64283333 0.64423392 0.64421769
0.8 0.8 0.80000000 0.71466667 0.71739733 0.71735609
0.9 0.9 0.90000000 0.77850000 0.78342075 0.78332691
1.0 1.0 1.00000000 0.83333333 0.84166667 0.84147098
From the table above, it is clear that as the terms of the Taylor series are added
incrementally, the accuracy improves as compared with the true values. This is specially
2
, @LECTJULIESOLUTIONSSTUVIA
true as the separation distance increases.
3
, @LECTJULIESOLUTIONSSTUVIA
Problem 1-5.
x2
ex 1 x .......
2!
For h = 0.1
x = x0 + h = 0 + 0.1 =
0.1
e(0.1) 1.00000000 (one term)
e (0.1) 1.0 0.1 (two terms)
1.10000000
(0.1) 2
e(0.1) 1.0 0.1 (three terms)
1.10500000
2
True value = 1.10517092
The following table summarizes the results for h = 0.1 to 1.0 in an increment of 0.1:
f (x 0+h ) f (x 0+h ) f (x 0+h )
x h True value
one term two terms three terms
0.1 0.1 1.00000000 1.10000000 1.10500000 1.10517092
0.2 0.2 1.00000000 1.20000000 1.22000000 1.22140276
0.3 0.3 1.00000000 1.30000000 1.34500000 1.34985881
0.4 0.4 1.00000000 1.40000000 1.48000000 1.49182470
0.5 0.5 1.00000000 1.50000000 1.62500000 1.64872127
0.6 0.6 1.00000000 1.60000000 1.78000000 1.82211880
0.7 0.7 1.00000000 1.70000000 1.94500000 2.01375271
0.8 0.8 1.00000000 1.80000000 2.12000000 2.22554093
0.9 0.9 1.00000000 1.90000000 2.30500000 2.45960311
1.0 1.0 1.00000000 2.00000000 2.50000000 2.71828183
From the table above, it is clear that as the terms of the Taylor series are added
incrementally, the accuracy improves as compared with the true values. This is specially
true as the separation distance increases.
Problem 1-
6. f ( x) = x 3 3x 2 5x f (2) = 16
10
f ' (2) = 5
f ' ( x) = 3x 2 6x 5
f '' (2) = 6
f '' ( x) = 6x 6
f ''' (2) = 6
f ''' ( x) = 6
f '''' (2) = 0
f '''' ( x) = 0
Referring to Eq. 1-1 in the textbook, the value of the function, f(x), can be approximated
by:
f(x0 + h) 16 + 5h + 3h2 + h3
where x0 = 2
For h = 0.1
4
, @LECTJULIESOLUTIONSSTUVIA
f(2.1) 16 (one term)
f(2.1) 16 + 5(0.1) = 16.5 (two terms)
f(2.1) 16 + 5(0.1) + 3(0.1) = 16.530
2 (three terms)
f(2.1) 16 + 5(0.1) + 3(0.1) + (0.1) = 16.531
2 3 (four terms)
The following table summarizes the results for h = 0.1 to 1.0 in an increment of 0.1:
5
, @LECTJULIESOLUTIONSSTUVIA
f (x 0+h ) f (x 0+h ) f (x 0+h ) f (x 0+h )
x h True
one term two terms three four
value
terms terms
2.1 0.1 16.0000 16.5000 16.5300 16.5310 16.5310
2.2 0.2 16.0000 17.0000 17.1200 17.1280 17.1280
2.3 0.3 16.0000 17.5000 17.7700 17.7970 17.7970
2.4 0.4 16.0000 18.0000 18.4800 18.5440 18.5440
2.5 0.5 16.0000 18.5000 19.2500 19.3750 19.3750
2.6 0.6 16.0000 19.0000 20.0800 20.2960 20.2960
2.7 0.7 16.0000 19.5000 20.9700 21.3130 21.3130
2.8 0.8 16.0000 20.0000 21.9200 22.4320 22.4320
2.9 0.9 16.0000 20.5000 22.9300 23.6590 23.6590
3.0 1.0 16.0000 21.0000 24.0000 25.0000 25.0000
From the table above, it is clear that as the terms of the Taylor series are added
incrementally, the accuracy improves as compared with the true values. This is specially
true as the separation distance increases.
Problem 1-
7. f ( x) = x 5 5x 4 x2 f (2) = -38
6
f ' ( x) = 5x 4 20x 3 2x f ' (2) = -76
f '' ( x) = 20x 3 60x 2 + f '' (2) = -78
2
f ''' ( x) = 60x 2 - 120x f ' '' (2) = 0
f '''' ( x) = 120x f '''' (2) = 120
120 f ''''' (2) = 120
f ''''' ( x) = 120
Referring to Eq. 1-1 in the textbook, the value of the function, f(x), can be approximated
by:
f(x0 + h) -38 - 76h - 39h2 + 5h4 + h5
where x0 = 2
For h = 0.1
f(2.1) -38 (one term)
f(2.1) -38 - 76(0.1) = -45.6 (two terms)
f(2.1) -38 - 76(0.1) - 39(0.1) = -45.990
2 (three terms)
f(2.1) -38 -76(0.1) - 39(0.1) + 5(0.1) = -45.98950
2 4 (four terms)
f(2.1) -38 -76(0.1) - 39(0.1) + 5(0.1) + (0.1) = -45.98949
2 4 5 (five terms)
The following table summarizes the results for h = 0.1 to 1.0 in an increment of 0.1:
6