Professional Documents
Culture Documents
(*** solve in class ***)
Apply Cholesky decomposition to the symmetric matrix
6 15 55 a 0 152.6
15 55 225 a 585.6
1
55 225 979 a 2 2488.8
In addition to solving for the Cholesky decomposition, employ it to solve for the a’s.
i 1
aki lij lkj k 1
akk lkj2
j 1
lki for i 1,2, , k 1 lkk
lii j 1
l11 6 2.449
15
l21 6.1237
2.449
55
l31 22.454
2.449
225 6.1237(22.454)
l32 20.92
4.18
The solution can then be generated by first using forward substitution to modify the right-
hand-side vector,
[ L]{D} {B}
62.3
{D} 48.8
11 .37
[ L]T { X } {D}
2.48
{X } 2.36
1.86
Chapter 17, Problem 5.
x 6 7 11 15 17 21 23 29 29 37 39
y 29 21 29 14 21 15 7 7 13 0 3
Along with the slope and the intercept, compute the standard error of the estimate and the
correlation coefficient. Plot the data and the regression line. If someone made an
additional measurement of (x = 10, y = 10), would you suspect, based on a visual
assessment and the standard error, that the measurement was valid or faulty? Justify your
conclusion.
y = a 0 + a 1x
At x = 10, the best fit equation gives 23.2543. The line and data can be plotted along with the
point (10, 10).
The value of 10 is nearly 3 times the standard error away from the line,
Thus, we can tentatively conclude that the value is probably erroneous. It should be noted that
the field of statistics provides related but more rigorous methods to assess whether such
points are “outliers.”
Chapter 17, Problem 8 (*** solve in class ***)
Fit the following data with (a) a saturation-growth-rate model, (b) a power equation, and (c) a
parabola. In each case, plot the data and the equation.
x 0.75 2 3 4 6 8 8.5
y 1.2 1.95 2 2.4 2.4 2.7 2.6
x 1 3 x 1 1 3 1
y 3 *
Saturation Growth: 3 x y 3x y 3 3 x
1 1 1
(a) We regress 1/y versus 1/x to give a 0 a 1 0.34154 0.36932
y x x
Therefore, 3 = 1/a0 = 1/0.3415 = 2.9279 and 3 = a1*3 = 0.3693 *2.9279 = 1.0813, and the
saturation-growth-rate model is
x x
y 3 2.9279
3 x 1.0813 x
y 1.4233x 0.3114
Equations to be solved:
n
x x i
2
i
a0 y i
xi x x a1 xi yi
2 3
i i
xi2 x x 3 4 a2 xi2 yi
i i
f 2 ( x)
x x1 x x2 f ( x )
x0 x1 x0 x 2 0
x x0 x x2 f ( x )
x1 x0 x1 x 2 1
x x0 x x1 f ( x )
x2 x0 x2 x 1 2
18.1
Estimate the common logarithm of 10 (log 10) using linear interpolation.
x0 = 8 f(x0) = 0.90309
x1 = 9 f(x1) = 0.95424
x2 = 11 f(x2) = 1.04139
x3 = 12 f(x3) = 1.07918
x0 = 8 f(x0) = 0.9031
x1 = 12 f(x1) = 1.0792
10 12 10 8
f1 (10) 0.9031 1.0792 0.991
8 12 12 8
x0 = 9 f(x0) = 0.95424
x1 = 11 f(x1) = 1.04139
10 11 10 9
f1 (10) 0.95424 1.04139 0.9978
9 11 11 9
18.2:
Fit a second-order Lagrange polynomial to estimate log 10 using the data from Prob. 18.1 at
x = 8, 9, and 11.
x0 = 8 f(x0) = 0.90309
x1 = 9 f(x1) = 0.95424
x2 = 11 f(x2) = 1.04139
18.3:
Fit a third-order Lagrange polynomial to estimate log 10 using the data from Prob. 18.1
x0 = 8 f(x0) = 0.90309
x1 = 9 f(x1) = 0.95424
x2 = 11 f(x2) = 1.04139
x3 = 12 f(x3) = 1.07918
Chapter 18, Problem 8.
Employ inverse interpolation using a cubic interpolating polynomial and bisection to determine
the value of x that corresponds to f (x) = 0.23 for the following tabulated data:
x 2 3 4 5 6 7
f (x) 0.5 0.3333 0.25 0.2 0.1667 0.1429
x0 = 3 f(x0) = 0.3333
x1 = 4 f(x1) = 0.25
x2 = 5 f(x2) = 0.2
x3 = 6 f(x3) = 0.1667
The roots problem can then be developed by setting this polynomial equal to the desired
value of 0.23
Bisection can then be used to determine the root. Using initial guesses of xl = 4 and xu = 5, the
first five iterations are
i xl xu xr f(xl) f(xr) f(xl)f(xr) a
1 4.00000 5.00000 4.50000 0.02000 -0.00811 -0.00016 11.11%
2 4.00000 4.50000 4.25000 0.02000 0.00504 0.00010 5.88%
3 4.25000 4.50000 4.37500 0.00504 -0.00174 -0.00001 2.86%
4 4.25000 4.37500 4.31250 0.00504 0.00160 0.00001 1.45%
5 4.31250 4.37500 4.34375 0.00160 -0.00009 0.00000 0.72%
Chapter 21, Problem 4.
Integrate the following function analytically and using the trapezoidal rule,
with n = 1, 2, 3, and 4:
x 2 / x
2 2
dx
1
Use the analytical solution to compute true percent relative errors to evaluate the accuracy of
the trapezoidal approximations.
Chapter 21, Solution 4.
Analytical solution:
2
2 x3 4
1
( x 2 /x ) 2 dx
3
4 x 8.33333
x 1
99
For (n=1): I = ( 2 1) 9 t = (9 - 8.33333)/8.33333 = 8 %
2
n Integral t
1 9 8%
2 8.513889 2.167%
3 8.415185 0.982%
4 8.379725 0.557%
Let’s apply Richardson’s Extrapolation to these results and see what kind of improvement we get
for the error:
4 1 16 1
I Im Il I Im Il
3 3 15 15
Chapter 13, Problem 9.
Employ the following methods to find the maximum of the function
f x x 4 2 x 3 8x 2 5x
(a) Golden-section search ( xl 2 , xu 1 , s 1% ).
(c) Newton’s method ( x0 1 , s 1% ).
(a) First, the golden ratio can be used to create the interior points,
5 1
d (1 ( 2)) 1.8541
2
x1 2 1.8541 0.1459
x 2 1 1.8541 0.8541
f ( x2 ) f ( 0.8541) 0.8514
f ( x1 ) f (0.1459) 0.5650
Because f(x1) > f(x2), the maximum is in the interval defined by x2, x1 and xu where x1
is the optimum. The error at this point can be computed as
1 (2)
a (1 0.61803) 100% 785.41%
0.1459
f " ( x ) 12 x 2 12 x 16
4 xi3 6 xi2 16 xi 5 9
xi 1 xi 1 0.4375
12 xi2 12 xi 16 16
which has a function value of 0.787094. The second iteration gives –0.34656, which
has a function value of 0.840791. At this point, an approximate error can be computed
as a = 128.571%. The process can be repeated, with the results tabulated below:
Thus, within three iterations, the result is converging on the true value of
f(x) = 0.840794 at x = –0.34725.