• No se han encontrado resultados

Provoca un «¡así es!» empleando un resumen

In document Rompe la barrera del no (página 116-119)

glewood Cliffs, N.J., 1969.

7. K. Gallivan and R. Plemmons, “Parallel algorithms for dense linear algebra computations,”

SIAM Review, 32 (1990), pp. 54-135.

8. A. George and J. Liu, Computer Solution of Large Sparse Positive Definite Systems, Prentice Hall, Englewood Cliffs, N.J., 1981.

9. G. Golub and C. Van Loan, Matrix Computations, 2nd ed., The Johns Hopkins University Press, Baltimore, M.D., 1989.

10. L. A. Hageman and D. M. Young, Applied Iterative Methods, Academic Press, Orlando, Fla., 1981.

11. N. Higham, Accuracy and Stability of Numerical Algorithms, SIAM, Philadelphia, 1996. 12. B. Noble, Applications of Undergraduate Mathematics in Engineering, Macmillan, New York,

1967.

13. B. Noble and J. Daniel, Applied Linear Algebra, 3rd ed., Prentice Hall, Englewood Cliffs, N.J., 1988.

14. R. Skeel, “Iterative refinement implies numerical stability for Gaussian elimination,” Math.

Comp., 35 (1980), pp. 817-832.

15. J. Wilkinson, The Algebraic Eigenvalue Problem, Oxford University Press, Oxford, England, 1988.

MISCELLANEOUS EXERCISES FOR CHAPTER 2

2.20 A finite element analysis of a certain load bearing frame yields the stiffness equa- tions

where α = 482,317., β = 2,196.05, and γ = 6,708.43. Here x1, x2, x3 are the lat-

eral and x4, x5, x6 the rotational (three-dimensional) displacements corresponding

to the applied force (the right-hand side). (a) Solve for x.

(b) How reliable is the computation? First assume exact data, then 5 × 10-7.

2.21 Wang (Matrix Methods of Structural Analysis, International Textbook Company, Scranton, Pa., 1966) considers a statically indeterminate pin-jointed truss. With this problem is associated a statics matrix A that defines the configuration of the framework, a member stiffness matrix S that relates the elastic properties of the constituent members, and an external force vector p that describes the applied forces at the joints. A displacement vector bfx that accounts for the displacement

2.22

at each degree of freedom and an internal force vector f acting on each member satisfies

For one example

The matrix S has all zero entries except along the diagonal where the entries are {4800: 10000, 4800, 10000, 10000, 10000, 3000, 4800, 4800, 3000}. Write a program to form matrix products and determine the elements of K. Solve for x using the three p vectors

Find the corresponding vectors f.

This exercise assumes a familiarity with matrix multiplication. An appropriate organization of Gaussian elimination as in Factor/Solve makes it efficient to solve systems of equations with different right-hand sides but the same coefficient ma- trix A. It is more complicated to deal with changes in A, but a formula called the Sherman-Morrison formula makes it possible to deal with certain modifications efficiently. Assume that we have already factored A into LU and we want to solve ( A + uvT)x = b for given column vectors u, v, and b. Show that this can be done

by first solving AZ = u and Ay = b, then forming

A proper choice of u and v handles the change of one row or one column of A. For example, if row i of A is to be changed by adding to it a given row vector vT,

just take the column vector u to be zero in all entries except the ith, which is 1. (a) How do you change column j in A so as to add a given column vector u ? (b) How do you choose u and v in order to change aij into aij + δ?

MISCELLANEOUS EXERCISES 81

(c) A change in A may make it singular. How would this be revealed when using the Sherman-Morrison formula? Note that this approach may not be an accurate way to solve for x when A is poorly conditioned because the elimination is done on A. Still for small changes to A, the accuracy should be acceptable and this is an inexpensive way to study the effect of changes to the data of A.

2.23 Occasionally it is desirable to compute the determinant of a matrix A with n rows and columns. Using the factorization PA = LU discussed in Section 2.2, it can be shown that

detA = (-1)number of row interchanges × product of pivots. In terms of the output from Factor (FORTRAN version) this is

detA = PVTIDX(n) * A(l,1) *···* A( n,n). In the C or C++ versions this would be

detA = pivot_index[n - l] * a[0] [0] * ··· * a[n - l] [n - l]. Use this formula to compute the determinant of

(a) A in Exercise 2.13 and (b) the matrix in Exercise 2.15.

INTERPOLATION

Often we need to approximate a function f(x) by another “more convenient” function F(x). This arises in physical processes where f(x) is known only through its values at certain sample points x and F(x) is needed to approximate maximum or minimum values, to estimate integrals or derivatives, or merely to generate values for f(x) at points where experimental data are not available. This also arises when f(x) is known but is difficult to evaluate, integrate, or differentiate. A familiar example is the function f(x) = sinx that has to be approximated in a way that can be evaluated by calculators and computers. This is a fundamental principle of numerical analysis: if we cannot carry out a basic computation with the function of interest, we approximate it by a function for which we can do the computation.

In this chapter a function f(x) is approximated by an interpolant F(x), a function that agrees with f(x) at certain points. A formal definition of the verb interpolate is as follows.

Definition. interpolation: A function F(x) is said to interpolate f(x) at the points {xl, . . . ,xN) if

F(xj) = f(xj), j = 1,2 ,..., N.

The process of constructing such a function F(x) is called interpolation.

There are many types of approximating functions F(x) and which one to use de- pends to a large extent on the nature of the data and the intended use of the approxima- tion. Perhaps the simplest approximating functions are polynomials. It can be shown that any continuous function can be approximated arbitrarily well over a finite inter- val by a polynomial. More to the point, polynomials and their ratios (called rational functions) are the only functions that can be evaluated directly on a computer. For this reason polynomials are used not only for interpolation but also as a foundation for most of the methods in the remaining chapters of the book. Polynomial splines, that is, piecewise polynomial functions, are a very powerful tool for approximating functions and are the main object of study in this chapter. In many applications the appearance of the graph of F(x) is of great importance. For this reason it is very helpful to have a graphing package for visualization of the approximating functions derived in this chapter.

3.1 POLYNOMIAL INTERPOLATION 83

For a more thorough treatment of the theory of polynomial interpolation see [15, Chapters 5 and 6] and for more about approximation theory see [4]. The book [3] is an excellent introduction to polynomial splines and contains many FORTRAN codes.

3.1 POLYNOMIAL INTERPOLATION

In this section the approximation F(x) is a polynomial and it is traditional to use the notation PN instead of F. The interpolation problem, formally stated, is as follows. Given the ordered pairs (xj,fj) for j = 1,2,. . . , N, where each fj = f(xj) for some probably unknown function f(x),

find a polynomial PN(x) such that PN(xj) = fj, 1 < j < N.

What degree should PN have? A polynomial of degree N - 1,

(3.1) PN(x) = c1 + c2x + c3x 2 + ··· + cNx N-1 ,

has N free parameters, the coefficients ck. Since the polynomial must satisfy conditions

at N points xj, called interpolating points or nodes, we might expect to need this

many parameters to satisfy the conditions. In an exercise you are asked to show by example that if the interpolating polynomial is allowed to be of degree N or higher, there are many polynomials satisfying the interpolation conditions. It is easy to show by example that if the degree is less than N - 1, it may not be possible to satisfy all the conditions. Degree N - 1 is just right; with this degree there is always a solution to the interpolation problem and only one.

In document Rompe la barrera del no (página 116-119)