Solutions to Exercises

Chapter 1
1.a) Root using Bisection Method: 1.8990
Root using Newton-Raphson Method: 1.8987
b) The C++ program to find a root using the Newton-Raphson method.


Chapter 2
1.a) The equation of a straight line through the data points given in Table 2.1, using least squares regression is:
f(x) = 0.258444x + 15.097505.
b) Find the:
i) Correlation coefficient = 0.314805
ii) Coefficient of determination = 0.099102
iii) Standard Error of Estimate = 7.697425
c)
i) No, the x and y values do not demonstrate a strong linear relationship. The correlation coefficient r is 0.314805, which is closer to 0 than it is to +1 or -1.
ii)The regression equation determined in part a) does not really describe the data given in Table 2.1 reasonably well, therefore A.


Chapter 3
1.a) The area under the curve of f(x) = x2 + 5x + 2 between the limits x = 0 and x = 2, using:
i)the trapezoidal rule with h = 0.2. is 16.68
ii)the Simpson's 1/3 rule with h = 0.2. is 16.67
b) The estimate from part a-ii) is more accurate. The Simpson's rule not only gives better accuracy than the Trapezoidal Rule for the same number intervals, but also converges faster than the Trapezoidal Rule. In fact, Simpson's Rule with n points provides the same order of accuracy as the Trapezoidal Rule with 2n points. In addition, Simpson's Rule uses 2nd-order approximations at each iteration, whereas the Trapezoidal Rule uses 1st-order approximations.
2. The step-size is the size of the interval used and is determined by taking the difference between the upper and lower limits and dividing this value by the number of sub-intervals. ie..
h = (b-a)/n where a and b are the upper and lower limits and n is the number of sub-intervals.
3. The derivative of the function f(x) = 4x2 + 6x - 2 using the following approximations, with x = 3 and step sizes of 0.2, 0.1, and 0.05 is:
a)
i)Forward Difference
Delta x xi xi+1 f(xi) f(xi+1) Delta y / Delta x
0.2 3 3.2 52 58.16 30.8
0.1 3 3.1 52 55.04 30.4
0.05 3 3.05 52 53.51 30.2
ii)The smaller the step-size, the more accurate is the estimate.
b)
i)Backward Difference
Delta x xi-1 xi f(xi-1) f(xi) Delta y / Delta x
0.2 2.8 3 46.16 52 29.2
0.1 2.9 3 49.04 52 29.6
0.05 2.95 3 50.51 52 29.8
ii)The smaller the step-size, the more accurate is the estimate
c)
i)Central Difference
Delta x xi-1 xi+1 f(xi-1) f(xi+1) Delta y / Delta x
0.2 2.8 3.2 46.16 58.16 30
0.1 2.9 3.1 49.04 55.04 30
0.05 2.95 3.05 50.51 53.51 30
ii)The smaller the step-size, the more accurate is the estimate
iii)The error is reduced by one-quarter (1/4) when the step-size is halved
4. The Central Difference approximation (C) method gives the best estimate.