

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Numerical Computing F’05 A. Kapila Sample problems for Test II
(b) Consider the system (^) [ 1 1 1
x 1 x 2
i. Solve this system by Gaussian elimination without pivoting. Show all steps. (Only carry out the minimum number of operations; do not simplify. For example, if your answer is a quotient involving the quantity 1/ in the numerator and the denominator, do not simplify by multiplying throughout with . ) ii. Suppose that = 10−^8 and that you are computing on a normalized decimal machine with 6-digit precision. What answers will the machine give for x 1 and x 2? iii. Repeat parts (i) and (ii) above, but now use pivoting. iv. Determine the exact solution for = 10−^8. Find the relative errors in the computation of x 1 and x 2 for each of the two cases above. What conclusion do you draw about the merit of pivoting?
x + y + z = 3 , x^2 + y^2 + z^2 = 5 , ex^ + xy − xz = 1.
(a) Explain how the solution to such a system is found by using Newton’s method. (b) Starting with the initial guess x = 1, y = 0, z = 0, find the next iterate by using Newton’s method. (c) Would x = 0, y = 1, z = 1 have been a good guess? If not, then why not?
(− 1 , 1), (0, 2), (1, −1).
Also write down the equations whose solution will determine the unknown coefficients appearing in the interpolant, but do not solve these equations. (b) Suppose one seeks a spline of degree 4 to interpolate n data points. i. How many coefficients does the spline have? ii. What continuity conditions must one apply at the knots (internal data points)? iii. How many extra conditions are needed at the end points for a unique determination of the spline? (c) Use the Newton basis to find the polynomial interpolant for the data in part (a) above. Repeat the computation if an additional data point (2, 3) is supplied. Explain why the Newton approach is preferable to the Lagrange approach in this situation.
∫ (^) b a f^ (x)^ dx. i. Under what conditions is I likely to be sensitive to small perturbations in f (x)? ii. Under what conditions is I likely to be sensitive to small perturbations in b?
(b) Would you expect a 10-point Newton-Cotes quadrature rule to work well for approximating the integral (^) ∫ 1
− 1
1 + 25x^2
dx?
Explain your answer. (c) Estimate the error incurred in approximating the integral ∫ (^1) / 2
0
xe−x^ dx
by the trapezoidal rule, QT. You are given that
h^3 12
f ′′(ξ), h = b − a, a < ξ < b.
|f (x) − F (x)| =
f ′′(ξ) 2
(x − xi)(x − xi+1)
− 1
f (x) dx
takes the form Qn =
∑^ n
i=
cif (xi),
where the xi are the nodes and the ci the corresponding weights. The nodes lie in the interval [− 1 , 1], and obey − 1 ≤ x 1 < x 2 < · · · < xn− 1 < xn ≤ 1.