add raw source
Tests / Hermetic test suite (push) Has been cancelled
Tests / Skill frontmatter validation (push) Has been cancelled

This commit is contained in:
김경종
2026-07-02 09:18:17 +09:00
parent 702f28a758
commit 6bca119e6c
2652 changed files with 54284 additions and 9 deletions
@@ -0,0 +1,285 @@
<!-- source-page: 601 -->
analysis, and stresses are not considered reliable if displacements are suspect. Analogously, in vibration analysis, mode shapes are not considered reliable if natural frequencies are suspect.
A postprocessor can usually display stress contours, which typically are smoothed, perhaps by working from nodal average stresses. Too much smoothing can make stresses appear more accurate than they really are. It may be preferable to avoid averaging between elements. For example, one may plot contours of the von Mises effective stress, element by element and without any averaging of stresses at nodes shared by elements. These contours may be plotted as “stress bands” [19.3] by designating equally spaced stress intervals, locating the areas of each element that fall into each interval, and using a different color to plot each interval. Typically, in an adequately refined mesh, the bands are slightly discontinuous across interelement boundaries but a global contour pattern is evident upon visual inspection. If no such global pattern is apparent, the mesh is too coarse. If the bands appear perfectly continuous, the mesh is finer than necessary. In Fig. 19.1-11a, discontinuities are probably too pronounced for the solution to be considered acceptable. In Fig. 19.1-11b, discontinuities are sufficiently small that the solution may be considered acceptable.
Stresses must not be averaged across a step change in modulus or a step change in thickness. Specifically, if $\epsilon_{t}$ is the mechanical strain tangent to a boundary between two different materials, then, in the absence of initial strains, the corresponding stress $\sigma_{t}$ is proportional to $E_{1}\epsilon_{t}$ on one side and to $E_{2}\epsilon_{t}$ on the other. And, if a bar has a step change in cross-sectional area from $A_{1}$ to $A_{2}$ and no load is applied at the step, axial stresses on either side of the step are in the ratio $A_{1}/A_{2}$ .
Mesh Refinement. A need for refinement of all or part of the mesh may be indicated by visual inspection of discontinuities in the stress bands just cited. Analogous numerical indices may be coded. As an example, consider a four-node plane element that is not very good at modeling bending. Strain energy $U_{0}$ per unit volume might be selected as a reference quantity, and the ratio of the greatest change in $U_{0}$ across the element to the value of $U_{0}$ at the element center taken as an index. If the value of this index exceeds a prescribed tolerance, either for individual elements or for a patch of elements, a need for refinement is indicated. A similar numerical test, not limited to low-order elements, could be based on changes in a reference quantity between adjacent elements.
![](images/page-601_04ff6c534657305b1a423445299cf11cde3db3dbcc6498076da70eaccbde79ef.jpg)
<details>
<summary>natural_image</summary>
Abstract geometric pattern with interlocking curved and angular shapes (no text or symbols)
</details>
(a)
![](images/page-601_efced564a903aa7093e984358cdffeb630964ea11041ba3e2d433d5bebf87594.jpg)
<details>
<summary>natural_image</summary>
Abstract black-and-white pattern with curved and angular shapes (no text or symbols)
</details>
(b)
Figure 19.1-11. Hypothetical stress bands in 3 by 3 patches of plane rectangular elements, representing solutions that are (a) probably inadequate, and (b) probably adequate.
<!-- source-page: 602 -->
If a model tends to be ill conditioned, further refinement may make results worse rather than better (see Table 18.4-1).
If refinement does little to change results, one has evidence (but not proof) that results are satisfactory. Similarly, if the mesh is already rather fine, one may try a coarser mesh, again to discover if there are significant changes. Analogously, in a response history analysis, one might see whether results are significantly changed by a change in the number of modes used in a modal method or by a change in the time step $\Delta t$ of direct integration.
Local Analysis. If localized mesh refinement is necessary, we need not reanalyze the entire structure with the local refinement imbedded in it. The portion of the structure that contains the refined mesh can be analyzed separately. It is loaded by whatever prescribed loads may be present and, along the boundary where it has been cut free of the rest of the structure, loaded by the displacements computed in the preceding analysis of the entire structure. If refinement adds nodes along this boundary, interpolation is needed to obtain the prescribed displacements of the added nodes.
In such an analysis, a correction may be advisable. Typically the original mesh is stiffer than the refined mesh. Therefore boundary displacements to be imposed on the local refinement may be underestimated, which results in underestimation of stresses in the local refinement. An ad hoc correction scheme is as follows. For the original local mesh and the refined local mesh, respectively, compute nodal loads $[K]\{D\}$ produced by prescribed boundary displacements $\{D\}$ . These loads, $\{R\}_{0}$ and $\{R\}_{r}$ , will differ because $[K]$ is changed by refinement. The ratio of their norms, $\|R_{0}\|/\|R_{r}\|$ , usually exceeds unity and can be used as an approximate corrective multiplier to stresses computed in the local refinement.
Vibrations and Dynamics. If the dynamic load includes frequencies of interest up to $\omega_{u}$ , then the mesh should be able to accurately represent modes associated with frequencies up to about $3\omega_{u}$ , and a mode superposition analysis should include frequencies up to about $3\omega_{u}$ . The time step $\Delta t$ in a direct integration analysis should be approximately $0.3/\omega_{u}$ or less, and must provide numerical stability if the integration method is conditionally stable. If a reduced basis is used for eigenvalue computations, there should be roughly four times as many master d.o.f. as eigenvalues to be accurately computed.
In direct integration there should be a match between the type of algorithm and the mass matrix; for example, lumped masses are best for an explicit algorithm. Abrupt changes in element size should be avoided, as such changes tend to produce spurious wave reflections and numerical noise.
Nonlinear Problems. Typically one must make many more trial runs in order to solve a nonlinear problem than to solve a linear problem. Not only must blunders be discovered and removed, but solution strategy must be guided by what is learned in preceding attempts. Here, much more than in linear problems, it is wise to start simply and not attempt the complete solution all at once. One might elect to solve a linear form of the problem first, then add nonlinearities one by one. Thus blunders are more easily discovered, the effect of each nonlinearity is more apparent, useful information is gained from each trial, and the risk of failure with a large, complicated, and expensive model is reduced [2.1].
Nonlinear analyses tend to be very expensive. It is therefore necessary that no
<!-- source-page: 603 -->
![](images/page-603_5fe4101dac2446f3bb9d66c064858404337996f90d7d9ab1350482322a7772cb.jpg)
<details>
<summary>text_image</summary>
P
</details>
Figure 19.1-12. Flat plate containing a large hole.
superfluous nonlinearities be introduced. For example, imagine that yielding near the edge of the hole in Fig. 19.1-12 is to be analyzed. It is likely that yielding will also appear at the point of load application and at the support points. Yielding at these points will be treated with due respect (and due expense) by the algorithm [19.14]. Perhaps these concentrated forces result from oversimplification of loads and supports. If so, or if yielding in these locations is indeed ignorable, one might prevent undesired yielding by assigning a high yield strength to elements adjacent to the concentrated loads.
Miscellaneous Perils. Carelessness or lack of adequate understanding can lead to puzzling or misleading results. If the problem involves vibration, buckling, or nonlinear behavior, then axisymmetric geometry and axisymmetric loads do not guarantee axisymmetric response: unless symmetry is known to prevail, it should not be imposed by choice of boundary conditions. A quarter-point element for crack analysis can be too large or too small: thus, mesh refinement may make results worse. Incompatible and underintegrated elements may display a dependence on Poisson's ratio in problems that should be independent of Poisson's ratio. Anisotropy adversely affects accuracy $[8.34]$ . If plane elements are warped so that element nodes are not all coplanar, results may be erratic and very sensitive to changes in the mesh $[19.4,19.5]$ . If convergence with mesh refinement is not monotonic, extrapolation of results from two different meshes may give a worse result than is given by either mesh. Imperfections of load, geometry, supports, and mesh may be far more important in a buckling problem than in a static problem. Buckling, collapse, and nonlinear analyses demand more expertise than static stress analysis.
Check the Results. Computed results should be checked for “self-consistency,” for example, by checking that intended supports do indeed have zero displacement and that any symmetries of the finite element model are represented in stress and displacement results. Computed results should be compared with whatever else is available that can be used for comparison. Examples include “back of the envelope” calculations, approximate analytical models, experimental data, textbook and handbook cases, preceding numerical analyses of similar problems, numerical analysis of a related but simpler problem, and results for the same problem predicted by a different program (which ideally should be based on a different numerical method). All these results should be regarded with some skepticism: analytical models incorporate idealizations, mistakes may be made in mathematics, textbooks and handbooks may contain errors, numerical solutions are subject to errors in coding and in data preparation, and experiments may be improperly performed and the results misinterpreted. When the inevitable disa-
<!-- source-page: 604 -->
greements appear, the reason for the discrepancy should be sought, and the amount of disagreement satisfactorily explained.
The time spent in processing and checking output should equal or exceed the time previously spent in data preparation. As with model preparation, an objective critique of the work should be obtained from a very competent analyst who is not directly involved with the project [19.14].
# 19.2 PROGRAMMING AND PROGRAMS
Programming. The writing of finite element programs is done by researchers and software vendors, who do so of necessity, and by students, who do so as an aid to learning. Those who use finite elements as a tool should buy or lease a program rather than write one. The few who write programs should do so in a way that makes the code easy to maintain and improve. These points are discussed in more detail later in this section.
Fortran is the language of all major finite element programs and is likely to remain so for the foreseeable future because of the large investment already made in Fortran software. (However, critical parts of a Fortran program may be coded in assembly language for the sake of efficiency.) Ideally, coding is guided by a previously prepared user's manual, in order to impose discipline on the developers and to produce a user-oriented product. The code should be built on a data base structure, and should be modular, that is, divided into logical subsets, each composed of one or more subroutines. The code should have mnemonic names for variables, monotonically increasing statement numbers, and adequate comment statements so that personnel other than the original programmer can read and maintain it. Much additional advice about good programming practice is available, especially in the computer science literature.
Dynamic Storage Allocation. Different problems require different amounts of computer memory, so it is inefficient to use fixed dimensions for arrays. Moreover, in different problems, the fractions of the total memory used by different phases of a single analysis run may differ. These difficulties are overcome by dynamic storage allocation, in which the dimensions of arrays are set at the time of execution. This procedure is common in finite element programs, but is often unfamiliar to the student. It is explained as follows.
In Fig. 19.2-1, array A contains most of the storage space to be used by the program. Various subroutines will use this same space but call it by other names. Imagine that Subroutine INPUT is to use one-dimensional arrays X and Y, which must each contain NUMNP entries, and the two-dimensional array ID, which must contain NDOF rows and NUMNP columns. The “pointers” N1, N2, and N3 identify the starting addresses in array A for arrays X, Y, and ID, respectively. $^{1}$ In Subroutine INPUT we find the statements
SUBROUTINE INPUT (X,Y,ID,NUMNP,NDOF)
DIMENSION X(1), Y(1), ID(NDOF, 1)
'When both real and integer quantities appear in blank common, the compiler must assign the same word length to reals and integers if the addressing is to work properly.
<!-- source-page: 605 -->
```txt
COMMON A(15000)
LIM = 15000
C ----(STATEMENTS NOT ESSENTIAL TO THIS EXAMPLE OMITTED HERE)
N1 = 1
N2 = N1 + NUMNP
N3 = N2 + NUMNP
N4 = N3 + NUMNP*NDOF - 1
IF (N4 .GT. LIM) CALL ERROR (N4)
CALL INPUT (A(N1), A(N2), A(N3), NUMNP, NDOF)
C ----(STATEMENTS NOT ESSENTIAL TO THIS EXAMPLE OMITTED HERE)
N1 = 1
N2 = N1 + NEQ*MBAND
N3 = N2 + NEQ - 1
IF (N3 .GT. LIM) CALL ERROR (N3)
CALL BUILD (A(N1), A(N2), NEQ, MBAND)
C ----(STATEMENTS NOT ESSENTIAL TO THIS EXAMPLE OMITTED HERE)
END
```
Figure 19.2-1. Hypothetical main routine that uses dynamic dimensioning. Subroutine ERROR (not shown) terminates execution if the problem is too large.
Arrays X, Y, and ID are stored in consecutively addressed cells of blank common. Since starting addresses have already been defined, it is not necessary to state the actual array size; this explains the 1's used in the dimension statement. Array ID is stored by columns, so that the address in blank common of ID(M,N) is N3 + NDOF\*(N-1) + M-1. Thus the dimension statement must say ID(NDOF,1) rather than ID(1,1), so that the background bookkeeping can locate the proper address. $^{2}$ (For a three-dimensional array, the first two dimensions must be provided; only the third can be 1.)
Later in the program, imagine that arrays X, Y, and ID have been stored elsewhere—for example, on a disk file. The memory space they occupied is now available for other use. In Fig. 19.2-1 we imagine that the space is now to be used to store the structure stiffness matrix S and load vector R. Accordingly, new pointers are computed. In Subroutine BUILD we find the statements
# SUBROUTINE BUILD (S,R,NEQ,MBAND) DIMENSION S(NEQ,1),R(1)
To change the capacity of the entire program, we change only the first two statements in Fig. 19.2-1, which necessitates recompiling only one subroutine.
Documentation. The quality of documentation is of major concern, whether we must prepare it or must read it in order to use a program. Unfortunately, documentation is often difficult to use, perhaps because it is often written by people so familiar with the program that they are unable to take the user's viewpoint. It is safest to assume when preparing documentation that most users know nothing about the program and that the remainder will often overlook what is obvious to the programmer. Good documentation is expensive to write and to maintain, but it is important: a good program may fail in the marketplace if its documentation is unreadable, and a useful program may be abandoned if its documentation does not keep up with program changes and enhancements [19.6,19.7].
A general-purpose commercial finite element program is accompanied by thou-
$^{2}$ Some compilers have an option that checks subscripts in executable statements against array bounds in DIMENSION statements. A logic error will then be signaled. To avoid this signal one can disable the checking option or replace each 1 in the foregoing DIMENSION statement by NUMNP.
<!-- source-page: 606 -->
sands of pages of documentation, typically divided as follows: theoretical manual (describes the analytical basis and limitations of algorithms), user's manual (describes available elements and data preparation), example problems manual (describes test cases, showing input data, output data, and comparison with theory), and programming or systems manual (describes computer science topics, incomprehensible to most engineers). More recent developments are introductory handbooks, which describe a simple and often-used subset of the program; online interactive help, which provides instant explanation of a command or an error message; and videotapes, which offer training lectures on aspects of program use [19.7].
Desirable features in documentation, not always present, include the following: index, nomenclature, table of elements, summary description of element behavior, estimates of timing and cost, modeling suggestions, glossary of errors and error messages, limitations of major algorithms, and lists of element quirks and frequently made errors [19.7]. At worst, a manual tersely explains acronyms in terms of other acronyms, so that making use of its information resembles trying to determine the function of an unfamiliar machine by reading its parts list.
Before buying an expensive program, it is wise to read some of its manuals. Documentation can usually be purchased separately from software, and far more cheaply.
Costs. The computational expense of a finite element analysis varies widely. At one extreme, when the computation is done on a personal computer that would otherwise be idle, the expense is almost zero. Toward the other extreme, when a large nonlinear problem occupies most of a day's running time on a supercomputer, the expense approaches an engineer's annual salary. Overall, hundreds of millions of dollars are spent each year on finite element modeling and computer costs.
Similarly, the cost of writing a program varies widely (but is usually high). In one study of programming efficiency, each of several programmers with from 2 to 11 years of experience coded a logic problem. The ratio of best to worst was 25/1 for coding time, 5/1 for code size, and 13/1 for running time. There was no correlation between productivity and experience [19.8]. Another study covered more than 400 military software projects that lasted from 1 month to 8 years in length and involved from 2 to 200 people at a time. Time expended on design, coding, testing, and documentation was included in the study. Productivity was measured in lines of code per person per month, which we abbreviate here as “lines.” Average productivity over the life of each project ranged from 5 to 5000 lines. Average productivity over all projects was 200 lines, with two-thirds of the projects having average productivities between 75 and 550 lines [19.9]. From these data, we conclude that it rarely makes sense to write a program if one can be purchased or leased instead.
After release of a software system, it must be maintained. Bugs must be corrected and enhancements added to keep the program alive in the marketplace. Over the lifetime of a significant software system, maintenance costs far exceed development costs.
Programs for engineering are far outsold by programs for business. Yet the programs for engineering cost much more to develop, maintain, and support [19.10]. Programs for personal computers are proliferating, however no new major software system has entered the market for many years. This is no surprise when
<!-- source-page: 607 -->
TABLE 19.2-1. CHARACTERISTICS OF STRUCTURAL MECHANICS SOFTWARE [19.11]. K = MULTIPLIER OF 1000.
<table><tr><td>Type of Program</td><td>Single Element Static</td><td>Multiple Element Static</td><td>Large General Purpose</td></tr><tr><td>Number of statements</td><td>5002000</td><td>2K10K</td><td>100K600K</td></tr><tr><td>Development $cost^a$ </td><td>$5K$50K</td><td>$25K$200K</td><td>$2000K$10,000K</td></tr><tr><td>Pages of documentation</td><td>20100</td><td>50500</td><td>20007000</td></tr><tr><td>Machine words needed</td><td>10K30K</td><td>20K50K</td><td>50K150K</td></tr><tr><td>Diagnostics</td><td>fewmoderate</td><td>fewmoderate</td><td>extensive</td></tr><tr><td>Cost per $run^a$ </td><td>$1$100</td><td>$1$500</td><td>$10$10K</td></tr></table>
"When this table was written, a graduating engineer started work at roughly \$1000 per month.
one considers the high start-up costs (Table 19.2-1). Furthermore, even with a quality product, the entrepreneur must persevere for years, and incur additional costs that may exceed the development costs, in order to penetrate a reluctant market: users develop loyalties to software with which they are familiar and tend to be oblivious to other options. User suspiciousness is not without foundation. Unless there is good reason to believe that software will be supported for many years, one cannot justify the expense of acquiring it or the much higher expense of developing competence in its use.
Some programs of quality are available cheaply, usually because they are of limited scope or because no commitment of maintenance or user support is supplied with the program. Examples include certain versions of the BOSOR programs for thin shells of revolution and certain versions of the SAP program for linear static and dynamic structural analysis.
Commercial Programs. Hundreds of finite element programs are available, from small to large. Large general-purpose analysis systems share the following traits [19,12].
Generality. Many element types are provided, so that almost any conceivable structure, supports, and boundary conditions can be treated. Linear problems of statics are certainly included; linear dynamics and heat transfer are almost certain to be included. Certain nonlinear capabilities, magnetics, or other special features are probably included.
Large Size. The source code (not available to the user) comprises 100,000 to 600,000 statements and is the result of a development effort of from fifty to several hundred man years.
Worldwide Distribution. The system is installed at tens or hundreds of locations in various countries.
Large User Community. There are thousands of users in industry, data centers, consulting firms, research establishments, and universities.
User Support. In addition to documentation, the vendor offers hotline support, consulting, training courses, user conferences, and newsletters.
Portability. The program is available on a variety of machines, from supercom-
<!-- source-page: 608 -->
puters to minicomputers. Some versions of the program may be available on personal computers.
Maintenance. Updated versions of the program are released every year or two. Each new release is thoroughly tested, so that few bugs remain.
In choosing a software vendor, companies may compile a list of candidates by study of industry journals and by talking with associates at other companies. The list is shortened by discarding products that do not meet the company's needs, seem either overpriced or suspiciously inexpensive, or are new and untried. Programs that remain on the list are tested to see if the promotional claims are met and if the product will solve the company's everyday problems. The first program tested may stand out: if it is complex, others will not seem comprehensive enough; if it is comparatively easy to use, others will seem too difficult [19.10]. Probably none of the systems will be as easy to use as one might wish. For this reason service to the user is very important. A software vendor must support the product in order to survive amidst rising user expectations.
<!-- source-page: 609 -->
# MATRICES: SELECTED DEFINITIONS AND MANIPULATIONS
This appendix summarizes portions of matrix theory that are frequently used in finite element analysis. Symbols used are arbitrary and imply no particular physical meaning. Further explanation may be found in any of several references, for example [A.1].
Multiplication. Let [C] be the product [A][B] ([A] premultiplies [B]; [B] postmultiplies [A]). Then [C] is
$$
\underset {m \times q} {[ \mathrm{C} ]} = \underset {m \times n} {[ \mathrm{A} ]} \underset {n \times q} {[ \mathrm{B} ]} \quad \text { where } \quad C _ {i j} = \sum_ {k = 1} ^ {n} A _ {i k} B _ {k j} \tag {A.1}
$$
where i ranges from 1 to m and j ranges from 1 to q. Matrices [A] and [B] must be conformable for multiplication. That is, the number of columns in [A] must equal the number of rows in [B]. Fortran statements that accomplish the multiplication in Eq. A.1 are
$$
\mathrm{DO} 2 0 \mathrm{I} = 1, \mathrm{M}
$$
$$
D O 2 0 ^ {\cdot} J = 1, Q
$$
$$
\text { SUM } = 0.
$$
$$
D O 1 0 K = 1, N
$$
$$
1 0 \text { SUM } = \text { SUM } + A (I, K) * B (K, J)
$$
$$
2 0 \mathrm{C} (\mathrm{I}, \mathrm{J}) = \text { SUM }
$$
To accomplish the multiplication $[\mathbf{A}]^T [\mathbf{B}]$ (for which $[\mathbf{A}]^T$ and $[\mathbf{B}]$ must be conformable), one replaces $\mathsf{A}(\mathsf{l},\mathsf{K})$ by $\mathsf{A}(\mathsf{K},\mathsf{l})$ in statement 10.
The transpose of a product is the product of the transposes in reverse order, that is
$$
([ \mathbf {A} ] [ \mathbf {B} ]) ^ {T} = [ \mathbf {B} ] ^ {T} [ \mathbf {A} ] ^ {T} \tag {A.2}
$$
Linear Dependence. A set of vectors $\{\mathbf{v}\}_1, \{\mathbf{v}\}_2, \ldots, \{\mathbf{v}\}_n$ is linearly dependent if, for some $j$ ,
$$
\sum_ {i \neq j} \alpha_ {i} \{\mathbf {v} \} _ {i} = \{\mathbf {v} \} _ {j} \tag {A.3}
$$
where the $\alpha_{i}$ are scalars. For example, if $3\{\mathbf{v}\}_{2} + 4\{\mathbf{v}\}_{4} = \{\mathbf{v}\}_{5}$ , then vector 5 is linearly dependent on vectors 2 and 4, regardless of $n$ . Columns (or rows) of a matrix may be regarded as vectors; thus Eq. A.3 pertains to a matrix that has one or more linearly dependent columns (or rows).
Rank. Singularity. The rank of a matrix [A] is defined as the order of the largest nonzero determinant in [A]. An equivalent definition of rank is the maximum number of linearly
<!-- source-page: 610 -->
independent rows (or columns) in [A]. As examples, the following matrices have ranks 2, 2, and 1 respectively.
$$
\left[ \begin{array}{c c c} 1 & 3 & - 3 \\ 2 & 4 & - 2 \\ 3 & 5 & - 1 \end{array} \right] \quad \left[ \begin{array}{c c c c} 1 & - 1 & 0 & 2 \\ - 1 & 2 & - 1 & - 1 \\ 0 & - 1 & 1 & - 1 \end{array} \right] \quad \left[ \begin{array}{c c c} 2 & 4 & - 2 \\ 1 & 2 & - 1 \\ 3 & 6 & - 3 \end{array} \right]
$$
A matrix whose rank is less than its order is said to be rank-deficient. The rank of a null matrix is zero. A square matrix $[A] = \{a\}\{b\}^{T}$ has rank 1 or is null, regardless of order. A square matrix whose rank is less than its order is called singular. The rank of a matrix product is
$$
\operatorname{rank} ([ \mathbf {A} ] [ \mathbf {B} ]) \leq \min (\operatorname{rank} [ \mathbf {A} ], \operatorname{rank} [ \mathbf {B} ]) \tag {A.4}
$$
Quadratic Forms. If [A] is a real square matrix and $\{\mathbf{x}\}$ is a real vector of the same order, then scalar $F$ is called a quadratic form, where
$$
F = \{\mathbf {x} \} ^ {T} [ \mathbf {A} ] \{\mathbf {x} \} \tag {A.5}
$$
Now imagine that we calculate all possible values of $F$ as follows. Let coefficients $x_{i}$ in $\{x\}$ be allowed to assume independently any and all real values except for all $x_{i}$ simultaneously zero. Then matrix [A] is called
positive definite if $F > 0$ for all $\{\mathbf{x}\}$
positive semidefinite if $F \geq 0$ for all $\{\mathbf{x}\}$
negative semidefinite if $F \leq 0$ for all $\{\mathbf{x}\}$
negative definite if $F < 0$ for all $\{\mathbf{x}\}$
and simply indefinite if $F$ can be either positive or negative. For example, the following two matrices are respectively positive definite and positive semidefinite:
$$
\left[ \begin{array}{c c} 1 & - 1 \\ - 1 & 2 \end{array} \right] \quad \left[ \begin{array}{c c} 1 & - 1 \\ - 1 & 1 \end{array} \right]
$$
If a square matrix is positive definite or negative definite, it is also nonsingular.
Differentiation. Differentiation of a matrix is accomplished by differentiating each of its terms. For example, if $\lfloor x \rfloor = \lfloor 1 - y \rfloor$ , then $d\lfloor x \rfloor / dy = \lfloor 0 - 1 \rfloor$ .
Let $\{\mathbf{x}\} = \left\lfloor x_1, x_2, \ldots, x_n\right]^T$ and let [A] be an arbitrary $n$ by $n$ square matrix that does not depend on the $x_i$ . Suppose that the quadratic form
$$
\phi = \frac {1}{2} \{\mathbf {x} \} ^ {T} [ \mathbf {A} ] \{\mathbf {x} \} \tag {A.6}
$$
is to be differentiated with respect to each of the $x_{i}$ . The result is conveniently stated as a vector,
$$
\left\{\frac {\partial \phi}{\partial \mathbf {x}} \right\} = \left\lfloor \frac {\partial \phi}{\partial x _ {1}} \quad \frac {\partial \phi}{\partial x _ {2}} \quad \dots \quad \frac {\partial \phi}{\partial x _ {n}} \right\rfloor^ {T} = \frac {1}{2} ([ \mathbf {A} ] + [ \mathbf {A} ] ^ {T}) \{\mathbf {x} \} \tag {A.7}
$$
as may be verified by writing $\phi$ in terms of the $x_{i}$ and the $A_{ij}$ , taking the derivatives, and gathering terms. If [A] is symmetric, then