You are on page 1of 264

A. I.

Beltzer

Variational and
Finite Element
Methods
A Symbolic Computation Approach

With 66 Illustrations

Springer-Verlag
Berlin Heidelberg NewYork
London Paris Tokyo Hong Kong
Professor Abraham 1. Beltzer
Holan Institute faT Technological Education
Affiliated with Tel Aviv University
Holan 58102, Israel

ISBN-13:978-3-642-839l6-0 e-ISBN-13: 978-3-642-83914-6


DOl: 10.1007/978-3-642-83914-6

Library of Congress Cataloging-in-Publication Data


Beltzer, A. I. (AbrahamI.), 1940-
Variational and finite element methods : a symbolic computation
approach I Abraham I. Beltzer.
Includes bibliographical references.
ISBN-13:978-3-642-83916-0 (U.S.)
1. Finite element method--Data processing. 2. Calculus of
variations--Data processing. 3. LISP (Computer program language)
I. Title.
TA347.F5B45 1990
This work is subject to copyright. All rights are reserved, whether the whole or part of the
material is concerned, specifically the rights oftranslation, reprinting, re-use of illustrations,
recitation, broadcasting, reproduction on microfilms or in other ways, and storage in data
banks. Duplicationofthis publication or parts thereofis only permitted under the provisions
of the German Copyright Law of September 9, 1965, in its version of June 24, 1985, and a
copyright fee must always be paid. Violations fall under the prosecution act of the German
Copyright Law.
© Springer-Verlag Berlin Heidelberg 1990
Softcover reprint of the hardcover 1st edition 1990
The use of registered names, trademarks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the relevant protective
laws and regulations and therefore free for general use.
Typesetting: Thomson Press India Ltd.;

2161/3020 5 4 3 2 1 0
Once again to
Dina, Ruth and Oma
Preface

The variational approach, including the direct methods and finite elements,
is one of the main tools of engineering analysis. However, it is difficult to
appreciate not only for seniors but for graduate students too. It is possible
to make this subject easier to understand with the help of symbolic manipulation
codes (SMC). The easiness with which these codes provide analytical results
allow for a student or researcher to focus on the ideas rather than on calculational
difficulties. The very process of programming with SMC encourages appreciation
of the qualitative aspects of investigations. Saving time and effort, they enable
undergraduates to deal with the subjects generally regarded as graduate courses.
There is a habitual aspect too. These days it is more convenient for a student
(researcher) to work with a keyboard than with a pencil. Moreover, semantic
features of the codes may allow for generalizations of the standard techniques,
which would be impossible to achieve without the computer's help.
One could argue that the use of SMC would prevent a good command of
calculational techniques. Note that the primary task of engineering schools is to
provide the technological, not the computational knowledge. It has recently been
realized that the overstress on mathematical approaches may have a damaging
effect, as far as engineering is concerned. The engineering students do need a
mathematical and calculational background. However, this must not be achieved
at the expense oftechnological disciplines. It would therefore be rational to use
expert systems at the final stage of undergraduate or duringgraduate studies,
thereby allowing the students to acquire the basic mathematical techniques in
their first years.
The book appears to be the first one which systematically resorts to an expert
system to present engineering subjects. It is about methods of engineering
analysis, not about expert systems. While the latter is an integral part ofthe text,
it is a tool, not a subject.
Chapter 1 presents basic information on SMC and relevant exercises. It does
not repeat the manuals available but focuses on the subjects which are
necessary for the subsequent analysis. Illustrative examples are given which deal
with the linear and non-linear vibrations. Chapter 2 deals with basic concepts
of variational calculus, Hamilton's principle and some of the optimization
VIII Preface

techniques, including an automatic derivation of the governing equations.


Both, discrete and continuous systems are considered. Examples treat pro blems
of elasticity and optimal aerodynamic shapes. The direct approach is given in
Chapter 3, which presents the methods of weighted residual, Rayleigh-Ritz and
others. The use ofSMC greatly facilitates calculations. Included are problems of
academic and technological interest, like analysis of shock-absorbers, flow
through a duct and temperature distribution in a plate. Eventually, the finite
element method is given in Chapter 4. The presentation is confined to a linear
theory and deals with the so-called displacement method. Problems given at the
end of the book provide a wide variation in the level of difficulty and extend
the scope.
There are two systems of notations in the book. One is a traditional system
based on English and Greek letters, while the other employs only English letters
supported by the symbolic manipulation code. The same quantity may be
designated, say, as Xa in the first case and Xa in the second. The text contains
relevant explanations.
There is little doubt that symbolic computation will become common in the
near future and will change the face of engineering analysis. Curiously enough,
computers and human intellect, which earlier brought about the overstress
in the use of discrete, numerical methods, will now help to restore the equili-
brium between these and analytical methods. This promises to be
particularly fruitful.
It has been a real pleasure writing this book. Also Mrs Rachelle Schmidt-
Barad often surprised me with her high quality typing, and my students by
their unlimited preparedness to investigate and think.
Contents

I Symbolic Manipulatiou Codes .... 1


1.1 Notions of LISP and Expert Systems 1
1.2 First Sessions . . 2
1.3 Matrices ..... . 8
1.4 Solving Equations . 11
1.5 Limits and Expansions . 15
1.6 Integration . . . . . . 16
1.7 Some Useful Commands and Options. Pattern Matching 21
1.8 Conditionals, Iterations and Compound Statements . 24
1.9 Few Hints ............ . 26
1.10 Example: Steady-State Linear Vibrations 27
1.11 Example: Transient Vibrations . . . . 33
1.12 Example: Free Nonlinear Vibrations 36
1.13 Example: Forced Nonlinear Vibrations 40

n Variational Approach and Equations of Motiou . 44


2.1 Mechanics of a Particle . . . . . 44
2.2 System of Particles. Generalized Coordinates 46
2.3 Functional and its Euler-Lagrange Equation 47
2.4 Hamilton's Principle for Discrete Systems 49
2.5 Constrained Motions .. . . . . 51
2.6 Virtual Work . . . . . . . . . . . .. 53
2.7 D'Alembert's Principle. Nonconservative Systems. 53
2.8 Transition to Continuous Systems . . .. 56
2.9 Hamilton's Principle for Continuous Systems, Part I . 57
2.10 Hamilton's Principle for Continuous Systems, Part n 59
2.11 Minimum of Potential Energy.
Imposed and Natural Boundary Conditions. . .. 61
2.12 Computer-generated Governing Equations . . . . . 63
2.13 Single Degree of Freedom . ... . . . 64
2.14 Two Degrees of Freedom. Double Nonlinear Pendulum . 67
2.15 Dynamic Shock Absorber 69
2.16 Continuous Systems.. .. 71
2.17 Automatic Generation, Part I 72
X Contents

2.18 Automatic Generation, Part II . . . . . . . 73


2.19 Second Variation and Nature of Extreml:im . 75
2.20 Legendre's Condition . . . . . . . . . . . 77
2.21 Transversality Conditions . . . . . . . . . 79
2.22 Generalizations and Transformations of Variational Problems 80
2.23 Minimum Pressure Drag. . . . . . . 83
2.24 Constrained Minimum Pressure Drag 86

III Direct Methods . . . . . . . . . . . . . . 89


3.1 The Philosophy . . . . . . . . . . . 89
3.2 The Method of Least Squares. Trial Functions 91
3.3 Beam on Elastic Foundation, Part I. . 93
3.4 Beam on Elastic Foundation, Part II . 95
3.5 The Bubnov-Galerkin Method . . . . 96
3.6 Beam on Elastic Foundation, Part III . 97
3.7 The Rayleigh-Ritz Method. 99
3.8 Master Program . . . . . . 101
3.9 Applications........ 103
3.10 Improved Master Program . 104
3.11 Considerations of Accuracy 106
3.12 Plate on Elastic Foundation 108
3.13 Further Investigations of Plates 111
3.14 Other Direct Methods . . . . . 114
3.15 Shock Absorber, Preliminary Considerations 117
3.16 Shock Absorber, Program and Results 120
3.17 Flow Through a Duct . . . . . . . . . . . 123
3.18 Temperature Field in a Plate, Part I 126
3.19 Temperature Field in a Plate, Part II . . . . 127
3.20 Free Vibrations by the Rayleigh-Ritz Method 130
3.21 Free Vibrations of a Non-uniform Beam . . 132
3.22 Master Programm . . . . . . . . . . . . . 133
3.23 Free Vibrations by gthe Bubnov-Galerkin Method 136
3.24 Nonlinear Vibrations by the Bubnov-Galerkin Method 139
3.25 Mathematical Considerations. Scalar Products of Functions 142
3.26 Operators and Functionals . . . . . . . . . . . 143
3.27 Symmetric and Positive Definite Operators . . . 145
3.28 Minimum Theorem and Minimizing Sequence . 146
3.29 Orthogonal and Linearly Independent Functions 148

IV Introduction to the Finite Element Method. . . . . . 150


4.1 Finite Elements. The Element Stiffness Matrix 150
4.2 Energy Analysis of a Finite Element . . . 155
4.3 Truss Element . . . . . . . . . . . . . 159
4.4 Physical Meaning of the Element Matrices 163
4.5 Global Reference Systems . . . . . . . . 167
4.6 Generalizations. Governing Equations of a Structure 171
4.7 Assembling......... 175
4.8 Formalization of Assembling. 181
4.9 Truss . . . . . . . . . . . 182
4.10 Further Analysis of a Truss . 187
Contents XI

4.11 Composite Beam . . . . . . . . . . . . . . . . . 191


4.12 Particular Cases . . . . . . . . . . . . . . . . . . 193
4.13 Automatic Generation of the Assembly Stiffness Matrix . 195
4.14 Optimization . . . . . . 199
4.15 Reduced Stiffness Matrix 201
4.16 Free Vibrations of Beams 204
4.17 Plate Element, Part I .. 208
4.18 Plate Element, Part II . . 211
4.19 Particular Cases. Batch Mode 214
4.20 Compatibility and Convergence 218
4.21 Natural Coordinate Systems . . 219
4.22 The Concept of Isoparametric Elements 225
4.23 Some Plane Elements 228
4.24 Concluding Remarks . . . . . . . . . 235

Appendix . 236
Problems. 238
Answers . 243
References 250
Index . .. 253
Chapter I
Symbolic Manipulation Codes

Symbolic manipulation codes (SMC) have a remarkable capability to work with


symbols. As a result of investigations in artificial intelligence, many such codes have
been developed in recent years. Here are a few of them: MACSYMA, REDUCE,
SCRATCHPAD, MATHEMATICA, MAPLE and DERIVE. They represent the
so-called expert systems which contain and manipulate information on a certain
branch of human knowledge and purport to facilitate the analysis.
The code used in this book is micro REX MACSYMA Release 309.5 under the
VMS system. Only slight differences exist between this and other versions of
MACSYMA. Illustrations of this package capabilities are given below as well as
applications to vibration theory. These do not replace a Reference Manual.
The computations may be carried out whether in the on-line or a Batch mode.
The latter allows for simple editing and is therefore particularly recommended.

1.1 Notions of LISP and Expert Systems


Symbolic manipulation codes and other expert systems are written in LISP. The
latter is a programming language which has an enhanced capability of manipulating
symbols like words and sentence-like objects. These manipulations obey certain
laws which make this language useful for modeling certain features of human intellect.
Although the knowledge of this programming language is not necessary for using
the codes, it would be useful to go over some of the notions of LISP. These are
reviewed below.
Procedure specifies how something is to be done, the things to do
Arguments are the things the procedure is to work with
Program is a collection of procedures thought to work together
Primitive is a built-in procedure
We now introduce the notions which deal with the "things" of LISP.
Atoms are indivisible things, like +, -, 20, A, BIRD, etc. Among these
20 is a numeric atom and, say, A is a symbolic atom (symbol). The
atoms +, -, * and / which denote addition, subtraction, multi-
plication, and division respectively, are called generic primitives.
2 I. Symbolic Manipulation Codes

Expression

~
Atom List

~
Number
Symbol

~
Integer Fl oa ti ng-poi nt Figure 1.1 Hierarchy of objects

List is a collection of atoms enclosed in parenthesis


Expression is a list or atom or their collection
Form is an expression which is meant to be evaluated
Next, numbers may belong to two kinds, namely:
Integers are whole numbers. They are usually written without
a decimal point. If one is included there must be no
digits after it.
Floating-point numbers are those with digits after the decimal point. They
represent reals.
Floating contagion implies that if a generic primitive is given arguments
of mixed types, a floating-point number and an integer,
then the integer is converted into a floating-point
number before the primitive is applied.
Figure 1.1 illustrates the above hierarchy of notions.
We shall also need few notions of the symbolic manipulation code.
Array n-dimensional data accessible by designating their
indicies
Assignment prescribing a value to a variable or changing its
value
Bignum and Fixnum the first is an integer so large that it cannot be
stored in a single machine word, while the second
an integer which is stored in a single machine word
Function and Special Form The first is a procedure which, evaluating certain
arguments, peforms the prescribed computations
and returns a result. The second does not neces-
sarily assume the evaluation of arguments.

1.2 First Sessions


The expert system used herein is MACSYMA, which resides in LISP. This section
1.2. First Sessions 3

deals with elementary features of this symbolic manipulations code. A more detailed
description may be found in a Reference Manual.
To enter and leave MACSYMA type macsyma return and quit ( ); return,
respectively. Its prompt is a c-line, while its output is labelled as ad-line.
Each c-line represents a command or expression, which must be ended with; or $.
In the first case, the code output is displayed as a d-line, while in the second case
the output is not displayed at all. To see, say, (c3}-line type string (c3); The
command playback; will cause the display of all previous commands of the session.
The code uses the standard signs to carry out algebraic operations: + (addition),
- (subtraction), * (multiplication), / (division) and' or ** (exponentiation). It does
not differ between the upper and low case letters.
Numbers may be integers or floating-point numbers in the sense explained in
Section 1.1. We may also consider rational numbers which are the quotient of two
integers and the so-called bigfloats. The floating-point number might contain an
integer exponent beginning with the letter e, while bigfloats the letter b. An integer
or rational number are allowed to contain any number of digits, but a non-zero
floating-point number must lie between 2.ge-37 and 1.7e38. The precision of bigfloats
may be properly adjusted by means of the so-called option fpprec, with the default
value of 16 digits. Avoid, if possible, the use of floating-point numbers or bigfloats
with high precision in favour of integers or rational numbers.
The base of the natural logarithms, e, is denoted by %e and n by %pi. The square
root of - 1, i = j=1, is denoted by %i. The predefined constants are summarized
below:

Constant Description

%e Base of the natural logarithms (e)


%i The square root of - 1 (i)
~~pi The transcendental constant pi (n)
inf Real positive infinity (co)
minf Real negative infinity ( - Cf.))

For a first experience we want to expand (a + b}2. Type:


(el) expand((a + bt2);
(dJ) a 2 +2ab+b 2
If we want to differentiate, say, cos x sin x, we issue:
(c2) diff(cos(x)* sin (x), x);
(d2) cos 2 (x) - sin2(x)
and if we want to differentiate (a + b)2 with respect to b twice we type:
(c3) diff((a + bO, b,2);
(d3) 2
Assume that we wish to obtain the third derivative of (a 2 + 2ab + b 2 )2 with respect
to a. We may issue
4 I. Symbolic Manipulation Codes

(c4) dl A2;
(d4) (b 2 + 2ab + a 2 )2
(c5) diff(%, a, 3);
(d5) 12(2b + 2a)
Here % is used instead of d4.
The code has various facilities for making substitutions. Say, we have

and want to substitute (a + b)2 for z. We issue


(c6) %eA(%i*z)$
(c7) subst«a + br2,z,%);
(d7) %e%i(b+a)2
where in (c6) $ prevents the display of the code response and arguments of subst
mean to insert (a + b)2 instead of z in the expression (d6).
The same substitution may also be carried out in the following ways:
(c8) d6,z = (a + bt2;
(d8) %e%i(b+a)2
(c9) ev(d6,z = (a + b(2);
(d9) %e%i(b+a)2

Say, we are given the equation


d=b+2a-p
and need to substitute x for 2a - p. The function subst does not make this operation
since 2a - p is not a complete expression but ratsubst does
(elO) d=b+2*a-p;
(dlO) d= -p+b+2a
(cll) subst(x,2*a-p,%);
(dll) d= -p+b+2a
(el2) ratsubst(x, 2*a - p, dlO);
(dI2) d = x+ b
If we wish the expression (d7) be assigned to, say, g, we type
(el3) g:d7;
(dI3) %e%i(b+a)2
Calling g, we get
(cI4) g;
(dI4) %e%i(b+a)2
Nevertheless, the assignment may be cancelled by
(el5) kill (g);
(dI5) done
(el6) g;
(dI6) g
1.2. First Sessions 5

Suppose we need to compute the function h{x) = xa sin x for various values of
the argument. Then we type in
(cI7) h(x):= x*a*sin(x)$
(cI8) h(I);
(dI8) sin(I)a
(cI9) h(x+c);
(d 19) a(x + c)sin(x + c)
To obtain the numerical value of (dI8) type
(c20) ev{d18, numer);
(d20) 0'8414709848078965a
The number of digits is governed by the option fpprec. Setting
(c21) fpprec:4$
(c22) bfloat{dI8);
(d22) 8·415b - la
we get only four digits.
The following operations illustrate summations:
(c23) sum{a[i]*xAi,i, 1,4);
(d23) a 4 x4 + a 3 x 3 + a 2x 2 + a\x
(c24) sum(sum{b [i, j] *xAi *yA j, i, 0, 2), j, 0, 2);
(d24) b2,2x2y2 + bl,2xy2 + b o,2y 2 + b 2,\X 2y + bl,lxy
+ bo,\Y + b2,ox 2 + bl,ox + bo,o
In (c23) we defined

(1.1)

and in (c24)
2 2
I I bijxiyi (1.2)
j, i=O

With the prime' we impose an implicit operation, the so-called noun form
(c25) 'sum(x Ai, i, 0, 3);
3
(d25) I Xi
i:::D

which may again be converted to the explicit form by


(c26) ev(d25, sum);
(d26) x 3 + x 2 + X + 1
To obtain
I
i= 1,3,5
Qi (1.3)

we type
(c27) j(n):= n*2 + 1;
6 I. Symbolic Manipulation Codes

(d27) j(n):= n 2 + I
(c28) sum (a [j(n)], n, 0, 2);
(d28) as + a 3 + at
The prime plays the same role in the case of differentiation
(c29) 'diff(x~3,x);

dx 3
(d29) ~

(c30) ev(%, diff);


(d30) 3x 2
Equations may be created and manipulated in a convenient way. Below rhs and
lhs denote the right-hand side and left-hand side, respectively,
(c31) k+ 12=x*y-6$
(c32) rhs(%);
(d32) xy - 6
(c33) Ihs(d31);
(d33) k + 12
The trigonometric functions accessible are given below

Circular Inverse circular Hyperbolic Inverse hyperbolic


functions functions functions functions

sin asin sinh asinh


cos acos cosh acosh
tan atan tanh atanh
cot acot coth acoth
sec asec sech asech
csc acsc csch acsch

These functions are evaluated as a floating-point number if the argument is given


in this form. The particularly useful operations are trigreduce and trigexpand. The
first of them combines the products and powers of trigonometric function, whereas
the second expands sums of the angles. Here are a few examples
(cl) trigreduce(cos(w*t)**3);
cos(3tw) + 3 cos(tw)
(dl)
4
. (c2) trigreduce(sin(w*t)**3);
3 sin(tw) - sin(3tw)
(d2) 4

(c4) cos(2 *z - y) + sin(3 *z);


1.2. First Sessions 7

(d4) cos(2z - y) + sin(3z)


(c5) trigexpand(%);
(d5) sin(y)sin(2z) + cos(y)cos(2z) - sin 3(z) + 3 cos 2 (z)sinV(z)
(c9) trigexpand(cot(5*Z));
cotS (z) - 10 cot 3(z) + 5 cot(z)
(d9)
5cot 4 (z)-IOcot 2 (z)+ I
Here are other examples of symbolic computations which speak for themselves
(cIO) sin(hzr3$
(ell) ev(%, z = %pi/3);
3 sqrt(3)
(d 11) 8

Further,
(cl) (a + x)*d;
(dl) (x+a)3
(c2) expand(dl);
(d2) x 3 + 3ax 2 + 3a 2 x + a 3
(c3) factor(%);
(d3) (x + a)3
(c4) %,a = 5;
(d4) (x +W
(c5) ev(d3,a = x**2);
(d5) (x 2 + X)3
(c6) subst(x**2,a,d3);
(d6) (x 2 + X)3
(c7) %pi;
(d7) %pi
(c8) ev(%, numer);
(d8) 3·1415927
(c9) ev(%e, numer);
(d9) 2·7182818
(elO) b:%;
(dIO) 2·7182818
(ell) b + 10;
(dll) 12·718282
(el2) f(x):= x**4 + 6;
(dI2) f(x):= X4 + 6
(cI3) f(l);
(d13) 7
Operations with complex numbers are as easy as with real ones. Here are the
examples of separation of the imaginary and real parts and computation of the
absolute value
8 I. Symbolic Manipulation Codes

(c3) %eA(%i*f);
(d3) %e%i f

(c4) realpart(%);
(d4) cos (f)
(c5) imagpart(d4);
(d5) 0
(c6) imagpart(d3);
(d6) sin(f)
(c7) cabs(d3);
(d7) 1
(c8) cabs(a + %i * b);
(d8) sqrt(b 2 + a 2 )

1.3 Matrices
A matrix may be generated by typing matrix ([ ], ... ,[ ]) where the square
brackets contain the rows of the matrix. Another way is to use entermatrix (n, m)
where nand m indicate the number of rows and columns, respectively. Here are
illustrations of these two commands
(cl) matrix( [a, b, c], [1, 2, 3], [r!, r2, r3]);

(dl) [:1 ! :J
(c2) entermatrix(3,3);
Is the matrix 1. Diagonal 2. Symmetric 3. Antisymmetric 4. General. Answer
1, 2, 3 or 4
4;
Row 1 Column 1: a;
Row 1 Column 2: b;
Row 1 Column 3: c;
Row 2 Column 1: 1;
Row 2 Column 2: 2;
Row 2 Column 3: 3;
Row 3 Column 1: r1;
Row 3 Column 2: r2;
Row 3 Column 3: r3;

(d2) [~ ~ ~J
r1 r2 r3
A convenient way to generate a matrix is through a zeromatrix. For, example,
if we need a 2 x 2 zero matrix we type
(c3) zeromatrix(2,2);
1.3. Matrices 9

(d3) [~~J
Below zeromatrix generates a 3 x 3 matrix whose elements are
(ai)i, i,j = 1,2,3 (1.4)
(c4) (h:zeromatrix(3, 3), for i:I thru 3 do (for j:I thru 3 do h[i,j]:(aAjti»$
(c5) h;

(d5) [:2:: ::]


a3 a6 a9
In the first substatement of the compound statement (c4) we define h as 3 x 3 zero
matrix and then with the help of do change its entries so as to assign them the
values given by (1.4). Calling h in (c5) we obtain its final form given by (d5).
An identity matrix we get by ideot

n
(c6) ident(4);

(d6) [~;!
while another "specimen" of the same matrix by copymatrix

U;! ~l
(c7) b:copymatrix(%);

(d~
If we want to delete in the above b-matrix, say, the fourth row and fourth column

n! n
and assign the new matrix to m we type
(c9) m: submatrix (4, b, 4);

(d9)

Algebraic operations perform in a usual way, say, to sum the matrices hand m
we issue

[HI
(clO) m + h;
a2
a'6 ]
(dlO) a2 a4 +I a
a3 a6 a9 + 1
The dot (not*) implies multiplication (non-commutative)
(cII) m.h;
10 I. Symbolic Manipulation Codes

and A A -I the inversion


(c14) h AA
( -1);

a 3 -2a 2 +a a 6 _as - a 4 +a 3
a2 + I
(dI4)

The same result could be obtained with the help of invert(h).


The next two commands speak for themselves
(cI5) determinant (h);
(dI5) a(a l3 _aIZ)_aZ(all_a9)+a3(a8_a7)
(c16) transpose(h);

Ifthere is a need to change the value of, say, h [I, 2J to k we type


(c19) h[I,2]:k
(dI9) k

::::1 h[; :z ~4 ::]

a3 a6 a9
There are few ways to call an element needed. These are illustrated below
(c21) h[2,3J;
(d21) a 6
(cll) row(col(h, 3), 2);
(d22) [a 6 J
Note that (d22), unlike (d21), yields a matrix.
A useful command is coefmatrix ([eqn l , ... eqnnJ, [var I"" varnJ), which returns
the coefficient matrix for the variables var I' ... Var n of the system of linear equations
eqn I" .. eqnn' Here is an illustration on the example
I aijxj=i, i=I,2 (/.5)
j= I.Z
(c25) sum(a[I,j]*x[j],j, 1,2) = c[IJ;
(d25) a1. 2x2 + XI al.l = c 1
1.4. Solving Equations 11

(c26) sum(a[2, j] *X [j], j, 1,2) = c [2];


(d26) x Z aZ •2 + Xl a Z • 1 = C z
(c27) coefmatrix( [d25, d26], [x [I], x [2]]);

(d27) [::::
This command also accepts polynomials instead of equations, which facilitates
programming.

1.4 Solving Equations


Solutions of various equations may be obtained through solve. Say, we look for the
roots of the equation
5qZ-7q+10=0 (1.6)
We issue
(el) solve(5*q 2 -7*q A
+ 10 = O,q);
(dl) [ __ sqrt(151)%i -7 _ sqrt(151)~~i + 7J
q- 10 ,q - 10

The first argument of solve could also be written as the polynomial. Note that the
roots are given in (d I) as a list. To access these values we may type
(c2) first (%);
sqrt(151)%i - 7
(d2) q= - 10

(c3) rest(dl);

(d3)
1 6
[ q = sq rt(l5 1 %i + 7J

(c4) firste~);

sqrt(151)~;';i +7
(d4) q = 10

Instead of (c3) and (c4) we could also use


(c5) last(d I);
sqrt( 151 ),!~i +7
(d5) q = 10

In a similar way, the SMC treats systems of equations. If these are linear then
linsolve is a somewhat better alternative. The following command yields the solution
to two linear equations
ax 1 +bx z =c
(1.7)
dx 1 +ex Z =j
12 I. Symbolic Manipulation Codes

(c6) linsolve( [a*x[IJ + b*x [2J = c, d *x[IJ + e*x[2J = fJ, [x [IJ, x [2JJ);
(d6) [ __ ce-bi _cd-ai ]
xI - bd _ ae ' x 2 - bd - ae
The solution is again in the form of a list and if we call x I the SMC returns trivially XI

(c7) x[IJ;
(d7) XI

By setting the option globalsolve to true we change the situation and get a direct
access to the roots x I and x 2
(c8) (Iinsolve([a*X[IJ + b*X [2J = c, d*x [IJ + e*x [2J = fJ, [x[IJ, x [2JJ),
globalsolve:true);
. ce - bf cd - af]
(d8) [ x l · - - - - , x2 :-:-bd--:----a-e
bd-ae
(c9) x [IJ;
ce- bf
(d9)
bd-ae
On the other hand, first provides
(elO) first(d6);
ce- bf
(dIO) xl =---
bd-ae
Note the difference between (d8) and (d6).
The command ode deals with ordinary differential equations. In the case of an
equation of the second order it is better to call directly ode2. Since solutions depend
on values of the constants involved, it is a good practice to properly inform the
code before invoking ode or ode2. Here is an example of solving the equation
d2 x
m dt 2 + kx = 0, (m > 0, k > 0) (1.8)

(cII) assume(m > 0, k > 0);


(dI1) [m>O, k>OJ
(el2) m*'diff(x, t, 2)+ k*x;
d2 x
(dI2) m dt 2 + kx
(cl3) ode2(%, x, t);

(dl3) x = %kl sin (sqrt(k)t) + %k2 cos (sqrt(k)t)


sqrt(m) sqrt(m)
Here %k 1 and %k2 are free constants.
The command ic2 allows for incorporation of initial conditions, a second order
equation may be subjected to. Say,
1.4. Solving Equations 13

x(t = 0) = Xo (1.9)
dx
Tt(t=O)=x\

We issue
(cI4) ic2(dI3, t = O,x = xO,diff(x, t) = xl);
Sqrt(k)t)
sqrt(m)sin ( - - - xl
(d14) x= sqrt(m) + cos (Sqrt(k)t) xO
sqrt(k) sqrt(m)
The next example deals with the equation
d2 x dx
m-+c-+kx=O (1.10)
dt 2 dt
subjected to the initial conditions (1.9). We type in
(cl) assume(m > 0, c > 0, k > 0);
(dl) [m>O, c>O, k>O]
(c2) n*'diff(x, t, 2) + c*'diff(x, t, 1) + k*x;

(d2)

(c4) ratsimp(ic2(d3, t = 0, x = xO,diff(x, t) = x1);

(d4) x= _%e- i ':' (Sqrt(4km-C 2)( _2msin(sqrt(4~:-C2)t)x1

-c~n
. (Sqrt(4km - C2)t) xO )
2m

I
+ (c 2 _ 4km) cos (Sqrt(4~: - C2)t) Xo) (4km - c2)
Boundary conditions may be incorporated with the help of be2. For example,
if the conditions are
x(t = 0) = 1.
(1.11)
x(t = 1) = 2,
we issue
(c5) bc2(d3, t = 0, x = 1, t = 1, x = 2)$
(c6) ratsimp(d5);
14 I. Symbolic Manipulation Codes

(d6) x= _O'e
/0
, _'.£1- ( (
2m
2m
2
10
cf--)
COS (s q rt(4km - C ) ) _2°/e-m

, (s q rt(4km - cl)t) ,(sq rt(4km - c 2 ) )


Sin -Sin - - - - -

I
2m 2m

cos (Sqrt(4~: - Cl)t) ) sin (Sqrt(4~: - C2 ) )

As in (c4), (c5) and (c6) could be united in a single statement


The desolve-command may yield solutions to a system of differential equations,
There is the following essential difference as compared to the format of ode: the
functional dependencies must be explicitly indicated in both the equations and
variables while defining the arguments of desolve,
Here is an example of solving the system of equations with respect of h I (x) and
h2(x)

(c47) a*diff(h I (x), x, 2) + b*diff(h2(x), x) + hI (x) = sin (x);

(d47) ;2
b(:x (h2(X))) + aCd (hI (X))) + hI(x) = sin (x)

(c48) bdiff(h2(x), x, 2) + s*diff(hl (x), x) = 0;

(d48) k Cd;2 (h2(X))) + s (:x (h I (X))) = 0

(c49) desolve( [d47, d48], [h! (x), h2(x)]);

After questioning about constants involved desolve yields the solution, which is too
long and need not be given here,
This routine may use the Laplace transform and, consequently, it may return
terms which contain the inverse Laplace transform, itt The use of atvalue which
specifies a boundary value, jointly with desolve, simplifies the results, Note, that
atvalue should be formulated before resorting to desolve,
Say, we seek for a solution to (d47) and (d48) which satisfies the following
conditions

dh! dh2
- ( x = 0) = - ( x = 0) = 0
dx dx
h!(x=O)=p (1.12)

We issue first atvalue and then desolve indicating explicitly the functional relationship
(c50) atvalue(,diff(h! (x), x), x = 0,0);
(d50) 0
(c5!) atvalue(,diff(h2(x), x), x = 0,0);
(d5!) 0
(e52) atvalue((hI(x),x= O,p));
(d52) 0
(e53) desolve( [d47, d48], [h! (x), h2(x)]);
l
1.5. Limits and Expansions 15

a2k3 sinh (Sqrt(ak~~S - k))X)

h (bs + (a - I)k)sqrt(ak(bs - k))


(d53) I(x)= ak

2 (Sqrt(ak(bS - k))X)
ak pcosh
ak
bs- k k sin (x) bps
-----+--,
ak bs + (a - I)k bs - k
2 2 . (Sqrt(ak(bS - k))X)
a k pssmh
ak
h2(x) = - - - - - - - - - -
(bs - k)sqrt(ak(bs - k))
ak
2 2 (Sqrt(ak(bS - k))X)
a k scosh
ak
b s + (a - 2)bks + (I - a)k2
2 2 s cos (x)
ak bs + (a - I)k
psx (h2(0)b + I)s - h2(0)k]
+--+
bs - k bs - k

1.5 Limits and Expansions


The command limit returns the limit of an expression as a real variable approaches
some value, say zero or infinity. Setting the option variable t1imswitch to true allows
the code to use Taylor series while performing calculations. The command t1imit
unites both of the above statements. Here is an example for
sinx
lim-- (1.13)
x-o x
(cl) limit(sin(x)/x,x,O);
(d I) I
To take the limit from above, we specify plus as one of the arguments, while
minus specifies the limit from below
(c2) limit(x * log(x), x, 0, plus);
(d2) °
°
(c3) limit(X* log(x), x, 0, minus);
(d3)
With taylor we compute Taylor series. Say, for sin x we issue
(c4) taylor(sin(x), x, 0, 4);
x3
(d4) ITI X=-+·"
6
16 I. Symbolic Manipulation Codes

where in (c4) the last two arguments, 0 and 4 denote a point of expansion and the
maximal desirable power, respectively. A display of the d-line is labelled with ITI.

1.6 Integration

The command integrate yields the indefinite integral of the given expression with
respect to the given variable. Say, we need

f z
--dz
Z2 +I
(1.l4)

Issue
(cI6) z/(z**2+ I);

(dI6) --!:-
z +I
(cI7) integrate(%,z);

(dI7) 10g(z; + 1)

Another example,
(c18). integrate(sin(xt2*cos(xt3, x);
3 sin 5 (x) - 5 sin 3 (x)
(dI8)
15
We may also define the integrand as a function
(c19) f(x):= x 2$ A

(c20) integrate(f(x), x);


x3
(d20) 3
The prime would again prevent the actual integration
(c22) 'integrate (x/(b - x), x);
I
[ x
(d22) I --dx
] b-x
I
This integral yields
(c23) ev(%, integrate);
(d23) - b log (x - b) - x
which may again be integrated, say, with respect to b
(c24) integrate(%, b);
1.6. Integration 17

2 2bx + b 2
- log(b - X)X - - - 2 -
b2 log(x - b)
(d24) - - - - - - - - - - - bx
2 2
If the command integrate is given the limits of integration as its arguments, it
will perform definite integration. Multiple integration may also be carried out

°
(c2S) integrate(integrate(integrate(x -3 *y*Z, x, 0,1), y, - 1,1), Z, 0,1);
(d2S)
yields the value of

r II (I x 3 yzdxdydz (US)
Jo -IJO
The command Idefint also returns a definite integral using the indefinite integral
and a limiting procedure to obtain the result. A useful alternative is the command
absint which is contained in the so-called Share Directory. The file which is needed
may be loaded by typing in load (fourie).
For example, for

L sin x 2 cos xe x2 dx (U6)

we may use either integrate or absint with the same efficiency. However for

f: Isin x 2 1 cos x dx (U7)

integrate returns a noun form


(c26) integrate(abs(sin(x '2))*cos(x), x, 0, %pi);

/
[
(d26) I cos(x)lsin(x 2 )1 dx
]
/
o
Therefore we try absint loading first the file "fourie"
(c27) load(fourie)$
(c28) absint(abs(sin(x'2»*cos(x), x, 0, %pi)$
(c29 ratsimp(%);
(d29) sqrt(%pi)((sqrt(2)%i - sqrt(2»sinW + (sqrt(2)%i + sqrt(2»cosW)
erf( (2 sqrt(2)%i + 2 Sqrt(2»;Pi + sqrt(2)%i + SQrt(2»)

((sqrt(2)%i - sqrt(2»sinW + (sqrt(2)%i + sqrt(2»cosW)


x erfC2 sqrt(2)%i + 2 Sqrt(2»;Pi - sqrt(2)%i - sqrt(2) )
18 I. Symbolic Manipulation Codes

+ «sqrt(2)%i + sqrt(2))sinW + (sqrt(2)%i - sqrt(2))cosW)


2 sqrt(2)%i - 2 sqrt(2))%pi + sqrt(2)%i - Sqrt(2))
(
x erf 4

+ «sqrt(2)%i + sqrt(2))sinW + (sqrt(2)%i - sqrt(2))cosW)


2Sqrt(2)%i - 2 sqrt(2))%pi - sqrt(2)%i + Sqrt(2)))/
x erf ( 4 16

Definite integrals may also be evaluated numerically with the help of romberg
(c30) romberg(x A2,x,0,1)
(d30) 0·3333333333333333
To evaluate

Ii = f 1
-1
Ixil dx, i = 3,4,5 (1.18)

we type in
(c31) f[i](x):= abs(xAi)$
(c32) for i:3 thru 5 do 1 [i]:= romberg(f[i](x), x, - 1,1)$
where we first defined the array of functions fi(X) = Ixil and then integrated
them numerically from - 1 to 1 with the help of do. The values of Ii are now
in the memory and to see them we use do and display
(c33) for i:3 thru 5 do display (I [i]);
13 = 0·5
14 = 0·4
Is = 0'3333333333333333
(d33) done
Our next example involves a double array
,
JoC xCOS(X)i+idx,
3
hij= i=2,3,4; j= 1,2,3 (1.19)

This may be evaluated by


(c34) r[i, j):= x*cos(xni + j);
(d34) ri,j(x):= x cos (X)i+ j
(c35) for i:2 thru 4 do for j:l thru 3 do h[i,j):
romberg(r[i, j](x), x, 0,3)$
Typing h[i,j]; we get the values of (1.19).
We present below two examples of multiple integration of x 2 y over
O<y< 1,
°< x < 1,

(c36) romberg(romberg(x A2*y,x,0, 1),y,O, 1);


(d36) 0'1666666666666667
(c37) integrate(integrate(x A2*y,x,0, 1),y,O, 1);
(d37) !
1.6. Integration 19

(c38) ev(%, numer);


(d38) 0'1666666666666667
It should be pointed out that the process of symbolic definite integration is
essentially influenced by the option intanalysis and by information on various constants
involved, which is made available to the code. When intanalysis is true, the code
goes to time consuming and cumbersome check of absolute convergence before
performing the integration. During this check the code may ask questions concerning
the sign of certain expressions, which may be difficult to answer. Therefore, if there
is no doubt that poles do not exist, this option should be set to false. The default
value of this option may be found by typing intanalysis.
Further, all information concerning the sign of expressions and sUbexpressions
should be made available to the code before the integration. Say if the limits of
integration a and b are positive, issue
(c39) assume(a > 0, b > 0);
(d39) [a> 0, b > 0]
Setting the option assume _ pos to true
(c40) assume _ pos:true $
we declare all constants involved to be positive.
Nevertheless, the code still can make queries about the sign of quantities. In this
case all alternatives should be investigated one after another, and their influence on
the answer.
Consider the evaluation of a singular integral

(1.20)

where e is a small value. In the following program the intanalysis-option has been
set to false. We first represent (1.20) as

f q- r foo dx
(1.21)
e
+ q+r x (bx+1)(x
2 2
-q)
because of the singularity at x = q, then compute separately the two integrals, sum
them up, and then find the limit r ~ 0, in agreement with the definition of a principal
value.
(c41) (x**2-q**2)*(1+b*x)u;
(d41) x(bx + 1)(x 2 _ q2)
(c42) 1/%;

(d42) 1
x(bx + 1)(x 2 _ q2)
We begin with the first integral
(c43) integrate(%, x, e, q - r);
is r - q + e positive, negative, or zero? neg; is r - q positive, negative, or zero? neg; is
e positive, negative, or zero? pos; is b(br - bq - 1) positive, negative, or zero? neg; is
20 1. Symbolic Manipulation Codes

b(be + 1) positive, negative, or zero? pos; is r positive, negative, or zero? pos; is q - e


positive, negative, or zero? pos; is r - 2q positive, negative, or zero? neg; is be + 1
positive, negative, or zero? pos; is br - bq - 1 positive, negative, or zero? neg;
(d43) (2b 2q 2 10g( - br + bq + 1) + (bq - l)log(r) + (- bq - 1)10g(2q - r)
+ (2q - r) + (2 - 2b 2q2)10g(q - r))j(2b 2 q 4 - 2q2)
+ ((bq + l)log(q + e) + (1 - bq)log(q - e)
+ (2b 2 10g(e) - 2b 2 10g(be + 1))q2 - 210g(e))j(2b 2q4 - 2q2)
We go over to the second integral
(c44) integrate(d42,x,q + r,inf);
is b positive or negative? pos; is r + q positive, negative, or zero? pos; is br + bq + 1
positive, negative, or zero? pos; is r positive, negative, or zero? pos; is r + 2q positive,
negative, or zero? pos; is q2(bq - l)(bq + 1) positive or negative? neg; is
(bq - l)(bq + 1) positive or negative? neg; is q(bq l)(bq + 1) positive or negative?
neg; is b2q2 - 1 positive or negative? neg; is q positive or negative? pos;
b 2 10g(b)
(d44) - (2b 2q210g(br + bq + 1) + (- bq - l)log(r + 2q)
(bq - l)(bq + 1)
+ (2 - 2b 2q2)log(r + q) + ((bq - 1)log(r))(2b 4q2 - 2q2)
Some of the answers just given are not unique and we try alternatives, repeating
the computations of the second integral.
(c45) integrate(d42, x, q + r, inf);
is b positive or negative? pos; is r + q positive, negative, or zero? pos; is br + bq + 1
positive, negative, or zero? pos; is r positive, negative, or zero? pos; is r + 2q positive,
negative, or zero? pos; is q2(bq - l)(bq + 1) positive or negative? pos; is
(bq - l)(bq + 1) positive or negative? pos; is q(bq - l)(bq + 1) positive or negative?
pos; is b2q2 1 positive or negative? pos; is q positive or negative? pos;
b 2 10g(b)
(d45) - (2b 2q210g(br + bq + 1) + (- bq - 1)log(r + 2q)
(bq - l)(bq + 1)
+ (2 - 2b 2 q2)log(r + q) + ((bq - 1)log(r))(2b ZqZ - 2qZ)
We note that (d44) = (d45). Many of the above questions could be avoided if we
would type assume (b > 0, q > 0, e > 0).
Summing up the two parts, we investigate the limit r --> 0, allowing for the
use of a Taylor series,
(c46) d43 + d45$
(c47) tlimswitch: true;
(d47) true
(c48) limit (d46, r, 0);

qZ_e2) (q+e) (bZe Z ) qZ


log ( - - 2 - + bqlog - - + bZlog ZZ
e . q- e b e + 2be + 1
(d48)
1.7. Useful Commands and Options. Pattern Matching 21

Simplifying this with the help ofradcan (see Section 1.7), we get
(c49) radcan(d48);
(d49) ((bq + l)log(q + e) + (1 - bq)log(q - e)
+ (- 2b 2 log(be + 1) + 2b 2 Iog(e) + 2b 2 Iog(b»q2
- 2Iog(e»j(2b 2q4 - 2q2)
Besides the above facilities, the code is capable of performing the Laplace
transform and its inverse. Some examples are given in Section 1.11.

1.7 Useful Commands and Options. Pattern Matching


Among other commands, we would particularly note radcan, which simplifies
expressions containing logs, exponentials and radicals, and ratcoef, which returns
the coefficient of a subexpression. Here are examples,
(c1) log(z A3 - z*a)*sqrt(z*log(z A2)t3jlog(zr2;
2 sqrt(2)(z log(z) )3/2Iog(z3 - az)
(dl)
log2(z)
(c2) radcan(%);
2 sqrt(2)z3/2Iog(z2 - a) + 2 sqrt(2)z3/2Iog(z)
(d2)
sqrt(log(z) )
(c3) sqrt(log(z A3 * 5r 3) * log(sqrt(z»;
log(z)log(5z 3)3/2
(d3)
2
(c4) radcan(%);
sqrt(3Iog(z) + log(5»(3Iog 2(z) + log(5)log(z»
(d4)
2
(c5) a*(b + c)*XA2 + c*(n*s - h)*x A2 + d*x - 1;
(d5) c(ns - h)x 2 + a(c + b)x 2 + dx - 1
(c6) ratcoef(%,x A2);
(d6) cns - ch + ac + ab
Given an equation, we extract its left-hand side with the help of Ihs and its
right-hand side with rhs. This has been noted in Section 1.2 and in illustrated below
for the equation
n m

L aix i = L br
i=O j=O
j (1.22)

(c7) 'sum(a[i] *xAi, i, 0, n) = 'sum(b[j] *yAj, j, 0, m);


n n
(d7) L aix i = L bjyj
i=O j=O
22 I. Symbolic Manipulation Codes

(c8) lhs(%);
n
(d8) I aix i
i~O

(c9) rhs(d7);
m
(d9) I bjyj
i=O

The same result follows if the command part is applied, which has also been
used earlier
(elO) part(d7, I);
n

(dlO) I aix i
i=O

(ell) part(d7,2);
m
(dll) I bjyj
j=O

This command has a wider application as shown below for an expression


Z3 - az 2 +b= ad - S (1.23)
(el2) z 3 - a*z 2 + b = a*d - S;
A A

(dI2) z3- az2+b=ad-S


(cI3) part(%, 1,2);
(d13) - az 2
(el4) part(%, I);
(dI4) az 2
(ciS) part(%, I);
(d IS) a
(el6) part(dI2,2,2);
(dI6) S
Other useful commands are ratsubst (see also Section 1.2) and trigsimp described
below:
i) ratsubst (a, b, c) substitutes a for b in c while performing some additional
transformations. It thus differs from subst, which makes a syntactic
substitution only
ii) trigsimp makes use of the identity sin 2 a + cos 2 a = 1 and others to simplify
trigonometric expressions.
The function depends is useful while dealing with derivatives. With its help we
declare that, say, f and s depend on x and t and g depend on u, in other words,
f(x, t), s(x, t), and g(u)
(el7) depends( [f, s], [x, t], g, u);
(d 17) [f(x, t), s(x, t), g(u)]
Then if we define the derivative there is no need to use a prime since the code now
1.7. Useful Commands and Options. Pattern Matching 23

knows the above dependencies


(cl8) diff(g, u);

(dI8) dg
du
which otherwise would be evaluated as zero.
The command playback plays back c- and d-lines and may be executed in various
ways. In particular, playback (slow), would enforce a slow mode of the display.
Options of a particular interest here are globalsolve and intanalysis, described
in Sections 1.4 and 1.6, respectively, and grind and derivabbrev. The option grind
when set to true, provides a very readable format and is useful to obtain a good
printout. When the command playback is used, grind may be substituted as one of
its arguments with the same effect.
The other option, derivabbrev, when set to true, causes the display of derivatives
as subscripts, as shown below
(cl) a* 'diff(y, x, 3) + b* 'diff(y, x) + c*y = 0;
d3y dy
(dl) a - + b-+ cy =0
dx 3 dx
(c2) derivabbrev:true;
(d2) true
(c3) dl;
(d3) ayxxx + byx + cy = 0
Testing expressions for combinations of semantic and syntactic patterns, we may
use pattern matching capabilities for various purposes. Say, to replace ab by x 2 in
the expressions
(bC)2 + 5ab + (aW (1.24)
we use let and letsimp
(c4) let(a*b,x'2);
(d4) ab-->x2
(c5) (b*c)'2 + 5*a*b + (a*b)'2;
(d5) b 2c 2 + a 2 b 2 + 5ab
(c6) letsimp(%);
(d6) X4 + 5x 2 + b 2 c 2

Note, that let defines a substitution rule for replacing a product of powers by another
expression, as shown in (d4), while letsimp then applies this rule, looking for a literal
match only.
To provide a wider matching, we use matchdeclare and tellsimpafter (or tellsimp).
Say, to install the rule
cos 2 y = 1 - sin 2 y (1.25)
for any y we first type
(c7) matchdeclare(y, true);
(d7) done
24 I. Symbolic Manipulation Codes

where the first argument defines the pattern variable and the second the predicate.
We then define the rule (1.25) with the help of tellsimpafter
(cS) tellsimpafter(cos(yt2,1 - sin(yt2);
(dS) [Arule 1, simpexpt]
where the first argument indicates the pattern and the second its replacement. Note,
that tellsimpafter applies this replacement rule after trying its built-in simplifications.
The pattern variable, y, should be the same in both of the commands.
Now we try the expression
(1.26)
(c9) 2*cos(at2 + sin(at2;
(d9) sin2(a) + 2(1 - sin 2(a))
(clO) ratsimp(%);
(dlO) 2 - sin2(a)
and the expression
cos 2 (b)cos 2 (a) - 1 + sin 2(b) (1.27)
(cll) cos(bt2*cos(at2 - 1 + sin(bt2;
(dll) sin 2(b) + (1 - sin2(a))(1 - sin 2(b)) - 1
(c12) ratsimp(%);
(d12) sin 2(a)sin 2(b) - sin2(a)

1.8 Conditionals, Iterations and Compound Statements


The if statement allows for various conditions to come into play. For example, to
define the function
f(y) = 0, y:::; 10 (US)
1, 10 < y < 00

we type
(c6) f(y):= if y < = 10 then f:O else f: 1$

°
(c7) f(O);
(d7)
(cS) f(l1);
(dS) 1
The next example deals with the function

g(n) -
_{.f ,=0
aixi , n < 11
(1.29)
b, n ~ 11
(c9) g(n):=ifn< 11 then g:sum(a[i]*xAi,i,O,n) else g:b$
(c1O) g(1O);
(d1O) alOx lO + a 9 x9 + asxs + a 7 x7 + a 6 x6 + asxs
+ a4 x4 + a 3 x3 + a 2x2 + a1x + a o
(cll) g(ll);
(dll) b
1.8. Conditionals, Iterations and Compound Statements 25

The do-statement provides a capability of performing repeated computations.


Here is an example of creating the array, a i = Xi for i = 2,4,6, 8, to
(cl2) for i:2 step 2 thru 10 do a[i]:xAi;
(dI2) done
(cI3) a[2];
(dI3) x2
(cl4) aCto];
(dI4) x lO
It is seen the value of do is done and there is a need to call explicitly for the array,
if we want to see it. By resorting to do and display we may see all its elements
(cl5) for i:2 step 2 thru to do display(a[i]);
a2 = x 2
a4 =x 4
a6 = x6

a8 = x8
a lO = x lO
(dI5) done
It is possible to combine (cl2) and (cl5) in a single statement, the so-called
compound statement, as shown below
(cl6) for i:2 step 2 thru 10 do (a[i]:xAi, display (a[iJ));
a2 = x2
a4 =x4
a6 = x 6
a8 = x 8
a lO = x lO
(dI6) done

Note that do has been subsequently applied to two substatements properly separated
by and enclosed in brackets. These two substatements constitute a compound
statement. To refer to the previous substatement we use %%. Say we need to
substitute
ax + 5b - 6 (1.30)
for y into
y2 +y (1.31)
We may use
(cI7) (a*x + b*5 - 6, subst(%%, y, yA2 + y));
(d17) (ax+5b-6)2+ax+5b-6
26 I. Symbolic Manipulation Codes

1.9 Few Hints

We may start a session with writefile. It is desirable to choose a filename so as to


reflect its content. Say, if we deal with the Ritz method, we may call the file "ritzl"
and issue
(cl) writefile("ritzl");
(dl) ritzl
When the work is completed we type the command closefile( ); and then may get
a transcript of the session in the mode of operational system. To redisplay parts or
all the program we use playback with various arguments, as noted earlier.
Note that this yields a transcript only, not a working program. To store part
or all expressions we can use save. The command save (filename, all)$ would store
the program, while save (filename, em,
n])$ only those lines which lie between
m and n, inclusively. The program may then be used again with load (filename)$.
Say, we solve a quadratic equation
ax 2 + bx + c = 0 (1.32)
and wish to save some parts as well as the entire program. Here is a transcript
(ci ) writefile("quadrl ");
(d 1) quadrl
(c2) eq:a*x 2 + b*X + c$
A

(c3) solve(eq, x);


sqrt(b 2 - 4ac) + b x = sqrt(b 2 - 4ac) - bJ
(d3) [x= - ,
2a 2a
(c4) first (%);
sqrt(b 2 - 4ac) + b
(d4) x= -
2a
(c5) last(d3);
sqrt(b 2 - 4ac) - b
(d5) x=
2a
(c6) save ("quadr", [4]);
(d6) [quadr, c4, d4]
(c7) save("quadrr", [4,5]);
(d7) [quadrr,c4,d4,c5,d5]
(cS) save("quadrrl ", eq);
(dS) [quadrrl,eq]
(c9) save("quadrr2", all)$
(clO) closefile( )$
In (cl) we open file "quadrl", in (c6), we store (c4) and (d4) under the name
"quadr", in (c7) we store (c4), (d4), (c5) and (d5) under the name "quadrr", in (cS)
we store (d2) under the name "quadrrl ", and finally, in (c9) we store all programs
under the name "quadrr2". We then close the file in (clO), and may get the outprint
in the mode of operational system by usual means.
1.10. Example: Steady-State Linear Vibrations 27

In order to access, say, "quadrrl" we use, while in the expert system mode, the
command load
(ciS) load (" q uadrrl ") $
(cl6) eq;
(d16) ax2+bx+c
In dealing with equations it is usually convenient to put all non-zero terms on
the left-hand side and key in the equations without their right-hand sides, namely,
= O. In any way, solve and other similar commands would treat them as equations.
On the other hand, this representation is more convenient for substitutions,
differentiations and other operations.
Unless one has acquired an extensive experience with the expert system, it is
advisable to have a written draft before starting to key in a program. The use of $
or; to end the statement merits particular comments. The $ saves the space, preventing
the display of the code response, and therefore enables one to have a better overview
of what has been typed in. However, it may be useful to take a look at the code
response and modify properly further commands. The use of; rather than $ facilitates
the discovery of errors. For example, if we typed depend(y, x) instead of depends(y, x)
the code just would reproduce the string without any signal of error
(cl) depend(y, x);
(dl) depend(y,x)
while for the correct command we get
(c2) depends(y, x);
(d2) [y(x)J
Observing the code response may therefore be useful for recogmzmg errors.
Consequently, the use of $ in place of; should be carefully thought over.
Finally, the expert system provides a facility for a Batch mode along with the
on-line mode, as well as a help facility. Batch is particularly convenient for long
programs, since it allows for simple editing. Details may be found in Reference
Manuals. Chapter 4 of this book contains relevant examples.

1.1 0 Example: Steady-State Linear Vibrations


A two-mass damped system shown in Fig. 1.2 is known as a dynamic shock absorber.
The stiffnesses of the springs are denoted as kl and k 2, and masses as m l and m2,

P{t)
Figure 1.2 Dynamic shock absorber
28 I. Symbolic Manipulation Codes

respectively, while d denotes the dissipation coefficient of the dashpot. Upon proper
adjustment of the values of k 2 , m 2 , d, the vibrations of the main mass, m l , subject
to the periodic force, P(t), can be made arbitrarily small.
To come to this conclusion, consider the forces acting on the masses m l and
m2 • The restoring elastic forces acting on m l are klx l and k 2 (x I - x 2 ), respectively.
Here x I and X 2 are the displacements of the masses from the equilibrium positions.
The elastic force on m 2 is therefore k 2 (X 2 - xd. The friction force acting on m l is
d(x I - x 2 ). Incorporating the inertia forces and the external force P(t) we arrive at
the following equations of motion
mlx l + d(,xI - x2 ) + klx l + k 2 (x I - x 2 ) = P(t)
(1.33)
m 2 x2 + d(X2 - XI) + k 2 (X 2 - XI) = 0
or in the code language
(cl) ml *'diff(xl, t, 2) + d*'diff(xl - x2, t) + kl *xl + k2*(xl - x2) = p$
(c2) m2*dilf(x2, t, 2) + d*'dilf(x2 - xl, t) + k2*(x2 - xl) = 0$
The external force P(t) is given by
P= Poe iwt (1.34)
where w is the forcing frequency. Being interested in a steady-state response, we
assume the displacements, XI and X 2 , to vary as
( 1.35)
where U 1 and U 2 are the complex amplitudes. As (1.35) show, U I and U 2 become the
quantities to be specified. To this end, we substitute (1.35) and (1.34) into (dl) and
(d2) and evaluate the result
(c3) (subst([p = pO*exp(%i*w*t), xl = ulc*exp(%i*w*t),
x2 = u2c*exp(%i*w*t)], [dl, d2J),ev(%%, diff));
(d3) [d(%iulcw%e%itw - %iu2cw%e%itW) + k2(ulc%e%itw - u2c%e%itW)
- mlulcw2%e%ilw + kl ulc%e%itw = pO%e%ilW,
d(%iu2cw%e%itw - %iulcw%e%itW)
k2(u2c%e%itw - ulc%e%itW) - m2u2cw2%e%itw = OJ
where use has been made of the obvious notations
W=W, ulc=u l , u2c=u 2 (1.36)
The next step is to separate the two equations contained in the statement (d3) and
then simplify them by dividing by eiwt
(c4) ratsimp(first(d3)fexp(%i *w * t));
(d4) - mlulcw 2 + (%idulc - %idu2c)w - k2u2c + (k2 + kl)ulc = pO
(c5) ratsimp(last(d3)fexp(%i *w* t));
(d5) - m2u2cw 2 + (%idu2c - %idulc)w + k2u2c - k2ule = 0
Thus, (d4) and (d5) represent two equations with respect to the complex amplitudes,
ulc and u2c, which are obtained by solve
(e6) solve([d4,d5J, [ulc, u2eJ);
(d6) [[ule = (m2pOw 2 - %idpOw - k2pO)/
(mlm2w4 + (- %idm2 - %idml)w 3
1.10. Example: Steady-State Linear Vibrations 29

+ (- k2m2 - klm2 - k2ml)wZ + %idklw + klk2),


u2c = (%idpOw + k2pO)/(mlm2w4 + (- %idm2 - %idml)w3
+ (- k2m2 - klm2 k2ml)w2 + %idklw + klk2)]]
Denote the phases of U1 and U z as fl and fz, respectively, and set
Imu·
tan f. = __J j =12 (1.37)
J Reu j ' ,

In order to find tan fl we issue


(c7) first(first(d6))$
(c8) tan(fl) = imagpart(rhs(%))/realpart(rhs(%)$
(d8) tan(fl) = ((m2pOw z - k2pO)( -( - dm2 - dml)w3 - dklw)
- dpOw(mlm2w4 + (- k2m2 - klm2 - k2ml)wZ + klk2))/
((m2pOw z - k2pO)(mlm2w4 + (- k2m2 - klm2 - k2ml)wZ
+ klk2) + dpOw( -( - dm2 - dml)w 3 - dklw))
and then simplify
(c9) ratsimp(%);
(d9) tan(fl) = dm2 zw 5 /(mlm2 Zw 6 + (( - k2 - kl)m2Z + (d 2 - 2k2ml)m2
+ d Zml)w4 + ((k2z + 2klk2)m2 + k2zml - dZkl)wZ - klk2Z)
Similarly we obtain tan fz
(elO) last(first(d6))$
(cl1) tan(f2) = ratsimp(imagpart(rhs(%))/realpart(rhs(%)));
(d 11) tan(f2) = (dmlm2w 5 - dklm2w 3)/(((k2ml - d Z)m2 - d Zml)w4
+ (( - k2 z - klk2)m2 - k2 2ml + dZkl)wz + klk22)
Turning to the absolute values of the complex amplitudes and bearing in mind
that the expressions may contain radicals, we type in
(el2) radcan (cabs (first (d6)));
(d12) [abs(ulc) = pOsqrt(m2Zw 4 + (d z - 2k2m2)w2 + k2Z)/
sqrt(ml zm2 zw 8 + ((( - 2k2 - 2kl)ml + d Z)m2Z
+ (2d Zml - 2k2mlZ)m2 + d Zm12)w6 + ((k2 2 + 2klk2 + klz)m2Z
+ ((2k2 Z+ 4klk2)ml - 2d 2kl)m2 + k2 zml z - 2d 2klml)w4
+ (( - 2klk2 z - 2klZk2)m2 - 2klk2zml + d Zk12)wZ + klZk2Z),
abs(u2c) = pO sqrt(dZw Z + k2 Z)/sqrt(ml Zm2 Zw 8
+ ((( - 2k2 - 2kl)ml + d 2)m22 + (2d zml - 2k2mlZ)m2
+ d 2mlZ)w6 + ((k22 + 2klk2 + kl2)m22 + ((2k22 + 4klk2)ml
- 2d Zkl)m2 + k22mlz - 2d 2klml)w4 + (( - 2klk22 - 2k12k2)m2
- 2klk2 2ml + d 2kl 2)W 2 + k1 2k22)]
and thus complete the investigations of the steady-state response.
It is seen from (d6) that the displacement of m 1 given by ule is a fraction, the
numerator of which is obtained as follows:
(el3) first (first(d6));
(dl3) ulc = - (m2pOw 2 - %idpOw - k2pO)/
(mlm2w4 + (- %idm2 - %idml)w 3
+ (- k2m2 - klm2 - k2ml)w2 + %idkl w + klk2)
30 I. Symbolic Manipulation Codes

(cI4) num(rhs(%));
(dI4) - m2pOw 2 + %idpOw + k2pO
The parameters of the second subsystem, m 2 , k2 and d may be so chosen as to make
(d 14) vanish, ensuring the isolation of the mass mi' For example,

(1.38)

1.10.1 Limitcases and Modifications

We first consider the case when the stiffness, k 2 , is infinitely large. It means that the
system effectively becomes that of a single degree of freedom with the mass (m I + m2)
and the stiffness k l • The dashpot ceases to play any role, since there is no relative
motion between the two masses. Accordingly, the dissipation coefficient d should
not appear in the formulae.

(cIS) d13;
(dIS) ulc = - (m2pOw 2 - %idpOw - k2pO)j(mlm2w4
+ (- %idm2 - %idml)w3 + (- k2m2 - klm2 - k2ml)w2
+ %idkl w + klk2)
(cI6) limit(%,k2,inf);
pO
(dI6) ulc = - (m2 + ml)w 2 _ kl

(cI7) last (first (d6));


(d 17) u2c = (%idpOw + k2pO)j(mlm2w4 + (- %idm2 - %idml)w3
+ (- k2m2 - klm2 - k2ml)w2 + %idklw + klk2)
(c18) limit(%, k2, inf);
pO
(dI8) u2c= --(m-2-+-m-l)-w2 -kl

Equations (dI6) and (dI8) are indeed identical. They confirm the above comments
and show that the resonance occurs if
2 kl
W =---- (1.39)
(m l + m2 )
Another case of interest is the undamped system, d = O. We issue
(c19) limit(dI2,d,O)$
Is k2 positive or negative? pos;
(c20) radcan(%);
m2pOw2 - k2pO
(d20) [ a bs (u 1c) = -----:-------::---;------:------:-:-::-=---:--:-:--::---=-:-::---c-----:-;;---,:-:-:,...-:-
mlm2w4 + « - k2 - kl)m2 - k2ml)w2 + klk2
k2pO . ]
abs(u2c) = - -----;-----------,;:----
4
mlm2w + « - k2 - kl)m2 - k2ml)w2 + klk2
1.10. Example: Steady-State Linear Vibrations 31

which gives the absolute values of the displacements, U 1 and U2' for the undamped
dynamic shock-absorber. As (d9) and (dll) show, 11 = 12 = 0 if d = O. Therefore
(d20) defines the values of U 1 and U2 also.
The denominator in (d20) is precisely the determinant ofthe homogeneous system
of equations, which describes the free vibrations of the undamped system. Let us
verify this by computing the determinant of the system of equations (d15) and (d17)
which govern U 1 and U2
(c21) coefmatrix([d15,d17],[ulc,u2c]);
-mlw 2 + %idw + k2 + kl -%idw-k2 ]
[
(d22) _ %idw - k2 - m2w 2 + %idw + k2
(c22) ratsimp(determinant(%));
(d22) mlm2w4 + (- %idm2 - %idml)w3 + (( - k2 - kl)m2 - k2ml)w2
+ %idklw + klk2
It is seen that, if d = 0, (d22) coincides with the above denominator. Accordingly,
two resonances may occur, when w coincides with the first or second natural
frequency, Wn, given by the quartic equation

(1.40)
which follows from (d22) if d = O.
Further, we again observe that the parameters of the second subsystem, m 2 and
k2' may be chosen so as to make the numerator of ule in (d20) vanish

k2 2
-=W (1.41)
m2
This means that the second subsystem may serve as a dynamic shock absorber, in
agreement with the earlier remark.
Figure 1.3 shows the normalized displacement of the first subsystem as a
function of the dimensionless frequency. Here
2 k2
q=- (1.42)
m2

8 I, I
I
I I
6 I
I I
I

, ,
I I
I

) I
I
I
,
I

*
2

o
.-/
0.5
\V 1.0 1.5
...
-- ---
2.0 2.5

Figure 1.3 Displacement-frequency dependence


32 I. Symbolic Manipulation Codes

represents the natural frequency of the second subsystem. The curves which have
been computed for

m 2 = 0'2, k 2m 1 = 1 (1.43)
m1 m2kl
show that slight deviations from w/q = 1 can make the shock absorber useless.
The program may be easily modified to apply for other systems. For example,
if the external force, P(t), acts on the second mass, m2, the first of (1.33) becomes a
homogeneous equation, while P(t) appears on the right-hand side of the second
equation of (1.33). To avoid retyping, we construct this new system of equations
from the previous one by
(c23) Ihs(d4) = 0;
(d23) - ml ulcw 2 + (%idulc - %idu2c)w - k2u2c + (k2 + kl)ulc = 0
(c24) Ihs(d5) = pO;
(d24) - m2u2cw 2 + (%idu2c - %idulc)w + k2u2c - k2ulc = pO
The solve-command yields ule and u2e and thereby their absolute values too
(c25) solve([d23, d24], (ulc, u2c])$
(c26) radcan(cabs(first(%)))$
When the stiffness, kl of the first subsystem is infinitely large, we should get the
case of forced vibrations of a damped oscillator. Indeed,
(c27) limit(d25,kl,inf);

(d27) [[UlC = 0, u2c = - 2:~ d


m2w -%1 w- 2
k]]
Now we obtain the amplitude and phase of vibrations for this simple case by
separating the second of (d27)
(c28) last (first (%»;

(d28) u2c= - m 2w 2 - ~d
01 w-
k2

and then typing in


(c29) radcan (cabs (d28»;
abs(pO)
(d29) abs( u2c) = ---:-::--;----,-:-:o-=-:-:-::--:-:--:;--~
sqrt(m2 2w4 + (d 2 - 2k2m2)w2 + k22)
(c30) tan(f) = imagpart(rhs(d28) )/realpart(rhs(d28»;
dw
(d30) tan(f) = m2w2 _ k2

Equations (d28), (d29) and (d30) thus represent the steady state response of a
damped oscillator. Note, that the phase angle, t, vanishes for d = 0, in accord with
earlier remarks.
1.11. Example: Transient Vibrations 33

1.11 Example: Transient Vibrations

t
The convolution integral

x(t) = P(r)xd(t - r)dr (1.44)

yields the transient response of a linear system to the excitation, P(t). In (1.44) xd(t)
is the impulse response of the system. In particular, for a simple damped oscillator
which obeys the equation
mi + dx + kx = 0 (1.45)
the impulse response is

(1.46)

where
d 2 k
n = 2m' wn =-
m
(1.47)

Note that (1.46) holds for t > 0, while xd(t) = 0 for t < O. By changing the variable
of integration (1.44) may be put in the form

x(t) = t P(t - r)xd(r)dr (1.48)

As noted earlier, (1.44) and (1.48) assume that the system is at rest for t ~ O. This
means that the impulse response is a particular solution to (1.45) and that it is
necessary to add the solution of free vibrations type
x = e-nt(AsinJw~ - n2 t + BcosJw~ - n2 t) (1.49)
to arrive at the general solution. Then initial conditions allow to specify the
coefficients, A and B.
Assume that P(t) is a "box"-function (see Fig. 1.4)

P(t) = Po, 0 ~ t ~ tl } (1.50)


0, t <O,t > tl

o t

Figure 1.4 Box-function


34 I. Symbolic Manipulation Codes

Substituting (1.50) into (1.44) we get

x(t)=P o Ixii(t-r)dr, O<t<t l

x(t) = Po II XO(t - r)dr, (1.51 )

To evaluate these integrals we introduce the modified impulse response function,


x(t, tal,

(cl) x(t, ta):= %e**( - n* - ta))*sin(wl *(t - tal);


(dl) x(t, ta):= %e-n(t-ta) sin(wl (t - tal)
where
ta = r, wi = (m;; - n 2 )1/2 (1.52)
then inform the code on conditions of integration and integrate according to (1.51)
(c2) assume(t>O,tl >O,wl >O,n>O)$
(c3) integrate(x(t, tal, ta, 0, t);
n sin(twl) wi cos(twl) wi
(d3) -------=------cc-- + --=-------=-
%e nt w12 + n2%e nt w1 2 + n 2
(c4) ratsimp(%);
n sin(twl) + wi cos(twl) - %entwl
(d4)
%entw 12 + n 2%e nt
(c5) ratsimp(integrate(x(t, tal, ta, 0, tl));
(d5) (n%ent1sin((tl - t)wl) - %ent1wl cos((tl - t)wl)
+ n sin(twl) + wi cos(twl))j(%entw12 + n2%e nt )
Hence, for °< < t tIthe response is
x(t) = (d4)jmwl (1.53)
while for t> tl it is
x(t) = (d5)jmwl (1.54)
Another technique for investigations of the transients is the Laplace transform.
Prior to resorting to laplace we have to specify the initial conditions with the help
of atvalue.
Investigations of the dynamics of package cushioning lead to the problem shown
in Fig. 1.5, namely, the mass-spring system is dropped through a height h. Denote
the instant of contact as t = 0. Then, as long as the spring is in contact with the
foundation, the system obeys the standard equation
mx+ kx=mg (1.55)
which is subject to the initial conditions

x(t = 0) = 0, x(t = 0) = j2ih (1.56)


1.11. Example: Transient Vibrations 35

We therefore formulate (1.55) and (1.56) by


(c2) m*diff(x(t),t,2)+k*x(t)=m*g;

(d2) m (:t22 (X(t») + kx(t) = gm

(c3) atvalue(x(t), t = 0,0);


(d3) 0
(c4) atvalue(diff(x(t), t), t = O,sqrt(2*g*h»;
(d4) sqrt(2)sqrt(gh)
and then take the Laplace transform of the governing equation (d2)
(c5) laplace(d2, t, s);
/macsyma/maxsrcjlaplace.o being loaded.
gm
(d5) m(s21aplace(x(t), t, s) - sqrt(2)sqrt(gh» + k laplace (x (t), t, s) = -
s
The solution is given by the inverse Laplace transform oflaplace(x(t), t, s). Solving
(d5) and applying iIt provides
(c6) solve(%,laplace(x(t), t, s»;

(d6) [1ap1ace(x(t,» t,s -- sqrt(2)sqrt(gh)ms


3 k
+ gm]
ms + s
(c7) ilt(%, s, t);
Is k m positive, negative, or zero? p;

sqrt(2)sqrt(gh)m2 sin (sqrt~m)t)


[
sqrt(km)
(d7) x(t) = - - - - - - - - - - -
m

gm2 cos (sqrt~m)t) ]

k gm
m +T
(c8) ratsimp(%);
36 I. Symbolic Manipulation Codes

(d8) [ x(t) = - ( sqrt(km)( gm cos (sqrt~m)t ) - gm )

I
- sqrt(2)sqrt(gh)km sin (sqrt~m)t ) ) (k sqrt(km» ]

The displacement x(t) is thus given by (d8), which may be put in the form

g
x(t)=2(I-coswnt)+
Wn
fffgh
-sinwnt
Wn
(1.57)

1.12 Example: Free Nonlinear Vibrations


Duffing's equation

(1.58)
describes nonlinear free vibrations of a system with the restoring elactic force given by
F(x) = kx + k 1x 3 (1.59)
The notations in (1.58) are
2 k kl
Wn =-, ml =--2 (1.60)
m mWn

The parameter ml may be considered as small


ml « I (1.61)
and used to construct a perturbation solution as follows
x= Xo + mix i + mix2 + ... (1.62)
Substituting this for x into (1.58) and equating coefficients of the powers of ml to
zero we may specify the functions XI' Xl ....
Begin with formulating the dependencies and the governing equation (1.58)
(cl) depends([x, xO, xl], t)$
(c2) diff(x, t, 2) + wn2*(x + mhX**3) = 0;
d2 x
(d2) de + wn2(mIx3 + x) = 0

where wn2 = w;. Preserving only two leading terms in (1.62),


X = Xo + mix I (1.63)
substitute this for X and take the derivative
(c3) subst(x = xO + mi * xl, d2);
d2
(d3) de (mlxl + xO) + wn2(ml(mIxI + XO)3 + mIxI + xO) = 0
1.12. Example: Free Nonlinear Vibrations 37

(c4) ev(d3, difT);


dZxl dZxO
(d4) ml dt2 + wn2(ml (mlxl + XO)3 + mlxl + xO) + dt Z = 0

This equation may hold provided the coefficients of the powers of m l vanish
(c5) ratcoef(%, ml, 0);
dZxO
(d5) dt Z + wn2xO = 0

(c6) ratcoef(d4, ml);


dZxl
(d6) -Z- + wn2x I + wn2x0 3 = 0
dt
Equations (d5) and (d6) govern the unknown yet functions xo(t) and Xl (t). The
first of them is the well-known equation for free vibrations ofthe elementary oscillator
and its solution can be given by
Xo = a cos OJnt (1.64)
Accordingly, (1.64) is substituted for Xo into the remaining equation (d6)
(c7) subst(xO = a*cos(wn*t), %);
dZxl
(d7) -Z- + wn2xl + a 3 cos 3(twn)wn2 = 0
dt
To avoid possible difficulties which may arise because of the cubic term, cos 3 OJnt,
we use the trigonometric relation given by (dl), p. 6,
(c8) subst(cos(t*wnr3 = (cos(t*wn)*3 + cos(3*t*wn))j4, %)$
Note that the same result could follow from trigreduce applied to (d7). It remains
to solve this equation to find Xl (t)
(c9) ode2(d8, x I, t);
Is wn2 positive, negative, or zero? pos;
(d9) xl = - ((a 3 cos(3twn) + 3a 3 cos(twn))wn2 Z + (- a 3wn Zcos(3twn)
- 27a 3wn Zcos(twn))wn2)j(4wn2Z - 40wn zwn2 + 36wn4 )
+ %kl sin(t sqrt(wn2)) + %k2 cos(t sqrt(wn2))
Examination of (d9) shows, however, that Xl is unbounded, because in the
denominator the first term on the right hand side, wn2 = wn z. We conclude that
the perturbation scheme applied does not provide a reasonable result.
In the sequel we consider a modified perturbation scheme, which is based on
expansions of both, x(t) and OJ, in terms of a small parameter and which does provide
meaningful results. To this end, write (1.58) as
x + OJ~x + eX3 = 0 (1.65)
where
(1.66)
38 I. Symbolic Manipulation Codes

is a small parameter. Assume, that the vibrations described by x(t) are close to
harmonic oscillations with the frequency, w, and put
w = w; + eiX l + e iX
2 2 2 + .. .
(1.67)
x = Xo + eX I + e 2 X2 + .. .
Substituting these relations into (1.65) and equating the coefficients of the powers
of e, we may get the system of equations which governs iXi and Xi in (1.67). For the
sake of certainty, assume that (1.65) is subject to the following initial conditions
X(O) = a, x(O) = 0 (1.68)
These would be satisfied if we put, in view of the second equation of (1.67), that
xo(O) = a, xo(O) = 0
(1.69)
xi(O) = xi(O) = 0, i = 1,2, ...
In (c2) given below, we state the functional dependencies, in (c3) state the
governing equation (1.65), and in (c4) substitute the above expansions (1.67) while
attaining two leading terms only. We then collect separately the coefficients of eO
and e in (c5) and (c6).
(c2) depends([x,xO,x1], t);
(d2) [x(t),xO(t),x1(t)]
(c3) diff(x, t, 2) + wn2*x + e*x 3; A

d2 x
(d3) ~2 + ex 3 + wn2x
dt
(c4) (subst([x = xO + e*x1, wn2 = w2 - e*a1], %),ev(%%,diff));
d 2 x1 d 2 xO
(d4) e -2- + e(ex1 + XO)3 + (w2 - a1e)(ex1 + xO) + - 2 -
dt dt
(c5) ratcoef(%, e, 0);
d 2 xO
(d5) de +w2xO

(c6) ratcoef(d4, e);


d 2 x1
(d6) dt 2 + w2x1 + x0 3 - a1xO

where

w=w, wn2=w;, W2=W2, a1 =iXl (1.70)


Noting that (d4) is equal to zero provided (d5) and (d6) vanish, we treat these
as the differential equations to be solved. The first or"them is the well-known equation
of free linear oscillations. Because of the initial conditions (1.69), the proper solution
is again given by
Xo = acoswt (1.71)
1.12. Example: Free Nonlinear Vibrations 39

Substituting this into (d6) and simplifying, we get


(c7) subst{a*cos{w*t),xO,d6);
d1xl
(d7) -1- + w2xl + a 3 cos 3 {tw) - aal cos{tw)
dt
(c8) trigreduce{%);
d1xl a 3 cos{3tw) 3a 3 cos{tw)
(d8) de + w2xl + 4 - aal cos{tw) + 4

The last three terms in (d8) are the forcing ones. Further, the term cos wt would
again cause the resonance, since its frequency coincides with the natural frequency
appearing in the second term from the left. The value of al = iJ(1 should therefore
be chosen so as to make this forcing term vanish. To make the picture clearer we
substitute
(1.72)
and simplify by
(c9) ratsubst{w 2, w2, %);
A

d1xl
4 -2- + 4w 2 xl + a 3 cos{3tw) + (3a 3 - 4aal)cos{tw)
dt
(d9)
4
It is seen that the coefficient of cos wt must vanish to ensure a physically
meaningful solution
(clO) ratcoef{%,cos{w*t»;
4aal - 3a 3
(dIO)
4
(cll) solve{%, all;
2
(dll) [al = 3: ]

Thus, in usual notations,


3a 2
iJ(1=4 (1.73)

Substituting this into (d9) we get rid of the undesirable term, then solve the
equation by ode2 and then incorporate the initial condition in (1.69) by ic2
(cI2) (subst{%, d9), ratsimp{%%»;
d1xl
4 -2- + 4w 2 xl + a 3 cos{3tw)
dt
(dI2)
4
40 I. Symbolic Manipulation Codes

(c13) ode2(%, X I, t);


Is w zero or nonzero? nonzero;
a 3 cos(3tw)
(d13) xl = 32w 2 + %kI sin(tw) + %k2cos(tw)
(cl4) ic2(%, t = 0, xl = 0, diff(xI, t) = 0);
a 3 cos(3tw) a 3 cos(tw)
(dI4) xI= 2 - 2
32w 32w
(clS) ratsimp(%);
a 3 cos(3tw) - a 3 cos (tw)
(dIS) xl = 32w 2

Hence, Xo is given by (1.71) while Xl by the above (dIS). This eventually gives for X

ea 3
X = a cos cot + ~-2 (cos 3cot - cos cot) (1.74)
32co

where

(1.75)

In (1.75) use has been made of (1.73) and (1.67).


As (1.7S) shows, in the case offree non-linear vibrations the frequency, co, depends
on the amplitude, a. Further, as (1.74) displays, the generation of higher harmonics
occurs. These effects are not observed in the linear case.

1.13 Example: Forced Nonlinear Vibrations


Turning to the case of forced vibrations, consider a damped nonlinear system which
obeys the equation
(1.76)
If the external excitation, P(t), is harmonic, then there may be a phase difference
between x(t) and P(t), as the linear theory shows. Confining the investigation to
this case, put (1.76) in the form
(1.77)
where p is the given forcing frequency and f the unknown yet phase shift.
In anticipation of the solution which resembles simple oscillations at the
frequency of the external force, p, we get
X = acospt (1. 78)
with the unknown amplitude, a, and substitute this into (1.77). At this juncture we
resort to the SMC and key in (1.77) and then (1.78) while making the above
1.13. Example: Forced Nonlinear Vibrations 41

substitution

d 2x dx
(d2) m de + ddt + klx 3 + kx - pOcos(pt + f)

(c3) (subst(x = a*cos(p*t), %),ev(%%,difT));


(d3) - pO cos(pt + f) - adp sin(pt) + a 3kl cos 3(pt)
- amp2 cos(pt) + ak cos(pt)

Noting that (d3) equals zero, we realize that this may be possible if the coefficients
of sin pt and cos pt, which are the leading terms in (d3), vanish. To specify these
coefficients key in
(c4) trigreduce(%);
a 3kl cos(3pt)
(d4) - pOcos(pt + f) + 4 adpsin(pt) - amp2 cos(pt)

3a 3k 1 cos(pt)
+ 4 + ak cos(pt)
Next, expand cos(pt + f)
(c5) part(%, I);
(d5) - pOcos(pt + f)
(c6) trigexpand(%);
(d6) - pO(cos(f)cos(pt) - sin(f)sin(pt))

and substitute this into (d4)


(c7) ratsubst(%, - Po cos(pt + f), d4);
a 3kl cos(3pt) . . .
(d7) 4 - pO(cos(f)cos(pt) - Slll(f) Sill (pt)) - adp Sill (pt)

3a 3k 1 cos(pt)
- amp2 cos(pt) + 4 + ak cos(pt)
As noted earlier, this equation would be approximately satisfied ifthe coefficients
of cos pt and sin pt would vanish
(c8) ratcoef(%, cos(p *t));
4cos(f)pO + 4amp2 - 3a 3kl - 4ak
(d8)
4
(c9) ratcoef(d7,sin(p*t));
(d9) sin(f)pO - adp
which provide two equations for the phase angle, J, and amplitude, a.
We find tan J by
(clO) solve(d8,cos(f));
42 I. Symbolic Manipulation Codes

4amp2 - 3a 3kl - 4ak]


(d 10) [ cos (f) = - ---=--------
4pO
(cll) solve(d9, sin(f));

(dll) [sin(f) = a:~]


(el2) d16/dlS;
sin (f) 4ad P ]
[
(d12) cos(f) = - 4amp2-3a3kl-4ak

Invoking (1.7S), (1.73) and (1.66) we get for the frequency of free vibrations, OJ,

2 k 3k, 2
OJ =-+-a (1.78)
m 4m
Substituting this into (dlO) by ratsubst and solving for the amplitude, a, yield
(el3) ratsubst(w'2, kim + 3 * k I *a '2/(4*m), dlO);
amp2 - amw2]
(dI3) [ cos(f) = - pO

(el4) solve(%, a);


- cos(f)pO ]
[ a-
(dI4) 2 2
mw -mp
Since sin 2 f + cos 2f = I, we obtain the relation p = p(OJ, Po, a) by
(ciS) trigsimp(dll '2 + dI3'2);
a2m2w4 - 2a 2m 2p 2w 2 + a 2m 2p4 + a 2d 2p2 ]
(dIS) [ 1= p02

which is quartic with respect to the forcing frequency p. Denoting


p2 = p2 (1.79)
and then solving (d IS) we get
(el6) ratsubst(p2,p'2,dIS);
a2m2w4 - 2a 2m 2p2w 2 + a 2m 2p22 + a 2d 2p 2]
(dI6) [ 1= p02

(cl7) solve(%, p2);


sqrt( - 4a 2d 2m 2w 2 + 4m 2p02 + a 2d 4) - 2am 2w 2 + ad 2
(dl7) [ p2 = - + ------;:---
2am 2 2am 2 '

where only the positive root may be physically meaningful. The result for the
1.13. Example: Forced Nonlinear Vibrations 43

undamped system is much simpler


(c18) limit(dI7,d,O);
amw2 - pO amw 2 + PO]
(dI8) [ p2= , p2=---
am am
The expressions (dI7) and (dI8) once again show the interdependence between
the frequency and amplitude of vibrations, which is typical of nonlinear systems.
Chapter II
Variational Approach and Equations of Motion

The variational approach is intimately related to mechanics, which has provided a


major stimulus for its development. In this chapter we consider basic concepts and
results of the variational calculus in a "mechanical" context. It is shown that physical
laws may admit a dual formulation: either in the form of a variational principle or
in the form of equations. This fact is stressed by programs, which automatically
deduce the governing equations from a relevant extremum problem.
The search for parameters or functions, which would ensure a best performance,
is typical of engineering practices. The variational calculus provides a convenient
means for investigating these problems, of which few examples are considered.

2.1 Mechanics of a Particle


The fundamental postulate of dynamics, known as Newton's second law, states for
a single particle
dp
F=~ (2.1)
dt
where F is the total force acting on the particle and p the linear momentum. The
latter is given by
p=mv (2.2)

where v is the velocity and m the mass.


In turn,
dr
v=~ (2.3)
dt
with r the radius vector from the origin of coordinate system to the particle and t
time. Substituting (2.2) into (2.1) we get for a particle of the constant mass
F=ma (2.4)
where the acceleration, a, is
dv
a=~ (2.5)
dt
2.1. Mechanics of a Particle 45

y F

Figure 2.1 To the definition of the work done by the external


x force, F

Now consider the motion of a particle from point 1 to point 2 (Fig. 2.1). The
work, W, done by the external force, F, is defined through the scalar differential
dW12 = F·ds (2.6)
or
W 12 = 12 F·ds (2.7)

This, in view of(2.1) and (2.2), yields

W 12 = rn f2 dv 'vdt = '!!..f2 !!.-(v2)dt (2.8)


1 dt 2 1 dt
and, consequently,
W 12 = T2 - T 1· (2.9)
where use has been made of the definition of the kinetic energy of the particle
rnv 2
T=- (2.10)
2
Assume that the work W done when the particle moves around a closed orbit
is zero

tF'dS=O (2.11)

regardless of a particular path chosen. Then W 12 should be formulated as a change


in a quantity depending on the positions 1 and 2 only. Denote this quantity as - U.
Then
F·ds= -dU (2.12)
and
W12 = U 1 - U 2 (2.13)
From (2.9) and (2.13) we get the conservation theorem
TI + UI = T2 + U2 (2.14)
The systems complying with (2.11) are referred to as conservative, while U as the
potential.
46 II. Variational Approach and Equations of Motion

2.2 System of Particles. Generalized Coordinates


When a system consists of many particles, we may differ between the internal forces,
which act on, say, ilh particle and are due to all other particles, and external forces
due to sources outside the system. Denoting the external forces by the superscript
(e) we get instead of (2.1)
Fi = Fje) + IFji = Pi (2.15)
j

where the dot denotes the derivative with respect to time, Frequently, the internal
forces Fji satisfy Newton's third law of action and reaction.
The kinetic energy, T, introduced in the previous section is an additive quantity.
Consequently, its total value may be obtained by summing the kinetic energy of
the particles
T=1Im vJ j (2.16)
j

Denoting an initial configuration of the system by 1 and a final configuration by 2,


we get the work done by all the forces as

(2.17)

which may be split in two parts by making use of the left-hand side of (2.15).
The above equations implicitly assume that there are no constraints imposed
on the motion of the system, which may not be the case in reality. For example, a
particle situated on the cylindrical surface may move only on its surface or in its
exterior region. Rigid bodies are thought of as consisting of an infinite number of
particles, such that the mutual distance, 'ij' for any ij-pair ofthem remains constant.
This also may be viewed as a constraint.
Constraints formulated by equations of the type
(2.18)
which involve coordinates and time only are called holonomic. For example, for a
conventional pendulum we get
(2.19)
where x and yare coordinates of the mass and L the.length of the wire.
Constraints which are not expressible in the form of (2.18) are referred to as
nonholonomic. For example, for the above particle placed on the cylindrical surface
we may write
(2.20)
where a is the cylinder radius.
Constraints may render the coordinates, r i , mutually dependent. Furthermore,
they are associated with usually unknown forces which are needed to impose them.
The analysis of constrained systems may be facilitated by introducing the concept
of generalized coordinates.
To this end, consider a system of N particles, which has 3N independent
2.3 Functional and its Euler-Lagrange Equation 47

coordinates (degrees of freedom). Assume that there exist K equations of the type
(2.18), which describe holonomic constraints imposed on the system. This suggests
that only 3N - K coordinates are independent. Accordingly, we may state that the
system has 3N - K degrees of freedom and introduce 3N - K generalized
coordinates, 1fi, i = 1, 2, ... 3N - K, by properly eliminating "dependent" variables.
Note, that 1fi should not necessarily be cartesian coordinates. For example, in
e,
the above case of pendulum we may choose the angle, as the generalized coordinate
instead of two independent cartesian coordinates x and Y and the constraint (2.19).
Moreover, any independent functions which completely identify the configuration
of the system may be thought of as generalized coordinates.

2.3 Functional and its Euler-Lagrange Equation


As an alternative to the equations of motion considered in the previous sections,
the unknown functions, which constitute the objective of engineering analysis, may
be associated with certain problems of extremum. This way of thinking has proven
particularly useful for applications.
One of the techniques of investigating the extremum is known as the variational
calculus. The basic problem of this calculus is as follows.
Consider a function, y(x), defined on the closed interval (x\, X2) and satisfying the
boundary conditions
y(x\)=y\, Y(X 2)=Y2' (2.21)
Now introduce the integral

J(y) = f
X2

XI
f(y,x,y')dx (2.22)

where prime denotes the derivative with respect to x and f is a prescribed function
of the arguments indicated.
Next, assume that there exists a set of functions Yi(X), i = 1,2, ... , each of which
satisfies (2.21). Since the integral in (2.22) is definite, upon substitution of Yi(X) one
arrives at a number, J(Yi)'

(2.23)

In this sense (2.22) represents a scalar-valued function of a function y(x) and is


said to be a functional. A more precise definition of the functional will be given in
Section 3.26. The variational calculus is concerned with the question whether a
particular function, yO(x), can be found among the above set members such that the
value of the integral, J(y o), is an extremum.
Assume that each admissible function, Yi(X), may be represented by
(2.24)
with B a constant and q(x) unspecified function (see Fig. 2.2). It is convenient to
think of B as a small parameter. Obviously
(2.25)
48 II. Variational Approach and Equations of Motion

Y
XI'YI

,
- ..... " Yi (x) =yO( X)+Eq (X)
"- ----

o X

Figure 2.2 Admissible function Yi(X)

to comply with (2.21). Now the integral (2.23) may be considered as depending on
e, J(e). Since yO(x) provides an extremum of (2.23) by definition, this implies
dJ
- = 0 for e =0 (2.26)
de
Here use has been made of (2.24).
The parameter, e, enters (2.23) through Yi and y;. Therefore we get
dJ
-=J(e)
de '8
=
f (Of-oy' -oyoe+oy'of- 'oy')
X
2

oe- dx

f (Ofoy + oyo~
Xl

X
= 2 q q')dX (2.27)
Xl

Here we omitted the subscript i associated with the quantities y and y' and used
(2.24) once again. Integrating by parts we get for the second term

f oyof,
X

Xl
2
--;q dx =
of IX2 -
-;::-;q
oy Xl
f
X

Xl
2
-d (Of)
- , qdx
dx oy
(2.28)

The first term on the right-hand side of this expression vanishes because of (2.25),
and (2.26) eventually becomes

fX2[Ofoy -~(o~)JqdX=O
Xl oy dx
(2.29)

This result suggests that the bracketed term in (2.29) should vanish, for q(x), in
accord with (2.24), has been thought of as quite arbitrary a function. Indeed, a more
precise analysis, which will not be pursued here, shows that this conclusion holds
under certain conditions imposed on y, q, and f. Loosely speaking, these conditions
require the functions f and y to be "smooth" enough, namely y must have continuous
derivatives up to the second order, inclusively, and the second partial derivative of
f must exist and be continuous on (XI' x 2 ). As to q, it must have continuous
derivatives of all orders.
Assuming that these conditions are fulfilled, we get from (2.29)

(2.30)
2.4. Hamilton's Principle for Discrete Systems 49

which is referred to as the Euler-Lagrange equation associated with the functional


given by (2.22). Since f is explicitly given, (2.30) represents a differential equation
governing the unknown function y(x), which provides an extremum to J(y).
Note, that what has just been proven is that (2.30) is a necessary condition of the
extremum only. The associated value of the functional, J(e), is said to be stationary.
The second derivative of J(e) may be investigated to establish the exact nature of
the extremum, with J(e),,, < 0 indicating maximum and J(e),,, > 0 minimum.
The above considerations have been based on the derivative of the functional
with respect to e, which is evaluated at e = O. This operation is, in fact, a core of
variational calculus and is worthy of its own notation. The regular abbreviation is

-dJi e=(5J (2.31)


de <=0
which is referred to as the variation of the functional J. Accordingly, (2.26) acquires
the form

I X2

Xl
(5f(y,x,y')dx = 0 (2.32)

Note that neither the independent variable, x, nor the limits of integration, XI and
X 2 , are affected by this variational process.

2.4 Hamilton's Principle for Discrete Systems

The capability of formulating a consistent postulate, which would then allow to


deduce quite a general theory, is a fascinating feature of human intellect. Hamilton's
principle provides a good illustration of this comment.
Let us begin with some of the basic concepts. Consider a motion of a single
particle of mass m. If there are no constraints, then three coordinates specify
completely its position in space. Otherwise, we need less than three functions. For
convenience, we shall use the term generalized coordinates, I1j(t), bearing in mind
that these are functions of time, which specify the particle position in a unique way.
Its kinetic energy is given by (2.10) where v may be given by
vj(t) = 'L(t) (2.33)
,We may also define, as earlier, the potential energy, U, by
. dU
U=-= -F'v (2.34)
dt
where F is the force vector exerted on the particle. The very existence of U indicates
that this system is conservative.
Next, consider a motion of a system of particles and assume that their positions
are given by a set of (independent) generalized coordinates I1j(t), j = 1, 2, ... n. We
also assume that I1j(t) have continuous derivatives up to the second order, inclusively,
on the observation time interval (t I' t 2 ) and comply with the boundary conditions
(2.35)
Any function 11/t) satisfying the above conditions may be thought of as admissible.
50 II. Variational Approach and Equations of Motion

The forces acting on the particles are taken to be conservative, thereby implying
that the potential energy of the system, U, does exist and is a function of the
generalized coordinates, U = U('1). As to the kinetic energy, T, we set T = T('1j, r,j)'
Hamilton's principle postulates: the definite integral

1= 1'I
'2
(T - U)dt (2.36)

becomes stationary for the actual motion of the system in comparison with
neighboring admissible motions. Adopting this principle, we may proceed with
derivation of the equations governing the unknown generalized coordinates, '1j(t),
namely, the Euler-Lagrange equations of the functional (2.36). It could be carried
out in a way completely similar to that of the previous section. Nevertheless, we
ha ve first to take care of simplifying our notations, since, this time, a set of functions,
not a single one, is under consideration. Henceforth we use the so-called summation
convention, with respect to a repeated index. For example,
au aZ i au OZI ou OZ2
--=~~+~~+ ... OU
~~
oZn
(2.37)
aZ i oe ozloe l OZ2 010 aZ n Of.
According to Hamilton's principle we set

M=dI(e)le=o (2.38)
de e=O
and represent an admissible motion as in (2.24)
'1j(t) = '17 (t) + eqj(t) (2.39)
where '17(t) denote the actual motion. Note, that qj(t) must vanish at t = tl and
t = t 2 . Then

M= 1'I
'2 (OT aT OU)
~qj+~. qj-~qj dt
0'1j 0'1j 0'1j
(2.40)

where use has been made of (2.39). Integrating the second term in the brackets by
parts, as in (2.28), and introducing the Lagrangian
L=T-U (2.41)
we put (2.40) in the concise form similar to (2.29)

I '2[OL
II o'1j
-~(~~)Jqjdt=O
dt 0'1j
(2.42)

It has been assumed that the functions involved, L, '1j' and qj comply with the
regularity conditions mentioned in Section 2.3. Consequently, Lagrange's equations
of motion follow from (2.42) as

~L _~(o~)=o, j= 1,2, ... n (2.43)


0'1j dt Ol1j
Note that the number of equations obtained is equal to the number of unknown
functions, YJj(t).
2.5. Constrained Motions 51

Consider the example of a simple oscillator consisting of a spring and mass. We


get
T=}mx 2 , U=}kx 2 (2.44)
where x(t) is the coordinate and k the stiffness. Thus
L = }(mx 2 - kx 2 ) (2.45)
Associating x(t) with I](t) and substituting (2.45) for L in (2.43) we get

oL _~(OL)= -2kx-~(2m .\:)= -kx-mx=O (2.46)


ax dt ax dt

which is the well-known equation of motion of harmonic oscillator.

2.5 Constrained Motions


In the above considerations the coordinates, I]j(t), have been taken independent,
which is a rare case in practice. In fact, engineering has often to do with mutually
interacting elements, which imposes constraints on their possible motions.
Let the equations
(2.47)
with the obvious bound N < n represent the holonomic constraints. The functions
f3i are assumed to be continuous and differentiable. Then the modified Hamilton's
principle states that the integral

(2.48)

is stationary for the actual motion of the constrained system in comparison with
neighboring admissible motions. Here, A;{t) are unknown functions, which are
referred to as Lagrange multipliers, and the summation convention applies. Note
that the generalized coordinates, I]j(t), are viewed as independent while performing
the variation of (2.48).
In a way completely similar to that of the previous section we get the
Euler-Lagrange equations for (2.48)

cL d (8L) 8f3i (2.49)


81]j - dt OIL + Ai 81]j = 0
where use has been made of (2.41). Consequently, we get n equations (2.49) and N
equations (2.47) to specify n + N unknown functions, I]j and Ai' In physical terms,
Lagrange multipliers, lei' express generalized forces induced by the constraints. In
fact, each term in the integrand of (2.48) is energy related, which suggests the above
interpretation.
Consider the example of a wheel rolling down on a plane (Fig. 2.3). No slipping
is assumed. The kinetic energy can be written as that associated with the center of
mass motion and that of rotational motion
(2.50)
52 II. Variational Approach and Equations of Motion

Figure 2.3 A wheel rolling down on a plane

Here m is the wheel mass, a its radius, and x the distance. On the other hand, the
potential gravitational energy is
U = mg(L 1 - x)sin</> (2.51)
where the notations Ll and </> should be clear from Fig. 2.3. Since the motion is
pure rolling, the two coordinates, "1 "2
= x, and = fJ, are related by
afJ-x=O (2.52)
which is the single constraint imposed in this case.
Equation (2.49) then yields
maO - A = 0 (2.53)
mx - mg sin </> + A= 0 (2.54)
On differentiating (2.52) twice with respect to time and substituting into (2.53)
we get
A=mx (2.55)
and (2.54) becomes
.. gsin </>
x=-- (2.56)
2
Then we easily obtain
.. gsin </>
(J=-- (2.57)
2a
Equations (2.56) and (2.57) can be integrated with respect to time to provide the
desirable x = x(t) and (J = (J(t).
2.7. D'Alembert's Principle. Nonconservative Systems 53

2.6 Virtual Work


The previous discussions may appear too formal. In fact, one attempts to derive
the law of nature from the fairly complicated and abstract statements. A more direct
and physically meaningful approach might, therefore, be useful as a means of verifying
this analysis.
To this end, consider a discrete system, which consists of N particles situated at
ri and is in equilibrium. The resultant force on each i lh particle, F i, is therefore zero.
We introduce the notion of virtual displacements, bri, as any infinitesimal alterations
of the coordinates, r i, which are consistent with the imposed constraints. Note that
this concept is intimately related to that of admissible functions introduced in
Sections 2.3 and (2.4). Since Fi = 0 we may trivially write
N
L1 Fibri=O
i~
(2.58)

On splitting the resultant forces Fi in the applied forces F!O) and those associated
with constraints, F!e),
(2.59)
we get
N
L F!o).bri = 0 (2.60)
i~l

if the virtual work done by the forces of constraints vanishes


N
L F!e)'bri = 0 (2.61)
i==l

The last equation holds for many cases not only because of Newton's third law
but also for the virtual displacement br i is often orthogonal to F!e). For example,
for a particle on a plane br is tangent to the plane, while F(e) is normal to it. Thus,
(2.60) states a new physically meaningful principle, unlike the trivial result (2.58).
Equation (2.60) is referred to as the principle of virtual work. It is shown in the next
section that it also leads to (2.43) as a particular case.

2.7 D'Alembert's Principle. Nonconservative Systems


Now we turn to the case of motion. Because of (2.1) we may again trivially write
N
L (F i -
i=l
tiJ br i = 0 (2.62)

in place of(2.58). Resolving once again the resultant forces, as in (2.59), we eventually
get
N
L (F!O) - tiJbr i = 0 (2.63)
i~ 1

which is referred to as D'Alembert's principle. Here use has been made of (2.61).
54 II. Variational Approach and Equations of Motion

The superscript (a) in (2.63) and (2.60) could now be dropped, on the understanding
that these equations do not contain the forces of constraints.
The question of fundamental importance is as to how the equations of motion
(2.63) relate to the previously derived equations, say, (2.43). To this end, we transform
(2.63) to a form which employs independent generalized coordinates, YJj. Invoking
the discussion of Section 2.2, we write
rj = rj(YJI' '12 ... YJ3N-K, t)
(i= 1,2, ... N) (2.64)
assuming thereby that the system of N particles has K holonomic constraints. The
particle velocity is
y. = 3'I K ar j aYJj + ar j
(2.65)
, j= I aYJj at at
while the virtual displacement, br j , is

br j
ar·
= ~bY{j (2.66)
oY{j
Note that no variation of time, bt, appears in (2.66), which is consistent with
the definition of virtual displacement. Introducing the generalized forces, Qj,
by
N ar.
Qj= I F(-' (2.67)
j= 1 aYJj
we put the static principle of virtual work (2.60) in the form
N 3N-K
I F;"brj= I QjbY{j=O (2.68)
j= I j= I

where use has been made of (2.66).


It is seen from (2.63) that now we should treat the remaining part
N
I pjbrj (2.69)
i=l

Because of (2.66), we write for a typical term of (2.69)

p·br=mi'·-bY{.
ar (2.70)
aY{j J
where we omitted the subscript i. This may be put in the form

bY{j(mi'.~)
aY{j
= bY{j[~(mt.~) - mt.~(~)J
dt aY{j dt aY{j
(2.71 )

It is seen from (2.65) that


a dr 3N-K aZr aY{n aZr ay
--=
aY{j dt
I
n= I
-~--+-~- = -
aY{jOY{n at oY{jat aY{j
(2.72)
2.7. O'Alembert's Principle. Nonconservative Systems 55

It also follows from (2.65) that


ov or (2.73)
O~j 0l7j
Incorporating (2.73) in the first term of the right-hand side of (2. 71), interchanging
the derivation with respect to t and I7j in (2.72) and substituting into the second
term we get for (2.70)

mi" or = ~(mv.~) _my' ov (2.74)


0l7j dt O~j 0l7j

Consequently, (2.69) becomes

N . ~ _ 3N-K{d[~(N
~ ~
L., p·ur·- L., - -
0 ~ miDi
L., -
2) ~ "
0 NmiDi
- - L., -
2]} .
1517' (2.75)
i=1 ' , j=1 dt O~j i=1 2 0l7ji=l 2 J

Next, recognizing that


N 2
'" mivi (2.76)
L.,-=T
i=1 2
we put D'Alembert's principle, given by (2.63), in the form

3IK[~(OT)_ oT -Q.]i5 17 '=O (2.77)


j= 1 dt O~j 0l7j J J

where use has been made of (2.63), (2.68) and (2.75).


For independent i5l7j (2.77) implies

-d (OT)
-. oT
--~-= Qj, j= 1,2, ... 3N - K (2.78)
dt Ol7j 0l7j
Note that no assumption of the conservative system has in fact been made. Hence,
D'Alembert's principle in the form of (2.68) or (2.78) holds for nonconservative
systems too.
Now we confine the considerations to conservative systems setting that the
generalized forces, Qj, are deduceable from a potential, U,

Q.= - -
oU (2.79)
J 0l7j
which is in accord with (2.12) and (2.34).
Taking into account that U does not depend on ~j, and introducing the
Lagrangian, L, by (2.41), we get from (2.78) and (2.79)

d(OL) oL (2.80)
dt O~j - ol7j =0
recovering (2.43). We have thus confirmed Hamilton's principle by the direct and
physically meaningful considerations.
56 II. Variational Approach and Equations of Motion

2.8 Transition to Continuous Systems


The previous analysis dealt with discrete systems, in other words, systems with a
finite number of degrees of freedom. Real solids are characterized by a continuous
distribution of matter, which implies that such properties as inertia and elasticity
are distributed over certain volume. Consequently, a bulk solid has infinite number
of degrees of freedom and its discrete idealization may not be a satisfactory model.
An extension of Hamilton's principle to continuous systems is therefore of substantial
interest.
To gain insight in mechanical aspects ofthe transition from discrete to continuous
models, we consider a chain of equal mass particles connected by identical massless
springs (Fig. 2.4) having in mind to "convert" it to a rod by a proper mathematical
procedure. Adjacent masses are separated by the distance a, while the spring stiffness
is k. The above "convertion" should apparently do with the limit a -+ O.
Let '1i be the displacement of the ilh mass. Then the kinetic energy, T, and the
potential energy, U, are
T =ZL....
I,
m'1i'2 (2.81)
i

U=tIk('1i+I-'1J 2, (2.82)
i

respectively. Here '1i is the displacement of the i-th mass. The Lagrangian may be
written as
L= tI [m~l- k('1i+ 1 - '1ifJ (2.83)
i

which may be put in the following form convenient for the subsequent limiting
procedure

L -.! ,[m'
2 k ('1i+I-'1i)2]
-2 a L.... -'1i - a
i a a2
(2.84)

Now we imagine a -+ 0 in order to model the above mentioned continuous


distribution of the matter in the case of a uniform elastic bar. We may obviously
set
. m
hm-=p (2.85)
a~O a

i -1 i +1 state of
equi 1i bri urn

J. . .
_..:......:+...
Tli-l
mr:l~]
'I
.........
" ............... PNIII.......I11......."'.IIIIII.III.......I11........
V ....HIV ..."'"
Sta te of
moti on

Figure 2.4 Modelling a rod by discrete system of particles and springs


2.9. Hamilton's Principle for Continuous Systems, Part I 57

with p being the mass per unit length and then, introducing the x-coordinate,
write
(IIi + I -11;) --> l1(x + a) - I1(X) (2.86)
Equation (2.86) implies that
. l1i+1 -l1i
I1m dl1
=- (2.87)
a~O a dx
In the strength of materials the above term is referred to as the relative elongation,
£, and the associated stress is

(J = E£ (2.88)

with E being Young's modulus. On the other hand, the force needed to deform the
spring by the same amount is
(l1i+ 1 -11;)
F=k(l1i+I-I1;)=ka---- (2.89)
a

From comparison between (2.88) and (2.89) and in view of (2.87) we get
ka --> E (2.90)
Making use of the above identifications in (2.84) we get the Lagrangian for the rod

(2.91)

where the axial displacement, 11, is considered as a function of x and t, I1(X, t). The
integral appearing in (2.91) is, of course, a replacement for the summation over a
number of particles appearing in (2.84), with 1 being the rod length. It is convenient
to introduce the Lagrangian density, Lo, given by
(2.92)
where prime denotes the derivative with respect to x. Hamilton's principle takes on

1'2 L dt = 1'2 II (jLo dx dt


the form

M = (j (2.93)
tl tl 0

This representation points out that no variation is assumed of the spatial coordinate
x, and time t, as well as of the limits of integration.

2.9 Hamilton's Principle for Continuous Systems, Part I

The above considerations suggest that the generalization of Hamilton's principle to


three-dimensional continuous systems may be based on the Lagrangian

L= Iv Lodv (2.94)
58 II. Variational Approach and Equations of Motion

where the Lagrangian density, Lo, is


La=Ta-Ua (2.95)
with To and U a being the specific kinetic and potential energy, respectively. Each
of the above energies may be described, in general, by a set of functions, I];(r, t),
i = 1,2 ... and their derivatives. For example, for elastic problems we may introduce
three functions of displacement,l]l, 1]2' and 1]3 along the coordinate axes x, y, and
z, respectively, which depend on the radius vector, r = (x, y, z), and time t.
Consider, first, the case when a continuous system is described by a single
function, I](x, y, z, t). Taking into account that the specific potential energy, U a, may
depend on 1], r, and t, and first spatial derivatives of 1], while the specific kinetic
energy on the first temporary derivative of I] too, we set for the Lagrangian
La = La(/I, Ij, I]x, I].y, I].z, x, y, z, t) (2.96)
Here
dl]
I].x= dx (2.97)
etc.
Hamilton's principle postulates

i5I = 1'2 Jvr 6L o dv dt = 0


11
(2.98)

As (2.31) shows, the variation from a technical point of view may be considered as
differential
(2.99)
In (2.98) five quantities are subject to independent variations, namely, 1], Ij, I],x, I].y'
while r, t and the limits of integration are considered as fixed.
1].=,
In view of (2.99), 6L a , with La, given by (2.96), may be put in the form
oLo aLa. aLa oLo oLo
6L a = - 61] + -. 61] + - 61],x + - 61].y + - 61],z (2.100)
01] 01] Ol],x Ol].y Ol],z
The expression resulting from substitution of (2.100) for 6La in (2.98) simplifies once
again by means of integration by parts, as noted in Sections 2.3 and 2.4. Namely

1"'2 ---!!-
oL 61j dt = - 1'2 d (OL
- ---!!- ) 61] dt (2.101)
01] "dt 01]
and

(2.102)

with similar results for the derivatives with respect to I],y and I].z' The first term on
the right-hand side of(2, 102) vanishes, since 61] = 0 at the limits of spatial integration.
Eventually, (2.98) becomes

i5I= " 1Jvr '2 (aLa doLo


~- dt7i"i/- dxul],x -
doLo d aLa d aLa)
dyol].y - dzol],z 6l]dvdt=0
(2.103)
2.10. Hamilton's Principle for Continuous Systems, Part II 59

Due to the arbitrariness of 15'1 the bracketed term in (2.103) must vanish. On
introducing the notations x = XI' Y = XZ' Z = X 3 , the Euler-Lagrange equation for
(2.103) may be conveniently written as
doLo doLo OLi
--+-----=0 (2.104)
dt o~ dXi 0'1.i 0'1
where the summation convention with respect to the repeated subscript i applies.
Note that (2.104) is a partial differential equation, which governs '1(r,t). This
differs from the case of a discrete system, for which the Euler-Lagrange
equations are ordinary differential equations (2.43) governing the functions '1j(t).
A remarkable similarity in treating the spatial coordinates and time is seen
from (2.104).

2.10 Hamilton's Principle for Continuous Systems, Part II

In many cases, as mentioned earlier; the system is described by two or three functions,
'1i(r, t). Then the Lagrangian density, L o, would be a function of all these quantities,
their first spatial and temporal derivatives, radius vector, r, and time, t. Nevertheless,
since the variations of '1i(r, t) are independent of each other, (2.104) would
hold for each of them. This case, therefore, does not require an additional
treatment.
Furthermore, (2.104) may be generalized to the case when the Lagrangian density,
L o , depends also on spatial derivatives of higher order. The very structure of (2.1 04)
suggests that if, for example,
Lo = Lo(YJ,~, YJ.x, YJ. y, YJ.Z' '1.xx, YJ. yy, YJ.zz, YJ.xy, YJ.xz, YJ.yz, x, y, z, t) (2.105)
than the Euler-Lagrange equation could be written as

d aLo dZ oLo d Z oLo dZ oLo dZ oLo d 2 oLo


------------------- -----
dt o~ dx 2 0YJ,xx dy20YJ.yy dz 2 0YJ.zz dx dy oYJ.Xy dxdz O'1,xz
d Z oLo doLo doLo doLo oLo
-----+--+--+----=0 (2.106)
dy dz oYJ.yz dx oYJ.x dyaYJ. y dz 0YJ.= oYJ
Indeed, a somewhat tedious analysis, which is nevertheless similar to the above
considerations, shows that (2.106) holds.
For elastic solids, three functions, YJi(r, t), i = 1,2,3 may be considered as the
components of the displacement vector, u(r, t). Then the kinetic energy ofa small
element, dm, is

dT=1.dm(OYJi)2 =1. dV(0'1i)2 (2.107)


2 at 2P ot
where P is the mass density, V the volume and the repeated subscript, i, implies
summation. This provides the following kinetic energy

(2.108)
60 II. Variational Approach and Equations of Motion

y
q(x,t)

Figure 2.5 Beam of variable cross section under a distributed load

with the density given by

Too =ZP
1 (0'1i)2
at =zpV 1 2
(2.109)

The potential of external forces, which may be applied within the body and on
its boundary surface, if it exists, depends on the displacement, '1i(r, t). The strain
potential, associated with the energy of deformations, depends on the first spatial
derivatives, and in some theories on higher derivatives. It therefore follows that the
Lagrangian density of elastic solids may belong to the case given by (2.105) on the
understanding that all three functions, '1i(r, t) could be involved. For each of them
(2.106) yields the Euler-Lagrange equation.
Consider the example of a beam of variable cross section subject to a distributed
lateral load, q(x, t), Fig. 2.5. The elementary approach in the frameworks of the

c::r-
strength of materials theory yields

U 0 = EI;X) qw (2.110)

To = p(x) (OW)2 (2.111)


o 2 ot
where w(x,t) is the deflection function, E is Young's modulus, I(x) the moment of
inertia, and p the mass per- unit length. Thus, the Lagragian density is
L = p(x)
o 2
(OW)2
ot
_EI(x)
2
(02W)2
ox2
+ qw
(2.112)

Interpreting w as '1 and evaluating the terms in (2.106) we get


oLo oLo ow
a;- = q(x), ow = p(x) at
oLo
-0-=0,
ow. x

(2.113)
2.11. Minimum of Potential Energy. Boundary Conditions 61

Consequently, the equation of motion (2.106) is

a2 w d 2 [ aZw]
p(x)-z + -dz E1(x)~ = q(x, t) (2.114)
at x ox
which reduces to the well-known result

(2.115)

for the homogeneous beam of a uniform cross section.

2.11 Minimum of Potential Energy. Imposed and Natural


Boundary Conditions

It has been seen that the equations governing various systems may be derived from
a single variational principle as the condition of its stationarity. For conservative
systems it can be further shown that the above condition is, in fact, the one of
minimum provided the problem is static. Moreover, certain boundary conditions
may also be derived from a variational principle. This stresses the generality of the
approach.
To this end, consider an elastic cantliver beam of a uniform cross-section which
is subject to a concentrated static force P at its end, Fig. 2.6. The boundary conditions
are
wo(x = 0) = w~AO) = 0 (2.1 h6)
where Wo(x) is the deflection function. Introducing the notation
w£ = Wo(x = L) (2.117)
we write the expression for the potential energy (the kinetic energy vanishes for the
static case)

u= E1 fL (aZwO)Z dx _ Pwo (2.118)


2 ° ax z L

Representing, in the spirit of Sections 2.3 and 2.4, the admissible deflection
function w(x) as
w(x) = wO(x) + eq(x) (2.119)

I ~P
I

Figure 2.6 Static equilibrium of a cantiliver


62 II. Variational Approach and Equations of Motion

we find the increment of (2.118) due to the deviation of w(x) from wO(x). Indeed

U + L1U = tEl f: (w?xx + eq.xJ 2 dx - P(wZ + eqd (2.120)

which, in view of (2.118), yields

L1U = 1El f: (2ew?x&xx + e2q~xx) dx - ePqL (2.121)

Here
qL=q(X = L). (2.122)
The expression for L1 U consists of terms of the first and second order of smallness.
We therefore put it in the form
L1U = bU + 1b 2U (2.123)
where

(2.124)

b2 U=e 2 El f: q~xxdx (2.125)

Since b 2 U given by (2.125) is obviously positive, it is seen from (2.123) that the
condition of stationary
bU=O (2.126)
is the one of a relative minimum for U. This statement can be extended to other
elastic static systems.
Further, integrate (2.124) twice by parts to obtain

bU = eEl(f: w?xxxxqdx - w?xxxq\: + w?x&xl:) - ePqL (2.127)

Because of the boundary conditions (2.116) imposed on Wo and (2.119) we get


q(O) = q.AO) = 0 (2.128)
and (2.127) simplifies to

bU = eEl f: w?xxxxqdx + eElw?xAL)q.AL) - e[P + Elw?xxAL)]qL (2.129)

For bU to vanish for an arbitrary function, q(x), we have to impose,


w?xxxx = 0 (2.130)
and
w?xx(L) = 0, Elw?xxAL) + P = 0 (2.131)
Equation (2.130) is the Euler-Lagrange equation of the functional given by (2.118),
while (2.131) may be recognized as the shear and moment equations for the free
end. These are referred to as the natural boundary conditions. On the other hand,
2.12. Computer-generated Governing Equations 63

a) stable equilibrium

b) unstable
equilibrium

Figure 2.7 To the definition of stable and unstable equilibria

the boundary conditions given by (2.116) may be called imposed or essential ones,
for they do not follow from the variational formulation.
Thus, the variational approach yields not only the differential equations, but
some of the boundary conditions too. These are associated with the boundary term
in the variation of a functional. This question will be further treated in Section 2.21.
The value taken on by U when a conservative system is in equilibrium is
intimately related to the stability of this state. To this end, assume that the system
gets a small perturbation characterized by the initial displacement, '1?, and by the
initial velocity, ~? It then executes vibrations around the equilibrium state. It can
be shown that, if the extremum of U is minimum, the vibrations remain "small"
and the equilibrium is said to be stable. On the other hand, if the extremum of U
is maximum, then the vibrations become unbounded and the system moves away
from the equilibrium, which is said to be unstable. Figure 2.7 illustrates qualitatively
the above notions.

2.12 Computer-generated Governing Equations


A variety of discrete and continuous systems have been shown to obey the equations
deduceable from the single general principle by the well-defined rules. This makes
possible a computer generation of these equations, in other words, a program which
upon substitution of a proper information on the system, would derive its
Euler-Lagrange equations. Once created, such a program may then be used for
other systems too with a substantial gain in time, efforts, and reliability.
In what follows we consider systems with one and two degrees of freedom and
then continuous systems. Each program is usually constructed through consider-
allons of a particular example, then saved and then applied to other systems.
This allows for illustrations of alternatives typical of any programing, and for
demonstrations of a variety of modifications. This is the primary purpose of
Sections 2.13-2.16. More rational programs, which allow for an automatic
generation of the governing equations, are considered in Sections 2.17 and 2.18.
64 II. Variational Approach and Equations of Motion

Finally, the reference made to the code expression assumes the one of the same
section. In case of a reference to the code expression appearing in the other sections
this is explicitly indicated.

2.13 Single Degree of Freedom


Equation (2.43) shows that for a system of the single degree of freedom, there are
three functions involved, namely, the Lagrangian, L, generalized coordinate, 1], and
generalized velocity, Ii. In the code notations these are
L = la, I] = h, it = ht (2.132)
We have first to inform the code about the functional dependencies involved.
As (2.43) shows, la is considered a function of hand ht, while these two, in turn,
are functions of t. A convenient way to let the SMC know this, is to resort to depends
(el) depends (la, [h, ht], [h, ht], t);
(dl) [la(h, ht), h(t), ht(t)]
where in (dl) the code acknowledges the information.
At this stage the code is not aware of the relation
dh
ht=- (2.133)
dt
Furthermore, we still have to "enforce", according to the structure of (2.43), the
replacement
dht d2 h
-->- (2.134)
dt dt 2
which should be made after the differentiation with respect to ht has been completed.
This may be done by
(c2) tellsimpafter('diff(ht, t), 'diff(h, t, 2))$
Now the code knows the preliminary information concerning the structure of
the Euler-Lagrange equation and we can program the equation (2.43)
(c3) diff(la, h) - 'diff(diff(la, ht), t) = 0;
dla d 2 1a
(d3) ----=0
dh dht dt
The prime in the above relations prevents the immediate evaluation of time
derivatives, while $ the display of the code response.

2.13.1 Harmonic Oscillator

The program is ready and we may try to use it for various systems of one degree
of freedom. Our first attempt is of course a simple harmonic oscillator, which has
been already considered in Section 2.4.
2.13. Single Degree of Freedom 65

According to (2.45) we define the Lagrangian for the system at hand


(c4) la = m*ht'2/2 - bh'2/2;
ht 2 m h 2k
(d4) la=----
2 2
where the replacement x = h, x = ht, have been made. Substitute this into (d3)
(c5) subst(%, d3);

(d5) ~(hem _ h2k)_~(ht2m _ h 2k)=0


dh 2 2 dht dt 2 2
and evaluate the derivatives involved, in other words, "cancel" prime appearing in
(c2) and (c3)
(c6) ev(%, diff);
d2 h
(d6) --m-hk=O
dt 2
which coincides with (2.46).
Furthermore, we may try to solve this equation by using ode command
(c7) ode(%, h, t);
Is km positive, negative, or zero?
We reply
pos;
and get

(d7) . (sqrt(k)t)
h = %kl SIn --- + %k2cos (sqrt(k)t)
sqrt(m) sqrt(m)
which is the well-known solution for the harmonic oscillator. The constants %k 1
and %k2 are to be specified from initial conditions.
We may wish to work with differential equations written in indicial notations
rather than in the form of (d6) and (d3). Then we state the following option
true
(c8) derivabbrev:true$
Now, say, (d6) looks like this
(c9) d6;
(d9) - httm - hk = 0

2.13.2 A Nonlinear Pendulum

After saving the above program under the name, say, "lagr"
(c1 0) save("lagr", all);

we may use it for analysis of other systems of one degree of freedom, say, a pendulum
66 II. Variational Approach and Equations of Motion

m
Figure 2.8 To non-linear oscillations of a pendulum

shown in Fig. 2.8. Its kinetic energy is


T = lmLl(jl (2.135)
and its potential energy is
U = mgL(l - cos 8) (2.136)
Replacing 8 by hand (j by ht we define the Lagrangian
(cI2) la = m* L A2*ht A2/2 + m* g* L*(l - cos(h));
ht 1 J2m
(dI2) la=-2-+g(1-cos(h))lm

and then repeat the previous commands (c5) and (c6), namely
(c13) subst(%, d3);

(ht211m + g(1 _ COS(h))lm) - (ht2J2m + g(1 - COS(h))lm) = 0


(d13)
2 h 2 htt

(cI4) ev(%,diff);
(dI4) - htt l2 m - gsin(h)lm = 0
This is the equation for non-linear (large) oscillations of a pendulum
BL+gsin8=O (2.137)
which follows from (d14).
Attempting to solve (2.137) we invoke ode once again and get a somewhat
disappointing output
(c17) ode(dI4,h,t);

[
1
/ sqrt
(gCOS(~)I- %kl g) dh
(dI7) - - - - - - - - - - - ' - - = t + %k2,
sqrt(2)

]/
[
I

/ sqrt
I
(gCOS(h) - %kl g )
I
dh

- - - - - - - - - - = t + %k2,
1
sqrt(2)
2.14. Two Degrees of Freedom. Double Nonlinear Pendulum 67

The code, in fact, goes through various routines in trying to solve (2.135) but is
only capable of providing the above two expressions for h(t) in the implicit form.
We may therefore appreciate the difference between the linear equation (d6) and
nonlinear one (dI4).

2.14 Two Degrees of Freedom. Double Nonlinear Pendulum

We deal with a more general program of which the previous one is a particular
case. Consider a double pendulum shown in Fig. 2.9, having in mind that a program
should then be used for analysis of other systems too.
The potential (gravitational) energy in the notations of Fig. 2.9 is
U= -m 2g2L 2cos8 2 -(ml +m2)gL1cos8 1 (2.138)
while the kinetic energy is
T = t(m 1 + mz)LiBi + tmzL~8~ + m2L1Lzfl182 cos(8 1 - 8 z ) (2.139)
Introducing the notations 8 1 = hI, 8 z = h2, 81 = hIt and 8z = h2t for the
generalized coordinates and velocities we first establish the relevant dependencies
(cl) depends (la, [hI, h2, hit, h2t], [hI, h2, hI t, h2t], t);
(dl) [la(hl, h2, hit, h2t), hl(t), h2(t), hlt(t), h2t(t)]
The code now knows that the Lagrangian is a function of two generalized
coordinates and their temporal derivatives, while these, in turn, depend on time.
Unlike the previous case, we introduce two Euler-Lagrange equations in agreement
with (2.43)
(c2) diff(la, hl)-'diff(diff(la, hit), t)=O;
dla dZla
(d2) ----=0
dhl dhItdt
(c3) diff(la, h2) - 'diff(diff(la, h2t), t) = 0;
dla dZla
(d3) ----=0
dh2 dh2tdt
where prime has again been used to delay the evaluation of the temporary derivative.

m2 Figure 2.9 To non-linear oscillations of a double pendulum


68 II. Variational Approach and Equations of Motion

Next, we inform the code that hit and h2t are the first derivatives of hi and h2,
respectively
(c4) hit = 'diff(hl,t);
dhl
(d4) hlt=-
dt
(cS) h2t = 'diff(h2, t);
dh2
(dS) h2t=-
dt
and complete thereby the information of general nature the code must know of.
Note the difference compared with the previous case where tellsimpafter has been
used.
We turn to the particular problem under consideration and inform the code
that the Lagrangian is given by the difference between (2.139) and (2.138)
(c6) la =(ml +m2)*11 '2* h I t'2/2 + m2*12'2*h2t'2/2 + m2*11 *12*hl t *h2t*
cos(hl - h2) + (ml + m2)*g*11 *cos(hl) + m2*g*12*cos(h2);
h It2112(m2 + m I) h2t 212 2m2
(d6) la= 2 +gcos(hl)ll(m2+ml)+--2--

+ hit cos(h2 - hi )h2t11l2m2 + g cos(h2)12m2


and substitute this into (d2) and (d3)
(c7) subst(~;';,d2)$
(c8) subst(d6,d3)$
We then evaluate the derivatives
(c9) ev(d7,diff);
dhlt
(d9) ---112(m2 + ml) - gsin(hl)ll(m2 + ml)
dt

dh~
- cos(h2 - hl)--1112m2 + (dh2
- - -dhl) sin(h2 - hl)h2tll12m2
dt dt dt
+ hltsin(h2 - hl)h2tl1l2m2 = 0
(clO) ev(d8,diff);
dh2t
(dIO) - --12 2m2 - hit sin(h2 - hl)h2tll12m2
dt
dh2 dhl)
+hlt ( - - - sin(h2-hl)11l2m2
dt dt
dhlt
-Ttcos(h2 - hl)11l2m2 - gsin(h2)12m2 = 0

Now we use (d4) and (dS) in (d9) and then in (dIO)


2.15. Dynamic Shock Absorber 69

(ell) subst([d4, d5], d9);


dZhl
(d 11) - dt2IIZ(m2 + m!) - g sin(hl)l1 (m2 + m!)

+dh2
- (dh2
- -dh
-1 ) sin(h2-hl)11l2m2
dt dt dt
dhl dh2 dZh z
+ citcit sin (h2 - hl)11l2m2 - de cos(h2 - hl)l1l2m2 = 0

(el2) subst([d4, d5], dl0);


d Zh2 Z dhl(dh2 dhl)
(dI2) -dt2 l2 m2+ cit cit-cit sin(h2-hl)l1l2m2

dhl dh2 d Zhl


- citcitsin(h2 - hl)l1l2m2 - dt2cos(h2 - hl)11l2m2

- g sin(h2)12m2 = 0
and thus complete the derivation of the Euler-Lagrange equations. Nevertheless,
we may simplify the appearance of (dll) and (dI2). Since these expressions involve
trigonometric functions we try trigreduce
(c13) trigreduce(dll);
dh2)Z dZh2 d Zhl
(dI3) ( cit sin(h2 - hl)11l2m2 - dt2cos(h2 - hl)11l2m2 - dt2 11Zm2

d Zhl
- gsin(hl)l1m2 - dt211zm1 - g sin(hl)l1ml = 0

(el4) trigreduce(d 12);

(dI4) d Zh2 zm2 - (dhl)Z


- -z-12 - sin(h2 - hl)l1l2m2
dt dt
d Zhl
- dt2cos(h2 - hl)11l2m2 - g sin(h2)12m2 = 0

The final form of the governing equations is given by (dI3) and (dI4).

2.15 Dynamic Shock Absorber


The above program may be used for other systems too. Furthermore, it may be
simplified by putting together elementary commands.
To this end, consider the dynamic shock-absorber subjected to the external force
Po sin wt which is shown in Fig. 2.10. The kinetic energy is the sum of the kinetic
energies of the two masses
(2.140)
70 II. Variational Approach and Equations of Motion

Xz Figure 2.10 Dynamic shock absorber

where x\ and X 2 are the displacements of the masses m\ and m 2 , respectively, from
the position of equilibrium. The potential energy is
(2.141)
where the first two terms are the elastic energies of the springs while the last term
is the work done by the external force.
Denoting x\ and X 2 by hI and h2, respectively, and .x\ and x2 by hIt and h2t,
respectively, we define the Lagrangian
(cI6) la = (ml *hlt'2 + m2*h2t'2)/2 (kl *hl '2 + kh(h2 - hlr2)/2
+ pO*sin(w*t)*hl;
(h2 - h1) 2 k2 + hl 2 kl h2t 2 m2 + hlt 2 ml
(dI6) la = hlpOsin(tw) - 2 + 2

and substitute this into (d2) and (d3) of the previous section
(el7) subst(%, d2)$
(cI8) subst(dI6,d3)$
The subsequent substitutions and evaluations reproduce the commands
(c9)-(el2) of the previous section and may be simplified in the following way:
(el9) ev(subst([d4, dS], dI7), diff);
2hlkl - 2(h2 - hl)k2 d 2 hl
(dI9) pOsin(tw) - 2 - de m! = 0

(c20) ev(subst([d4, dS], dI8), diff);


d 2 h2
(d20) -(h2-hl)k2- dt 2 m2=0

Noting that (d 19) is not in its simplest form, we try


(c2l) ratsimp(dI9);
d 2 hl
(d2l) pOsin(tw)+(h2-hl)k2-hlkl-dt"2ml =0

The equations are eventually given by (d20) and (d2l). The theory of the shock
absorber has been given in some detail in Chapter 1.
2.16. Continuous Systems 71

2.16 Continuous Systems

We go over to continuous systems for which the Euler-Lagrange equations include


also spatial derivatives and are in a more complicated form. Therefore a computer
generation may be particulary desirable.
It is seen from (2.106) that the Lagrangian density, La, is a function of the
generalized coordinate, I), its first spatial and temporal derivatives, and the second
spatial derivatives. Let us confine ourselves to the planar case with the coordinates
x and y. Besides the above functional relations, there may be other quantities
involved, like the cross-sectional area, say, A, the moment of inertia, I, and the
density, p, which also might be spatial variables.
We first state the above functions
(cl) depends(LO, [h, ht, hx, hxx, hy, hyy, hxyJ, [h, ht, hx, hxx, hy, hyy, hxyJ,
[t, x, yJ, [a, i, ro, hhJ, x, y);
(dl) [LO(h, ht, hx, hxx, hy, hyy, hxy), h(t, x, y), ht(t, x, y), hx(t, x, y),
hxx(t, x, y), hy(t, x, y), hyy(t, x, y), hxy(t, x, y), a(x, y), i(x, y),
ro(x, y), hh(x, y)]
where the following notations have been used
LO = La, h= I), ht = I)." hx = I),x, hy = I),y,

hxx = I),xx, hyy = fl. yy , hxy = I),xy (2,142)


a = A, i = I, 1'0 =P
We have also introduced an additional "free" quantity, hh(x,y), which may be used
for various programming purposes.
Now we issue the Euler-Lagrange equation (2.106) in the above notations
(c2) diff(LO, h) - 'diff(diff(LO, ht), t) - 'diff(diff(LO, hx), x)
- 'diff(diff(LO, hy), y) + 'diff(diff(LO, hxx), x, 2)
+ 'diff(diff(LO, hyy), y, 2) + 'diff('diff(diff(LO, hxy), x), y) = 0;
d 3 \O d 2\O d 3 lO d 3 lO
(d2) --~- --+ + ---,---~2
dhyy dy2 dhy dy dhxy dx dy dhxx dx
d 2lO d 2lO dlO
------+-=0
dhx dx dht dt dh
and then supplement it by typing in the following lists:
(c3) [ht = 'diff(h, t, I), hx = 'diff(h, x, I), hxx = 'diff(h, x, 2)J;

(d3) [ ht = dh hx = dh hxx = d 2h]


dt' dx' dx 2
(c4) [hy = 'diff(h, y, I), hyy = 'diff(h, y, 2), hxy = 'diffCdiff(h, x, 1), y)];
dh d 2h d 2h ]
(d4) [ hy=-, hyy=-, hxy=--
dy dy2 dxdy
The commands (c3) and (c4) inform the code that there exist additional differential
equations which should be treated jointly with (c2). Note that (c3) and (c4) could
72 II. Variational Approach and Equations of Motion

be united in a single list. Nevertheless, the given formulation is more convenient if


the problem is spatially one-dimensional. Finally, we store the program for further
applications.
Let us derive the equation of motion of a uniform plate with its help. The
elasticity theory provides the following expression for the potential energy density
of the plate subjected to the lateral load q:
u 0 = D[t(w,x.x + W,yy)2 - (1 - v)(w,x.xw,yy - W~Xy)] - qw (2.143)
where w is the deflection, v Poisson's ratio, and
Eb 3
D=-:-:-:------;;-:- (2.144)
12(1 - v2)
is the flexural stiffness. In (2.144) E is Young's modulus and b the plate thickness.
On the other hand, the kinetic energy, T, is
(2.145)
where p is the mass density per unit area.
We therefore type in the Lagrangian density, Lo = To - U 0, and then substitute
this into (d2)
(c6) LO = - h*q(x, y, t) + (hxy A2 - hxx *hyy)*(1 - m)*sd
+ (hxx + hyyr2*sd/2 + ro*ht A2/2$
(c7) subst(%, d2)$
The notations used are
LO = L o , h = w, sd = D, m=v (2.146)
It remains to incorporate (c3) and (c4) to get the Euler-Lagrange equation
(c8) subst(d3, %)$
(c9) ev(subst(d4, %), diff);

d4h d 4h ) (d 4h d4h ) d 2h
(d9) - q (x, y, t) + ( dy4 + dx2 dy2 sd + dx4 + dx2 dy2 sd - dt2 ro = 0

This might be further simplified to the standard form


(clO) ratsimp(d9);
d4h d4h d 4h ) d 2h
(dlO) - q(x, y, t) + ( dy4 + dx 4 + 2 dx 2 dy2 sd - de ro = 0

which is the well-known equation governing the plate vibrations in the frameworks
of the linear theory.

2.17 Automaric Generation, Part I


Improved programs which automatically derive the equations, provided the
Lagrangian is given, are considered in what follows. They are mainly based on
compound statements.
2.18. Automatic Generation, Part II 73

Consider again a simple example of the system of one degree of freedom to


illustrate the approach. Denoting, for brevity,
La = L, h= 1], ht = 1]" (2.147)
we define the function of the Lagrangian, La = L, say, er(La), in a form of the com-
pound statement. The first part ofthis statement represents the left-hand side of(2.43),
while the second substitutes h,1 for ht. We issue, assuming that (el) of Section 2.13
still holds
(c2) er(La):= (diff(La, h) - diff(diff(La, ht), t), subst(diff(h, t), ht, %%));
(d2) er(La):= (diff(La, h) - diff(diff(La, ht), t), subst(diff(h, t), ht, ~~%))
Note that in the compound statement %% refers to the previous substatement.
To verify the program we try the harmonic oscillator, typing in
(c3) er(m*ht A2/2 - bh A2/2);
and get
d2h
(d3) --m-hk
dt 2
Note, that this is the correct expression since we derive only the left-hand side of (2.43).
We may readily verify the previous result for the non-linear pendulum typing in
(c4) er(m*L A2*ht A2/2 + m*g*L*(1 - cos(h));
where the argument represents again the corresponding Lagrangian given by (dI2),
Section 2.13.2. The response is
d2h
(d4) - - 1 2 m - gsin(h)lm
dt 2
which agrees with (dI4) of Section 2.13.2.
It is seen that all which is needed is the expression for Lagrangian and no other
commands are necessary. Nevertheless, the output may not always be in its simplest
form. In these cases additional statements, which depend on the particular problem
at hand, should be issued to simplify the appearance of the results.

2.18 Automatic Generation, Part I I

Consider systems of two degrees of freedom. Instead of a straightforward extension


of the previous program we construct an alternative, and, perhaps, more convenient
one.
Knowing that the Lagrangian is a function of two generalized coordinates, I] 1
and 1]2 and their temporary derivatives, we state
(el) depends([hl, h2, hit, h2tJ, t)$
where
hl=111' h2=112' 111t=l1l." 112t = 112.1 (2.148)
74 II. Variational Approach and Equations of Motion

Hence, the code now knows that these quantities are functions of time. Let us
supplement this by the list
(c2) [hlt:diff(hl, t), h2t:diff(h2, t)]$
which informs the code that
hIt = hI.! and h2t = h2.! (2.149)
It remains to issue the two Euler-Lagrange equations, according to (2.43). We
carry this out by introducing two functions, eulal(la) and eula2(la) with their
argument, La, being the Lagrangian of the system
(c3) eulal (La):= (diff(La, hI) - diff(diff(La, hlt), t),
trigreduce(%%), ratsimp(%%))$
(c4) eula2(La):= (diff(La, h2) - diff(diff(La, h2t), t),
trigreduce(%%), ratsimp(%%))$
It is seen that the functions are defined as the left-hand side of (2.43) followed
by the commands of simplifications. The general structure is that of a compound
statement. Note, that the simplification commands are not always rational to include
in this statement. It may be more convenient to type them in after executing the
basic program, since their efficiency depends on the particular case under investi-
gation. They appear in (c3) and (c4) for the illustration purposes.
The above four statements allow for an automatic derivation of the Euler-
Lagrange equations upon identification of a particular form of the Lagrangian,
La. To use this program we first specify La and then request eula 1 (La) and eula 2 (La)
to be evaluated. For example, for the double non-linear pendulum (Fig. 2.9) we issue
(c5) La:(ml + m2)*11 A2*hW2j2 + m2*lr2*h2t A2j2 + m2*11 *12*hlt*h2t*
cos(hl- h2) + (mt + m2)*g*11 *cos(hl) + m2*g*12*cos(h2)$
(c6) eulal(La);
(d6) - sin(hl)l1(m2 + ml)g + (( (d:t2r sin(h2 - hI)

d 2h2 ) d2h l ) d 2hl


- de cos(h2 - hI) 1112 - de 112 m2 - de 11 2ml
(c7) eula 2 (La);

(d7) ( (( - (d:tl r sin(h2 - hI) - d;~l cos(h2 - hl))l1

d2h2 )
- g sin(h2) ) 12 - dt2122 m2.

where use has been made of (2.138) and (2.139) to define the Lagrangian. The above
expressions (d6) and (d7) coincide with (dI3) and (dI4) of Section 2.14. Note that
the number of statements have been reduced from 14 to 7, compared to the program
given in Section 2.14.
Turning to continuous systems, we adopt a slightly modified formulation to
incorporate new variables. In the notations of Section 2.16 we type in
(cl) depends([h, ht, hx, hxx, hyy, hxy, hy], [t, x, y]);
(dl) [h(t, x, y), ht(t, x, y), hx(t, x, y), hxx(t, x, y), hyy(t, x, y),
hxy(t, x, y), hy(t, x, y)]
2.19. Second Variation and Nature of Extremum 75

(c2) ht:diff(h, t)$


(c3) hx:diff(h, x)$
(c4) hy:diff(h, y)$
(c5) hxx:diff(h, x, 2)$
(c6) hyy:diff(h, y, 2)$
(c7) hxy:diff(h, x, 1, y, 1)$
Note that (c2)-(c7), given above, may also be formulated by a single statement in
the form of list as in the earlier case of a system of two degrees of freedom.
Next, we formulate the Euler-Lagrange equation (2.106) in the form ofa function,
say, eula(La), defined as a compound statement
(c8) eula(LO):= (diff(LO, h) - diff(diff(LO, ht), t) - diff(diff(LO, hx), x)
- diff(diff(LO, hy), y) + diff(diff(LO, hxx), x, 2) + diff(diff(LO, hyy), y, 2)
+ diff(diff(LO, hxy), x, 1, y, 1))$
To use this program we need only to call eula of a specified argument LO. Let
us verify this for the case of dynamic motions of elastic plate
(c9) eula( - h*q(x, y, t) + (hxy'2 - hxx*hyy)*(1- m)*sd
+ (hxx + hyyr2*sd/2 + ro*ht'2/2);
d 4h d 4h ) (d 4h d 4h ) d2h
(d9) - q(x, y, t) + ( dy4 + dx2 dy2 sd + dx 4 + dx 2 dy2 sd - dt2 ro

where LO has been defined as in (c6) of Section 2.16. The result (d9) coincides with
(d9) of that section. The examples considered show that compound statements make
the programs far more compact and easy to use.

2.19 Second Variation and Nature of Extremum

Generalizing considerations of Sections 2.3 and 2.11, we derive in the sequel a


condition which helps to clarify the nature of the extremum of a functional. This
extremum may either be a minimum or maximum. By changing the sign of the
functional we transform a minimum to maximum and vice versa. It is sufficient
therefore to consider the conditions, say, of minimum only.
Denote a minimum of the functional, J,

J = fX2

x,
f(y,x,y')dx (2.150)

as J O and assume that yO (x) yields this minimum. Then the quantity AJ, given by
!J.J = J - J O > 0 (2.151)
is the increment of J. We may write

!J.J = f X2

Xl
Af dx (2.152)
with
Af = f(y,x,y') - f(yO,x,yO') (2.153)
To represent AJ in terms of variations by(x) and by'(x), we invoke (2.24) and
76 II. Variational Approach and Equations of Motion

write
by = y - yO = eq
(2.154)
by' = y' - yO' = eq'
where y is an admissible function and e is a small parameter. Assuming in the sequel
that by and by' are small enough, which is known as the case of weak variations,
we use a Taylor expansion for I1J given by (2.153)
I1J = bJ + tb 2 J + ... (2.155)
where
bJ = J. y by + J y ' by' (2.156)
is the first variation of J and
b 2 J = f.yy(by)2 + 2f.yy' by by' + f.Y'y,(by')2 (2.157)
its second variation.
Now we may put (2.152) in the form
I1J = bJ + tb 2 J + ... (2.158)
where
bJ=fx2bJdX (2.159)
x,
is the first variation of the functional J and

(2.160)

its second variation, which has been introduced earlier in Section 2.11. Here use
has been made of (2.152).
Note that according to (2.31)

dJ\ e
bJ=- (2.161)
de £=0
while for the second variation we may write

d-
b2 J =
2
J\ e2 (2.162)
de 2 .=0

It has been shown in Section 2.3 that bJ = 0 is a necessary condition of


extremum. Indeed, assume that bJ # O. Then, as follows from (2.152), (2.155) and
(2.156), bJ changes the sign if by does, because

by' = eq' =~by =~(eq) (2.163)


dx dx
Thus, in this case, J O is not a minimum of J, which is contrary to the assumption
made.
Given the relation
(2.164)
2.20. Legendre's Condition 77

we observe from (2.158) that the behavior of J in vicinities of J O is governed by its


second variation, 15 2 J. For
(2.165)
we get a relative minimum, while for
b 2 J <0 (2.166)
relative maximum.

2.20 Legendre's Condition

Let us generalize (2.165) to


b2 J ~ 0 (2.167)
as the condition of minimum. Then it is possible to show that (2.167) implies
J.y.y. ~ 0 (2.168)
evaluated for y(x) = yO (x).
To this end, note that, because by(x = Xl) = by (x = x 2) = 0, we get

(2.169)

The second variation given by (2.157) and (2.160) becomes

15 2J = I X1

Xl [P(by)2 + R(by')2] dx (2.170)

where

P= (J.yy - :x J,yy.) (2.171)

R= J,y'Y'
Assume that for some Xo (Xl ~ Xo ~ x 2) R(xo) is negative
R(xo) = - 2d (d > 0) (2.172)
Then for an interval (al,a l + h), which contains Xo and is enclosed by the interval
we may get
(X l ,X 2 )

R(x) < - d (2.173)

because of the continuity of R(x). Let M be the maximum of \PI at (X l ,X2)


and

sin 21t (X-a l ), al~x~al+h


by (x) = { h (2.174)
0, otherwise
78 II. Variational Approach and Equations of Motion

Then

Ix> [p(c5y)2 + R(c5y'f]dx =


fa, +h
Psin 4
n(x - a )

h
1 dx

fa,
x, a,
+h n2 2n(x - a ) dn 2
+ R-sin 2 1 dx<Mh-- (2.175)
a, h2 h h
Indeed,
n(x - a )
Psin 4 1 :::;P:::;M
h
. 2 2n(x - ad . 2 2n(x - ad
R sm h < - d sm h :::; - d (2.176)

When h is small enough, the left-hand side of (2.175) becomes negative


c5 2 J < 0 (2.177)
contrary to (2.165). Consequently, the condition of a minimum is opposite to that
expressed by (2.173)
js'Y' > 0 (2.178)
This may be extended to the form given by (2.168), which is known as Legendre's
condition.
Note that (2.168) is only a necessary condition of minimum. Nevertheless, in
most engineering problems, Legendre's condition supported by numerical
investigations in the vicinity of extremum may be sufficient for clarifying its
nature.
Consider an example of the functional

J(y) = J: y'3(x)dx, a> 0 (2.179)

with the boundary conditions


y(O) = 0, y(a) = 1 (2.180)
Legendre's condition takes the form
!,y.y. = 6y' (2.181)
the sign of which depends on y'.
We therefore write the Euler-Lagrange equation for (2.179)
y"(x) = 0 (2.182)
and find
yo(x) = C1 + C 2x (2.183)
The coefficients C 1 and C 2 follow from the boundary conditions (2.180). We get

(2.184)
2.21. Transversality Conditions 79

Substituting this for y into (2.181) yields


6
(2.185)
, =->0
fy·y· a

which satisfies the above necessary condition for a relative minimum.

2.21 Transversality Conditions


In Section 2.11 we dealt with the so-called natural boundary conditions, namely,
those which follow from a variational formulation and are not imposed a priori.
Here we develop a more systematic approach to these conditions which are
associated with the extremum of a functional.
Removing the limitations that the end points, Xl and X 2 are given as well as the
y(xd and y(x 2 ), (the so-called fixed endpoint problem) consider the yx-plane and
assume that the initial point, Xl>YI = y(xd, and the final point, X2 ,Y2 = y(X2),
belong to arbitrary curves shown by the dashed lines in Fig. 2.11. This is known as
the variable endpoint problem. Hence, unlike previous considerations, the variation
by (x) this time may not vanish at the end points and is given by
by = y(x + bx) - yO (x) (2.186)
This differs from by defined for the fixed endpoint conditions and given by (2.154).
The first task is therefore to derive the relation between by and by. Combining
(2.186) and (2.154) we get
by = y(x + bx) - y(x) + by (2.187)
On the other hand,
y(x + bx) - y(x):::: y'(x)bx (2.188)
and (2.187) yields
by=by- y' bx (2.189)
which is the desirable relation between the two variations, by and by.
Now we go over to the problem of finding the first variation of J defined by

y
/
,L-'"
JoT
--- ....
......... ..J
/

x
Figure 2.11 To the transversality conditions
80 II. Variational Approach and Equations of Motion

(2.150), on the understanding that the end points, Xl' Yl and X 2, Y2' this time are
free to move along the above curves.
The rule of differentiation of an integral with variable limits provides

oJ= I X> ofdx+(Jox) 12


Xl 1
(2.l90)

which differs from (2.l59) by the second term on the right-hand side. From (2.l61)
and (2.27)-(2.29), we get

X>
I Of dx =
d)
IX> ( f,y - d f.y. oydx + (J,y'oy) 12 (2.191 )
XI Xl X 1

and, in view of (2.189),

X> IX>( f,y-df,y'


d ) oydx+[f,y·($"Y-iox)] 12 (2.l92)
I ofdx=
Xl Xl X 1

Equation (2.l90) finally becomes

(2.l93)

which generalizes the appropriate result of Section 2.3.


The first term of(2.l93) contains the Euler-Lagrange equation. Being a necessary
condition of extremum and derived earlier under more restrictive assumptions, it
obviously holds for the present case too. The second term, given by
[(J - if,y' )ox + f.y. $"y] Ii (2.l94)
is referred to as the transversality condition. It represents the influence of boundary
conditions on the extremum and contains four variations, ox l , ox 2, $"Yl and $"Y2'
Consequently, the correct statement of the problem should not include more than
four boundary conditions. If these are completely specified, then the term given by
(2.194) vanishes, otherwise (2.194) yields the natural boundary conditions considered
first in Section 2.11.

2.22 Generalizations and Transformations of Variational Problems


In many practical cases the functional to be minimized does not have the form given
by (2.150). For example, Section 2.l1 deals with a cantilever subjected to a
concentrated force and the functional given by (2.118) consists not only of an integral
term, but also an expression containing a boundary value of the deflection.
Generalizing this, we represent a functional of interest as

(2.l95)

where g is a given function of the end points. It is possible to show that the
Euler-Lagrange equation (2.30) holds for (2.l95) too, while the transversality
2.22. Generalizations and Transformations of Variational Problems 81

condition becomes
[(f - y'f.y·)bx + f.y.byJli + bg = 0 (2.196)

where

bg = g,X! bX 1 + g,x2 6x 2 + g,y! bYl + g,y,bYz (2.197)


A natural generalization of (2.195) is a functional containing n functions of
x, namely Yl (x), Y2(X) ... Yn(x) and their derivatives. Denoting this system offunctions
as Yk, we write

(2.198)

The Euler-Lagrange equations for (2.198) were obtained in Section 2.4 while the
transversality condition is as follows:

(2.199)

where
n

bG = G,XI bX 1 + G. X2 bX 2 + L (G,Ykt bYkl + G,Yk' bYk2)


k=l
(2.200)

Equations (2.199) and (2.200) represent an obvious generalization of (2.196) and


(2.197).
A functional may also contain second and higher derivatives as Section 2.10
shows. Consider, say, the case

J = f.' f(x,y,y',y")dx (2.201)

We may introduce, as another approach, a function w by the relation


w=y' (2.202)
and then treat the functional

J1 = I X2

x,
[f(x,y, w, w') + },(w - y')Jdx (2.203)

where A is the Lagrangian multiplier. The functional J 1 contains only the first
derivatives and may be treated by the above methods. Note that, depending on the
type of constraints imposed, the Lagrangian multiplier may be either a constant or
a function.
Another example is the case when the constraint is an inequality, say
(2.204)
We introduce a real variable, rx, and set instead of (2.204)
y' - K - !X 2 = 0 (2.205)
The problem reduces to finding those y(x) and rx(x) which comply with (2.205) and
82 II. Variational Approach and Equations of Motion

minimize the function J,

J = IX2

x,
[f(x, y,y') + Jc(y' - K - (X2)]dx (2.206)

Engineering problems often lead to the need of minimizing functions of integrals.


For example,

I X2

II (x, y, y')dx

I
Xl
X2
(2.207)
12 (x, y, y')dx
Xl

Computing the first variation, we get


J I J 2 M I -J I M2
fJ-=------::--- (2.208)
J2 J~
Assuming that minimum is achieved when y(x) = yO (x) and denoting
J I (yO) J?
y = J 2 (yO) = J~ (2.209)

we get from the numerator of (2.208)

fJJ 1 - yfJJ 2 = fJ I
X

Xl
2 (II - yI2)dx = 0 (2.210)

This provides the Euler-Lagrange equation governing y(x)


d
II,y - yI2,y - dx (fl,y' - yI2,y') = 0 (2.211)

Consider the following example:

JI= !a l
y' 2 dx, J 2= !a
l
y 2 dx (2.212)

with the imposed conditions


y(O) = y(l) = 0 (2.213)
Hence
II = y'2, 12 = y2 (2.214)
and (2,211) yields
y" +yy= 0 (2.215)
The solution which satisfies (2,213) is
y=sinJYx (2.216)
with

n = 1,2,3 ... (2.217)


2.23. Minimum Pressure Drag 83

2.23 Minimum Pressure Drag

Consider a body of revolution in a gas flow (Fig. 2.12). The body is being translated
with zero angle of attack. The normal pressure on its surface may be expressed as
p = 2pv 2 sin 2 8 (2.218)
where p is the fluid density and v is relative speed, while the meaning of 8 should
be clear from Fig. 2.13. Considering an elementary ribbon of width (1 + y'2}tdx and
radius y(x) (see Fig. 2.13), we may derive the following force exerted on the ribbon
by the flow:
dF = p [2ny( 1 + y'2)tJ sin 8 dx (2.219)
Integrating this, after substitution of (2.218) for p, we get the force

F = 4npv 2 [ ' y sin 3 8(1 + y'2)1- dx (2.220)

Yl
gas flow
x

Figure 2.12 Body of revolution in a gas flow

y(x)

Figure 2.13 Elementary ribbon


84 II. Variational Approach and Equations of Motion

where Xl designates the body length. For a slender body we set

.e y' 1
+ y' 2 )+ ~Y
sm =
I
« (2.221)
(1
Then F becomes

F = 4npv 2 f:' y'3 y dx (2.222)

This raises the question about such a shape, y(x), that would provide a minimum
for F. The y(x) is also subject to the following conditions at the ends
y(O) =0
(2.223)
Y(Xd=YI
as seen from Fig. 2.12.
The Euler-Lagrange equation (2.30) is
d
y'3 __ 3y'2y=0 (2.224)
dx
which simplifies by the following evaluation of the last term on the right-hand side:
(c3) depends(y, x);
(d3) [y(x)]
(c4) y*diff(y, xr2;

(d4) YG~r
(c5) diff(%, x);
2
dyd y (d y )3
(d5) 2y dx dx 2 + dx

Thus we get for (2.224)


(c6) diff(y,xr3 - 3*d5;

(d6) ( -d
dx
y )3 -3 (2dydxY-ddx-2y2+ (d-dxy )3)
(c7) ratsimp(%);

(d7) _6ydyd2y _2(d y


dx dx 2 dx
)3
Adjusting properly the derivabbrev-option, we get a more compact appearance,
(c8) derivabbrev:true;
(d8) true
(c9) d7 = 0;
(d9) - 6yyxYxx - 2(yy =0
The form of the Euler-Lagrange equation (2.224) given by (d9) may be solved
2.23. Minimum Pressure Drag 85

with the help of ode, while the boundary conditions given by (2.223) may be
incorporated by be2, as follows:
(elO) ode(%,y,x);
:I:JQ..g1yL
3%e 3
(dlO) 0 =x+%k2
4%kl
(ell) radcan(dlO);
3y4/3
(dll) - - = x + %k2
4%kl
(el2) bc2(%,x=O,y=O,x=xl,y=yl);
xly4/3
(d12) y14/3 = x

(c13) solve(%,y);

(d13) [y = - %i (:J 3/\1, y = %iCxJ 3/\1, y = CXJ 3/4 yl,

yl/3 = - (:1) 1/4 yll/3 ]

where xl = Xl and yl = Yl.


We choose among these the real solution which provides positive y for positive
x, in agreement with the reference frame,

X )3/4
Y(X)=Yl ( ~ (2.225)

Let us evaluate Legendre's condition (2.l68), by taking the second derivative of


(2.222) with respect to y' and then substituting (2.225) for Y

(c14) diff(y,xr3*y;
(d14) y(yy
(el5) diff(d14, diff(y, x), 2);
(d15) 6yyx
(el6) y = yl * (x/x 1t(3/4);

(d16) y=c~r/4Yl
(c17) (subst(%, d15), ev(%%, diff));

9s Qrt(:1) Y12
(d17) 2xl

Since (d17) is obviously positive, Legendre's condition for the above shape is
satisfied. Substituting (2.225) into (2.222) and evaluating the integral, we find the
86 II. Variational Approach and Equations of Motion

minimal value of the force exerted on the slender body of revolution, fmin
(c1S) diff(d16,x);
3yl
(d is)
4(:J /\1 I

(c19) intanalysis:false;
(d19) false
(c20) fmin:4* %pi * ro * v A2 * integrate(d is A3 *d 16, x, 0, xl);

2.24 Constrained Minimum Pressure Drag

The presence of various constraints is typical of engineering investigations. For


example, the volume of the body of revolution, V, and its surface, S, may be given,
while dealing with optimal aerodynamic shapes. We thus arrive at the problem of
a constrained minimum.
Taking into account that

V=n fly 2 dx

S= 2n fl ydx (2.226)

and that the force, F, is given by (2.222), we form the new functional

<1> = fl(yy'3 + AlY + Azy2)dx (2.227)

where Al and ,12 are the constant Lagrange multipliers. Conditions of the integral
type given by (2.226) are known as isoperimetric. It can be shown that the associated
Lagrange multipliers are constants. We thus look for a function, y(x), and the
parameters x I ' AI ' and ,12 which would provide a minimum for <1>, while satisfying
at the same time the constraints (2.226).
Denote the integrand of (2.227) as f
f = yy'3 + AlY + A2y2 (2.22S)
Then the Euler-Lagrange equation (2.30) is
df d df d
-d --d -d,=y'3+AI+2A2Y--d (3yy'2)=A I +2A 2y-6yy'y"-2y'3=0
y x Y x
(2.229)
An attempt to straightforwardly solve this equation with the help of o.de-
command yields complicated results, which are difficult to analyse. This is therefore
a case, which needs a different approach and manual computations may be useful.
2.24. Constrained Minimum Pressure Drag 87

To this end, note that (2.229) does not contain explicitly the independent variable,
x. The Euler-Lagrange equation (2.30) admits in this case the following form
dy dJ
J ---=const=D (2.230)
dxdy'
To prove this we introduce the following convenient abbreviations:
y' = Z, y" = z,x = ZZ,y (2,231)

and then (2.30) may be put in the form


z(f,y - J,yZz - !'zzZZ,y) = [fry, z) - zJ,AY, z)J.y = 0 (2,232)

Consequently, (2,230) follows.


Substituting (2,228) for J into (2,230) we get the Euler-Lagrange equation
AlY + A2y2 - 2yy'3 =D (2,233)

while the transversality condition (2.194) yields


[(f - y'!,y,)bx + !,y' by]~~Yd.y=o = 0 (2.234)
Because of (2.230) we get
[Dbx + J s ' by]~~Yd.y=o = 0 (2.235)
which, in turn, because of the boundary condition y(O) = 0 and (2.228), reduces to
[Dbx+3yy' 2 by]x,s, =0 (2.236)
It is now seen from Fig. 2.12 that if the length, x I ' is not prescribed, bx # 0, then
(2.236) implies
D= 0 (2.237)
and if the radius, YI, is not prescribed, by # 0 then it implies
y'(x = XI) = 0 (2.238)
In view of (2.333) the last relation gives
D - AlYI - A2 yi = 0 (2,239)
The solution to the Euler-Lagrange equation (2.233) is merely

X= f y ( 2y
o }'IY + A2y2 - D
)1/3 dy (2,240)

We first investigated the particular case when no constraints are imposed and the
end points are fixed. Then
(2.241)
and, as follows from the transversality condition (2.236), D does not vanish,
D #0 (2,242)
Substituting (2.241) into (2,240) and integrating we get
X = Qly 4/3 (2,243)
88 II. Variational Approach and Equations of Motion

where QI is a constant. On specifying QI from the boundary condition y(x = XI) = YI,
this becomes

(2.244)

in agreement with (d16) of the previous section.


Now assume that the radius, YI, and surface, S, are given, while the length, XI'
and volume, V, are free. It then follows from (2.227) that Az = 0 and from (2.237) that
D=O (2.245)
After a simple integration (2.240) yields
X= QzY (2.246)
where Qz is a constant. Since y(x = X d = YI, we get
YI
Y=-X (2.247)
XI

as the optimal shape function. Indeed, Legendre's condition (2.168) gives


6yfx
J,y'Y' = -z- > 0 (2.248)
XI

From (2.226) we get the surface


S= nylx l (2.249)
In terms of the given parameters, the optimal shape function is
nyf
Y=-X (2.250)
S
Substituting this into (2.222) and (2.226), we get the force and volume, respectively.
Chapter III
Direct Methods

The difference between a purely mathematical and engineering approaches parti-


cularly manifests itself in the direct methods. The latter takes full advantage of the
fact that an approximate solution, which may not be satisfactory from a strictly
mathematical point of view, may, nevertheless, be a reasonable one for practical
purposes. Incorporation of symbolic computation in the context of direct methods
is particularly useful, as it allows for evaluation of higher order approximations
without extremely tedious and boring calculations. Moreover, programs may be
developed which generalize standard techniques. For example, the Rayleigh-Ritz
method may be extended, so as to analyze from the outset a set of allied problems
rather than a single one. Then a solution to the latter follows from a main routine,
the so-called master program, by simple commands.

3.1 The Philosophy


In engineering we are interested in a sufficiently accurate solution rather than the
exact one. In fact, the very formulation of an engineering problem in a form of
mathematical relations inherently contains some degree of approximation and
uncertainty. Under these conditions the pursuit of the exact solution, which may
turn out difficult and time consuming, does not always appear reasonable. In other
words, an accurate approximate solution to the equation may, from a practical
viewpoint, be as good as the exact one.
We compare in Fig. 3.1 the graphs of the functions y = x and y =
x + 20x exp ( - 400x 2 ). It is seen that the graphs diverge substantially over the small
interval 0 :::;; x < 0.13, where the maximum separation is approximately 0.4. Neverthe-
less, the difference in the corresponding areas is very slight. Thus, as far as the area
is concerned, the function y = x approximates well a far more complicated function,
y = x + 20xexp( -400x 2 ). On the other hand, it is a bad "local" approximation at
o: :; x < 0.13. To stress this fact it is said of these functions that they are close in the
mean.
To characterize this type of closeness between two functions, U 1 and U 2 , defined
at the same domain, V, we may introduce the quantity, 15, by

15 2 = L(U 1 - U2)2 dV, (3.1)


90 III. Direct Methods

0.4

0.3

0.2

/
0.1 /
/
/
/

o 0.1 0.2 0.3 0.4 1


Figure 3.1 Illustrating closeness

where the quadratic expression in the integrand allows to avoid the mutual
cancellation of possible negative and positive discrepancies. The smaller b is, the
closer U t and U 2 get in the mean. Note, this kind of closeness says nothing about
the local proximity of the functions. Figuratively speaking, b may be thought of as
the average "distance" between the pair offunctions, U t and U2. We may also extend
this approach to measure the distance between derivatives of the functions.
On the other hand, if the local approximation is of interest, than an appropriate
distance is apparently the maximum separation between these functions, e,
e=max{lu t -u 2 1} (3.2)
v
over the above domain. Obviously, e -> 0 implies b -> 0 but not vice versa.
In trying to find an approximate solution we first think of its closeness to the exact
one in the mean. This, being a simpler problem, may nevertheless be satisfactory one
from an engineering point of view.
It is difficult to define precisely what the direct methods of looking for
approximate solutions are. They are mainly the methods which allow to reduce the
mathematical complexity of the problem. For example, a differential equation in
partial derivatives may be "replaced" by an ordinary differential equation or by a
set of algebraic equations. This is achieved by a resort to the information concerning
the unknown solution and to engineering intuition.
The idea of the direct methods was originated by Rayleigh and then extended by
Ritz. Since then various versions bearing different names have been devised. In
essence, all of them may be thought of as modifications ofthe Rayleigh-Ritz method.
The direct methods closely relate to the variational approach. They represent a
convenient way of searching for an extremum of a functional.
3.2. The Method of Least Squares. Trial Functions 91

As has been noted earlier, the functions subjected to variations are to comply
with certain conditions of regularity, like their continuity and differentiability. We
assume these conditions to be satisfied in the following considerations.

3.2 The Method of Least Squares. Trial Functions


To begin with, we consider a simple example. Assume that we look for a solution
of the following equation
Elw. xxxx + Kw - q = 0 (3.3)
where w = w(x), q = q(x) and El and K are constants. Equation (3.3) describes the
bending of a uniform beam resting on an elastic foundation with the stiffness
coefficient K (Fig. 3.2). The distributed load intensity is q. Let the beam have the
length, L and be clamped at the ends, which implies
w(O) = w(L) = 0, w,AO) = w'x(L) = 0 (3.4)
Even though the boundary value problem formulated by (3.3) and (3.4) may be
solved exactly, we prefer to look for an approximate solution by appeal to simple
arguments,
Obviously, there is only a slight chance to guess an expression, which would
satisfy both (3,3) and (3.4), This would provide the exact solution. On the other
hand, we may imagine a function which satisfies, say, only, (3.4). Then, substitution
of this function for w in (3.3) would yield a residual (an error function), If w would
contain free parameters, then they may be used to minimize this error in one sense
or another.
Consider this approach in more detaiL The functions
(3.5)
with A, B being free coefficients, satisfy the boundary conditions (3.4), Generalizing
this representation, we write
(3,6)
where a2 , a3 are free coefficients. Note, (3.4) are satisfied regardless of the values
which the coefficients take on, In (3.6) we preserve as low powers as the boundary
conditions (3.4) allow for. Indeed, the theory of Taylor series shows that these terms
are the main "carriers" of the function.
Now the free coefficients in (3.6) may be chosen so as to minimize the error in
satisfying the remaining equation (3.3), When (3.6) is substituted into (3.3) we

q(x)

~EI r-X

lI~i
Figure 3.2 Beam on elastic foundation
92 III. Direct Methods

generally get for its left hand-side a nonzero residual


f(a z , a 3 , ..• x) - q # 0 (3.7)
For example, if the analysis is confined to the first approximation, a 3 = 0, we obtain
f(a z , x) - q = 24Ela z + Ka z (L - x)ZXZ - q # 0 (3.8)
Minimization of this residual in a particular point would not make much
sense, since the error over the beam length remains then uncontrollable. Recalling
the discussion of the previous section on the closeness in the mean, it seems reasonable
to minimize the integral of the error over the interval (0, L). However, the error,
(3.8), may change its sign within the interval. This may provide a small value for

r
the integral, even though the error itself is large. We therefore chose the square of
(3.8) as a proper measure, similarly to (3.l),

[f(a z , x) - qy dx # 0 (3.9)

and then find a z from the condition of minimum

~ fL [f(a z , x) - qJz dx = 0 (3.10)


da z 0

Note that (3.9) is positive definite everywhere. If we would preserve the second
coefficient, a3 , then the scheme is naturally generalized to the form

(3.11 )

With a new coefficient added, we always get a new equation, preserving thereby
the necessary correspondence.
Thus, the method is mathematically consistent. Note that (3.9) may also be
thought of as a functional of w, which, upon substitution of (3.6) for w, generates a
function which is quadratic in az, a 3 ... It follows that the system of equations (3.11)
arrived at by this minimizing procedure is linear. The method, known as the one
of least squares, admits natural generalization to two- and three dimensional
problems, in which case the error is integrated over the area or volume, respectively.
Each of the functions (3.5) or the sum (3.6) are called the trial (coordinate)
functions. Their proper choice is crucial for obtaining a sufficiently accurate solution.
Few comments would be in order. These functions must, first of all, satisfy boundary
conditions of the problem. Besides power series of the type (3.6), trigonometric series
may be used too. In doing so, the lowest powers (lowest frequencies), which allow
for satisfying the boundary conditions, must be preserved. By adding higher powers
(higher frequencies) we may obtain approximations of higher accuracy. Recalling
that a sufficiently regular function expands into a Taylor or Fourier series, we may
appreciate better the above remarks. By taking into account a possible symmetry
of the problem it is possible to further simplify the solution.
As noted earlier, the direct methods may be thought of as subsequent approxima-
3.3. Beam on Elastic Foundation, Part I 93

tions in terms of a series representation of the unknown function. It is possible to


offer a different interpretation, resorting to physical terms. Equation (3.3) describes
the continuous system of an infinite number of degrees of freedom. By introducing
the approximation (3.6) we consider this system as having only two degrees of
freedom, Qz and Q3' In fact, after (3.6) has been adopted, the configuration of the
beam is uniquely defined by the values of Qz and Q3' In this sense, the direct methods
may be viewed as methods of discretization. Consequently, the search for higher
approximations, by adding new free coefficients, now appears as a better modelling
of a continuous system by a discrete one. Regardless of the interpretation, note that
the linear differential equation (3.3) has been approximately replaced by a system of
linear algebraic equations, which is typical of the direct methods.

3.3 Beam on Elastic Foundation, Part I


In this section, we carry out an approximate solution of the boundary-value problem
stated by (3.3) and (3.4). For a particular case of the constant load, q, write down
the governing equation and then the trial function which corresponds to (3.6)
(cl) ei*'diff(w,x,4)+k*w-q$
(c2) (L - x) A2*(a[2] *X A2 + a[3] *X A3)$
where k = K and ei = E1o. Then insert the trial function into the equation and
perform the differentiation
(c3) subst(%, w,dl)$
(c4) ev ('1~, d iff)$
At this stage, we have at our disposal the residual, for (d2) may not be the exact
solution. In accord with (3.9) we integrate the square of this error over the interval
O:(x:(L
(c5) integrate(!:,A2, x, 0, L)$
in agreement with (3.11) take the derivates of the error given by (d5) with respect
to Qz and Q 3
(c6) diff(d5,a[2])$
(c7) diff(d5, a[3])$
and solve the above two linear equations to obtain the values of Qz and Q 3

(c8) solve([d6,d7], [a[2J, a[3JJ);

[[ z _ (21k1 4 + 15120ei)q a = 0]]


(d8) a - kZl8 + 1008eikl 4 + 362880ei z ' 3
The deflection, IV, follows from the substitution of the just specified values of the
coefficients back into the trial function given by (d2)
(c9) subste~, d2);

(21k1 4 + 15120ei)q(l- X)2X Z


(d9)
94 III. Direct Methods

It is easy to obtain a higher approximation by adding a new term and repeating


the procedure. We set
w(x) ~ (L - x)2(a 2x2 + a 3x 3 + a4x4) (3.12)
Turning to calculations, we recall (d2) and add the new term with the free
coefficient, a4,
(cll) d2+(L-xf2*a[4]*x A4$
and then repeat the previous procedure
(el2) subst(%, w, dl);
(dI2) ei( d: (a4 (1- X)2X 4 + (1- xf(a 3 x 3 + a 2x2)))
dx .

») - q
+ k(a4 (1- X)2X 4 + (1- X)2 (a 3 x 3 + a 2X2
(c13) ev(%,difT)$
(el4) integrate(%A2, x, 0, L)$
(el5) difT(dI4,a[2])$
(cI6) difT(dI4,a[3])$
(cI7) difT(dI4,a[4])$
Eventually we solve the system of three algebraic equations just obtained to find
the values of the coefficients a2 , a 3 and a4
(el8) solve([dI5, d16, d17], [a[2], a[3], a[4]]);
The appearance of the solution provided is quite a complicated one. We therefore
resort to bigfloat numbers setting first the option fppree to 3 digits.
(el9) fpprec: 3$
(c20) bfloat (dI8)
(d20) [[a 2 = (4.95b2k 3 Jl2 + 1.92b7eik 2l8 + 9.42blOei 2k14 +
+ 4.32b 13eP)qf(5.0bOk4 11 6 + 1.68b5eik 3 l 12
+ 4.23bgei 2k 2l8 + 4.1lb12ei 2kI4 + 1.04bI5ei4 ),
a 3 = - 1.0bO (1.72b3k 3 l 11 + 6.92b7eik 2l 7 + 3.43blOei 2 kI 3 )
qf(5.0bOk 4 116 + 1.68b5eik 3 l 12 + 4.23bgej2k 2 l8 + 4.11b12ei 3 kI 4
+ 1.04b15ei 4 ),a4 = (1/72b 3 11o + 6.92b7eik 2 l6 + 3.43blOei 2kI 2)q
/(5.0bOk 4 Jl6 + 1.68b5eik 3 l 12 + 4.23bgej2k 2l8
+ 4. llb12ei 3 kl 4 + 1.04b15ei4 )]]
This solution, based on minimization ofthe error with respect to three coefficients,
should ensure a "stronger" minimum of the functional, which is quadratic in ai.1t may
therefore yield a more accurate approximation.

3.4 Beam on Elastic Foundation, Part II


The program given earlier illustrates the main steps of a search for the appriximate
solution suggested by the direct methods. Now we are concerned with making this
search more convenient and flexible for applications. We introduce the function,
3.4. Beam on Elastic Foundation, Part II '95

say, Is(w,q), which depends on the unspecified yet arguments, wand q,


(cl) Is(w,q):= (ei*'diff(w,x,4) + hw - q,ev(%%,difi),
integrate(%%A2, x, 0, L))$
It is seen that the right-hand side ofthis function is a compound statement containing
evaluation of the governing equation (3.3) in its first two sub statements and then
integration of the residual over the length of the beam.
Now we prescribe w as in (3.6) still leaving q as a constant (uniform load), call
the Is-function, and then differentiate the result with respect to a 2 and a 3
(c2) Is«L - x) A2*sum(a[j]*x Aj,j, 2, 3),q)$
(c3) diff(%,a[2]) = 0$
(c4) diff(d2, a[3]) = 0$
It remains to solve (d3) and (d4) to obtain the solution which is of course identical
to that obtained earlier
(c5) solve( [d3, d4], [a[2], a[3]));
(21kI4+ IS120ei)q ]]
(dS) [[ a - a -0
2 - k218 + 1008eikl4 + 362880eF' 3 -
The present program has the substantial advantages. Indeed, to obtain the next
approximation, we just change the higher limit of the summation index in (c2),
typing in
(c6) Is«L - xr2*sum(a[jJ*x Aj,j,2,4)q)$
Then, taking the three derivatives and solving the system of three equations, we
again get (d20) of Section 3.3.
By introducing EI under the sign of differentiation we may treat in a similar
way the beams of variable stiffness, EI(x), for which (3.3) is replaced by a modification
of(2.114)
d2
-2 (Elw xx)+ Kw - q = 0 (3.13)
dx '
Further, defining q as a function of x in (c2) would allow for considerations of
non-uniform loadings, q(x),
Consider how these and other generalizations may be incorporated in a program.
Introduce the function, say, Ii, which depends on the deflection, w, number, n,
describing the order of approximation, the load intensity, q, and the stiffness EI.
Three of the quantities, namely, w, q, and EI may depend on x. The Ii-function is
defined as a compound statement, which, in addition to the statements appearing in
the previous (cl), also contains the do statement. The latter automatically takes the
derivatives of the residual in the quantity needed, which is prescribed by the constant,
n. These derivatives are given the notation bj which facilitates further programming,
(c1) li(w, n, q, ei):= (wxx: 'diff(w, x, 2), 'diff(wxx*ei, x, 2)
+ k*w - q,ev(%%,diff), integrate(%%A2, x,O, L),
for j: 2 thru n do b[jJ: diff (%%, a[jJ))$
The first substatement in the right-hand side of the Ii-function introduces a
convenient notation for w. xx ' The subsequent substatements formulate (3.13),
96 III. Direct Methods

integrate the square residual over the beam length, and then take its
derivatives with respect to the unknown coefficients appearing in the trial function.
Consider, say, an example of a uniform beam subjected to the distributed load
given by
(3.14)
To get the second approximation, we call the Ii-function, while using the same trial
function, setting n = 3, and substituting (3.14) for q
(c2) 1i((L - xt2*sum(a[jJ *XAj,j, 2, 3), 3, s* x A2, ei)$
Now we may call the expressions for the derivatives, denoted by bj , and solve them
for aj
(c3) [b[2J, b[3J J$
(c4) solve(%, [a[2J, a[3J J);

(d4) [[ a 2 = - (21k 3 J14 + 205344eik 2 11o - 187608960ei 2 kl 6


- 234710784000ei 3 l 2 ) s/(2k 4 J16 + 17856eik 3 l 12
+ 83220480eFk 2 l8 + 72808243200ei 3 k1 4 + 24141680640000ei 4 )
(33k1 5 + 277200eil)s ]]
a 3 = k 2 l8 + 7920eikl 4 + 33264000eF
Note that instead of the power series, given by (3.6), the deflection, w, may also
be represented by trigonometric functions. This would not require major changes
in the above programs.
It is seen that a consistent method of solution may be developed by these simple
arguments. It remains, however, an open question as to the accuracy of the obtained
results. We discuss this in Section 3.11.

3.5 The Bubnov-Galerkin Method

Though the simplicity of the idea underlying the least squares method is appealing,
it is based on quite formal considerations of the residual and lacks an explicit
physical reasoning. Methods which would make use of a certain physical principle
are therefore worthy of investigations. One of these is known as the Bubnov-Galerkin
method.
The previous example of a beam on elastic foundation provides a convenient
means for illustrating this method. Since the system is conservative, we may look
at the governing equation (3.3) as the Euler-Lagrange equation following from
Hamilton's principle.
Consequently, we get for a uniform beam using (2.103)

J:(EIW. xxxx +KW-Q)(5WdX=O (3.15)

where we omitted the integration with respect to time because the problem at hand
is static. We also substituted W for 1'/. Assuming that W is again given by (3.6), we
3.6. Beam on Elastic Foundation, Part III 97

note that its variation is due to variations of a z and a3 • This implies


Bw Bw
bw=-ba 2 +-ba 3
Ba2 Ba 3
= (L - x)Zx 2 ba2 + (L - X)2X 3 ba 3 (3.16)
Substituting (3.16) into (3.15) we get

J: (Elw. xxxx + Kw - q)[(L - x)2x 2ba 2 + (L - x)2x 3 ba 3 ] dx = 0 (3.17)

Since ba z and ba 3 are arbitrary, this provides the following two equations

J: (Elw.xxxx + Kw - q)(L - X)2X 2 dx = 0

J: (Elw.xxxx + Kw - q)(L - X)2X 3 dx =0 (3.18)

On substituting (3.6) into (3.18) we arrive at the two equations for a 2 and a3'
Obviously, for a higher approximation we would get an additional equation

J: (Elw. xxxx + K w - q)(L - X)2X 4 dx = 0 (3.19)

with the number of equations always corresponding to the number of coefficients


to be specified.
Equations (3.18) and (3.19) essentially follow from a certain physical principle
governing the system under consideration, namely, Hamilton's principle. The
underlying idea differs from a purely formal approach of the least squares method.
Nevertheless, since the first bracketed term in (3.18) and (3.19) represents, upon
substitution of (3.6), the residual, the Bubnov-Galerkin method may also be thought
of as a particular means of minimizing the weighted residual over the interval
0:::;; x :::;;L.
As far as the trial functions are concerned, the remarks of Section 3.2 remain in
effect. Namely, the lowest powers (lowest frequencies), which allow for the satisfaction
of the boundary condition (3.4), must. be. preserved. As follows from Sections 2.11
and 2.21, in general, the variation of the functional may contain a boundary term
associated with the so-called natural boundary conditions. These should also be
met by the trial functions to allow for the underlying expression of the method,
given by (3.15), be meaningful.

3.6 Beam on Elastic Foundation, Part III


To find the first approximation to the solution ofthe boundary value problem posed
by (3.3) and (3.4) by the Bubnov-Galerkin method, we issue for the case of a uniform
beam
(el) 'diff(ei*w,x,4)+hw-q$
which is the left-hand side of (3.3). Then we use (3.6) with a 3 = 0 to obtain the first
98 III. Direct Methods

approximation
(c2) (L-xt2*a[2]*x 2$ A

To find a 2 insert this into (dl), perform the differentiation and then evaluate the
first of (3.18). This may be done as the compound statement
(c3) (subst(%, w, dl),ev(%%, diff), %%*(L - xt2*x 2, A

integrate (%%, x,O, L))$


The value of this statement is the right-hand side of the first of (3.18). Now we get a 2
(c4) solve(%, a[2]);
21q
[ a 2 = kl4 + ]
(d4) 504ei

An alternative is to use a trigonometric series. Taking into account the boundary


conditions (3.4) and the fact that for a constant load the maximal deflection occurs
at x = L/2, try

W(X)~b2( l_cos2~X) (3.20)

and type in
(c5) b[2]*(1- cos (2*x*%pi/L))$
and then repeat the above steps
(c6) (subst(d5, w, dl),ev(%%, diff), %%*(1 - cos(2 *x *%pi/L)),
integrate (%%, x, 0, L));
Is I positive or negative? pos; Is b 2 K positive, negative, or zero? pos; Is b 2 ei
positive, negative or zero? pos; Is q positive, negative or zero? pos;
21 4q - 3b 2 kl 4 - 16%pi4 b 2 ei
(d6)
21 3
(c7) solve(%, b[2]);

(d7)

We shall show in Section 3.11, which is concerned with evaluation of the accuracy
of direct methods, that despite the different appearances, the results obtained here
are consistent with those following from the least squares method.
We are interested in a program which, as in Section 3.4, would allow for more
convenient calculations of higher order approximations including the cases of
variable loading and stiffness. The generalization of (3.20) is obviously given by

w(x) = I00 2j
gj 1- cos--
( 1tX) (3.21)
j=1 L
with unspecified yet constants, gj.
We introduce the function, bq (w, n, q, ei), which substitutes (3.21) into the left-hand
3.7. The Rayleigh-Ritz Method 99

side of (3.3), performs the necessary spatial differentiation, and then integrates the
weighted residual over 0 ~ x ~ L
(c1) bq(w,n,q,ei):= (wxx:'diff(w, x, 2), 'diff(ei* wxx, x, 2) + hw - q,
ev(%%, diff),
for j: 1 thru n do h[j]:integrate(%%*(l- cos(2*%pi*x*j/L)), X, 0, L»$

Hence, upon speCification of its arguments, w, n, q, and ei, the bq-function yields
the expressions equivalent to (3.18) and (3.19). The number of these expressions
equals the number of unknown coefficients, n, while their left-hand sides are denoted
as h[j].
Let us call this function while specifying w as in (3.21), with j = 1,2, and taking
q and El as constants
(c2) bq(sum(g[j]*(l- cos(2*j*%pi*x/L»,j,I,2),2,q,ei)$
The code, as in the previous case, begins to ask about the sign of various constants
needed to perform the integration. Some of them are "naive", for example,
Is 1 positive or negative?
which is replied
pos;
Other questions may deal with unknown yet quantities, for example, gj' In such
cases one must investigate all alternatives and their influence on the answer.
Now we call the expressions corresponding to the left-hand sides of (3.18) and
solve them
(c3) [h[I],h[2]]$
(c4) solve(%,[g[I],g[2]]);
(2k18 + 512%pi4eil4)q
(d4) [[
gl = 5k218 + 816%pi4eik14 + 4096%pi 8ei 2 '
(2k1 8 + 32%pi4eil4)q ]]
g2 = 5k218 + 816%pi4eik14 + 4096%pi 8ei 2
thereby completing the solution.

3.7 The Rayleigh-Ritz Method


Another approach resorts directly to a functional rather than to its Euler-Lagrange
equation. It has been shown in Chapter 2 that the solution to the governing equations
yields a stationary value for a certain functional. Moreover, this is, in fact, a relative
minimum in case of a static conservative system.
Consider, say, the equilibrium of a beam with the hinged ends subjected to a
transverse load, q. The potential energy is

f
tl> = oL(El
-2 w2,xx + -K2 w2 - qw ) dx (3.22)
100 III. Direct Methods

where the first term describes the strain energy of the beam, the second describes
the strain energy of the foundation, and the third is the work done by the external
distributed load, q. The boundary conditions are
w(O) = w(L) = 0
(3.23)
w.xx(O) = w.xAL) = 0
In the spirit of the above methods we look for a simple function which would
satisfy (3.23). In terms of trigonometric functions, this may be specified as
. nx
w""a1sln- (3.24)
L
with a I being a free coefficient. On substituting (3.24) for w into (3.22), the functional,
<1>, becomes a function of ai' <1>(a l ). We therefore set
d<1>
-=0 (3.2S)
da l
to approach a minimum. Solving (3.2S) for a l and substituting back into (3.24) we
obtain an approximate solution. Note that higher approximations may be carried
out in the form
nnx
w"" I
n=I,Z
ansin-
L
(3.26)

This kind of procedure is referred to as the Rayleigh-Ritz method.


For comparison, it would be useful to apply this method to the above problem
of a beam on elastic foundation. We therefore define a function, ri (w, n, q, El) with
the arguments, defined as in the previous considerations. Here n again refers to the
order of approximation. The function, ri, given below, finds first w. xx , then the
integrand of (3.22), then carries out the integration and takes the derivatives with
respect to the coefficients, a 3
(cl) ri(w, n, q, ei):= Cdiff(w, x, 2), ev(%%, diff)**2*ei/2+ k*w**2/2-q *w,
integrate (%%, x, 0, L),
for j:2 thru n do b[j]:diff(%%,a[j]))$
On saving the ri-function, we proceed with applications.
We try the first approximation
w = az(L - x)z X Z (3.27)
and type in
(c3) ri((L - x) A2*a[2]*x A2,2,q,ei);
Then apply solve to obtain a z
(cS) solve(b[2],a[2]);

(dS) [ a z = kl4 !1~4eJ


3.8. Master Program 101

We try a higher approximation, setting n = 3


(c6) ri((L - xr2*sum(a [j] * x Aj,j, 2, 3), 3, q, ei)$
(c8) solve( [b [2J, b [3J J, [a [2J, a [3J J);

(d8) [[ a 2 = kl4 !1~4ei a 3 = 0 ]]


and the next one with n = 4
(c9) ri((L xr2*sum(a[j] *XAj,j,2, 4),4,q,ei)$
(c10) solve([b[2J, b[3J, b[4JJ, [a[2J, a[3J, a[4JJ);
(49Sk14 + 1698840ei)q
[[
(dIO) 2
a = Sk2ls + 839S2eikl4 + 40772 160ei 2 '
1716kl 3 q
a 3 = - -Sk-c2=-I::-s-+-8-3-9-S2-e-ik-l--c4-+-4-0-7-7-2-16-0-e-=-i2 '

1716k1 2 q ]]
4
a = Sk 2 ls + 839S2eikl 4 + 40772160ei 2
Note that (dS) agrees with the appropriate expression of the previous section.
The above considerations show that the Bubnov-Galerkin and Rayleigh-Ritz
methods are closely related and represent two ways of minimizing the same
functional, as far as conservative problems are concerned. As a matter of fact, there
is a difference with respect to the boundary conditions. In the case of the Rayleigh-
Ritz procedure, the natural boundary conditions may not be accounted for while
setting the trial functions. Further discussions on this aspect will be given in the
sequel, in the context of plate response. Also the Bubnov-Galerkin method applies to
nonconservative systems too, since no functional is explicitly involved in its
formulation.

3.8 Master Program

Programs considered earlier are capable of treating either uniform or nonuniform


beams subjected to a constant or variable force. They also allow to obtain higher
approximations. However, each of these programs corresponds to a certain type of
boundary conditions only. When these are changed, then, in general, new trial
functions are needed. In this section we are concerned with a program, which would
treat a beam on elastic foundation for a broad class of boundary conditions without
changing the type of trial functions.
We consider the totality of the following cases:
i) one end clamped (a cantiliver)
ii) two hinged ends
iii) two clamped ends
iv) one end hinged, the other clamped
102 III. Direct Methods

These imply the following imposed boundary conditions:


i) w(x = 0) = w,Ax = 0) = 0 (3.28)
ii) w(x = 0) = w,xAx = 0) = 0
(3.29)
w(x = L) = w,xAx = L) = 0
iii) w(x = 0) = w,Ax = 0) = 0
(3.30)
w(x = L) = w,Ax = L) = 0
iv) w(x = 0) = w,xAx = 0) = 0
(3.31)
w(x = L) = w,Ax = L) = 0,
respectively.
It is seen that except for the case of a cantiliver four boundary conditions are
involved. Also taking into account that the deflection, w, expands in a Taylor series
at the interval 0 ~ x ~ L, we write
N
w~Lajxj (3.32)
j:O

If we set
N>4 (3.33)
we could then try to specify some ofthe coefficients, aj' from the boundary conditions
(3.28)-(3.31), and the rest from a variational procedure.
Furthermore, one of the beam ends should always be fixed. Situating there the
reference point, x = 0, we would satisfy this condition if we put ao = O. We thus rewrite
(3.32) as
N
W~ L ajx j (3.34)
j: 1

Here N> 3 on the understanding that one of the conditions, namely, w(x = 0) = 0,
has just been taken care of.
In anticipation of the subsequent variational procedure, we have to attain in
(3.34) a sufficient number of "free" coefficients. If we put
N=5 (3.35)
then we may still have two coefficients to adjust in the above cases (ii), (iii) and (iv)
and four in the case (i).
We first type in (3.34) with N = 5, then prepare the first and second derivatives
and then formulate the boundary quantities appearing in (3.28)-(3.31) except for
W(x=O)=o (3.36)
which has already been satisfied
(c1) sum(a[j] *X Aj,j, 1,5)$
(c2) diff(%, x)$
(c3) diff(%, x)$
(c4) fL:ev(d1,x = L)$
(c5) flO:ev(d2, x = 0)$
3.9. Applications 103

(c6) flL:ev(d2,x = L)$


(c7) f20:ev(d3, x = 0)$
(c8) f2L:ev(d3, x = L)$
Thus, the boundary value taken on by w at x = L, is denoted as fL and those
taken on by its first and second derivatives by flL and f2L, respectively. The values
°
of the first and second derivatives at x = are denoted as flO and f20, respectively.
The expressions given by (cl) and (c4)-(c8) will be of use later while dealing with
the boundary conditions.
Now we turn to a variational procedure. Choosing the Rayleigh-Ritz method
we define a function, say, ri(w,q,EI), which depends on w, q, and El,
(c9) ri(w, q,ei):= (ei*'diff(w, x, 2r2/2 + k*w 2/2 - q *w,ev(%%,diff),
A

integrate(%%, x, 0, L))$
It is seen that the ri-function evaluates by the subsequent steps the functional, CI>,
given by (3.22), provided its arguments are specified. It remains to find its stationary
value by taking the derivatives with respect to the free coefficients.
This program has the flexibility of that based on the so-called finite elements
method to be treated in Chapter 4. By increasing the number of terms in the sum
given by (cl) one may obtain higher approximations,. as shown in the Section 3.10.

3.9 Applications
For a hinged beam (the ii-case) the boundary conditions are given by (3.29). We
therefore solve these equations, except for w(x = 0) = 0, and first find at, a2 and a 3 ,
so as to satisfy these conditions.
Taking into account that fL, f20, and f2L are given by (d4), (d7) and (d8),
respectively, we issue as a sequel to the previous program
(cll) solve([d4, d7, d8], [a[l], a[2], a[3]]);

[[ a l -_ 7asl + lOasl2 + 6a41]]


4 3a413 _ _
(dll) 3 , a2 -O, a3 - - 3

and then find the associated deflection, w, by substituting these for at, a2 and a3
into (dl)
(el2) (subst(%,dl), w:%%);
s 4 (lOa sl2 + 6a41)x 3 (7as14 + 3a413)x
(dI2) asx + a4x - 3 + 3

It is seen that a4 and as remain "free". Now we call the ri-function substituting
the above expression for w, which is its first argument,
(el3) ri(%,q,ei)$
At this stage we have found the value of the functional, CI>, given by (3.22) as it
depends on the remaining coefficients a4 and as. Note that since q and El are
prescribed constants, we consider a uniform beam under a uniform load. Nevertheless,
the case of q = q(x) and EI = EI(x) may be treated similarly.
104 III. Direct Methods

We take the derivatives, solve the generated system of two equations and
substitute their solution back to (dI2) to find the deflection, W,
(cI4) diff(d13, a[4])$
(cIS) diff(dI3, a[S])$
(cI6) solve([dI4, dIS], [a[4], a[S]]);

(dI6) [[a4=3Ikl}!6~24ei' as=o]]

(cI7) (subst(%,dI2), w:%%);


126qx4 2S21qx 3 1261 3 qx
(d17) 3lkl4 + 3024ei 3lkl4 + 3024ei + 3lkl4 + 3024ei
which may be put in the form
126qx(x 3 - 2Lx2 + L3 )
W = -------:,--------- (3.37)
3lkL4 + 3024E]
The next example is a beam with the clamped ends. This time we invoke (3.30) and
instead of earlier commands, type in
(ell) solve([fL, flO, fl L], [a[l], a[2], a[3]]);
(dll) [[al = 0, a 2 = 2a sl 3 + a 412 , a 3 = - 3a sl 2 - 2a 41]]
We substitute this into (dl) to find the expression for W which satisfies the boundary
conditions
(cI2) subst(%,dl)$
Calling the ri-function with the deflection just specified, and taking the derivatives,
with respect to a4 and as, get
(cl3) ri(%, q, ei)$
(cI4) diff(dI3,a[4])$
(elS) diff(d13,a[S])$
Solving this system and substituting into (dI2) to obtain w, complete the solution by
(cI6) solve([dI4, dIS], [a[4], a[S]])$
(cI7) (subst(%, dI2), w:%%);
2lqx4 42lqx 3 21l 2 qx 2
(dI7) kl4 + S04ei kl4 + S04ei + kl4 + S04ei
which may be put in the form
2Iqx 2(L - X)2
w = ---::k-'L74-+-S---::0---::4E-]- (3.38)

3.10 Improved Master Program


The above program can be made more condensed and easy to use in various ways.
For example, (c4)-(c8) of the previous section, which formulate the boundary
3.10. Improved Master Program 105

conditions, may be united in a single list. Further, (c14)-(c15), which yield stationarity
for the functional, <1>, could be introduced in the main routine. We may also add a
new term in the sum representing the deflection to obtain a higher order
approximation.
We therefore issue
(c1) sum(a[j)*xAj,j, 1,6J$
(c2) diff(%,x)$
(c3) diff(%, x)$
(c4) [fL:ev(dl,x = L), flO:ev(d2,x = 0), flL:ev(d2,x = L),
f20:ev(d3, x = 0), f2L:ev(d3, x = L)] $
and then formulate a function, ria(w, q, ei), which, unlike the previous function,
ri(w, q, ei), also performs differentiations with respect to the remaining free coefficients
with the help of do
(c5) ria(w, q,ei):= (ei*'diff(w, x, 2t2/2 + bw A2/2 - q *w, ev(%%, diff),
integrate (%%,x,O,L), for j:4 thru 6 do b[j):diff(%%,a[j]))$
Then all what is needed to obtain a solution is mainly to issue the commands
solve and subst. Consider, say, a beam with the hinged ends. We invoke (3.29), which
formulate the boundary conditions, and type in
(c7) solve([fL, f20, f2LJ, [a[IJ, a[2J, a[3JJ)$
(c8) subste;';,dl)$
which is not different from the corresponding steps of the previous example. Now
call the ria-function, which, this time, also takes the derivatives with respect to the
remaining three coefficients. Then solve the system of equations, and find the solution
which is of a higher order of accuracy than the previous one
(c9) ria(%,q,ei)$
(c10) solve([b[4J, b[5J, b[6JJ, [a[4J,a[5J,a[6JJ)$
(cll) ratsimp(subst(%,d8));
(dll) (31746kJ2qx 6 - 95238kl 3 qx 5 + (97515k1 4 + 8494200ei)qx4
+ (- 36300kl 5 - 16988400eil)qx 3 + (2277kF + 8494200eil 3 )qx)/
(251k 2 18 + 2117280eikI 4 + 203860800ei 2 )
The program similarity treats other cases of the end supports. Note that for a
cantiliver, additional derivatives of the functional, <1>, should be taken after calling
the ria-function, since the number of free coefficients in this case will be greater
than 3. Furthermore, the command (c10) may, in general, be introduced at the end
of the compound statement (c5), which would make the use simpler. A proper
example will be given later.
The program also applies to approximations of lower order than that of N = 6
by setting to zero the coefficients of higher powers in (c1). Consider a beam of a
variable stiffness (Fig. 3.3), the exact solution of which may not be particularly easy,
EI(x)=r+sx (3.39)
with rand s constants.
We first repeat the above commands (c7) and (c8) but then issue
(c9) subst(a[6J = 0, %)$
106 III. Direct Methods

r+sx

Figure 3.3 Beam of variable stiffness

to obtain an approximation of lower order. Then call the ria-function and solve
two equations only
(elO) ria(%, q, r + s*x)$
(ell) solve([b[4], b[5]], [a[4],a[5]])$
Note that (3.39) has been substituted for El in (elO). We eventually get the solution
for the non-uniform beam by
(el2) ratsimp(subst(%, d9));
(d12) - (598752qsx 5 + (- 1995840lqs - 997920qr - 630k14q)x4
+ (199584Wqs + 1995840lqr + l260k1 5 q)x 3
+ (- 598752l 4qs - 997920l 3 qr - 630kFq)x)/(5l32l60Fs2
+ (23950080lr + 130320kI 5)s + 23950080r 2 + 260640k14r + l55k 2 l 8 )

3.11 Considerations of Accuracy

Evaluations of the accuracy of approximate methods is perhaps the most difficult


aspect of their applications. Conclusions drawn on the accuracy may be frequently
of a qualitative nature only. Nevertheless, symbolic computations facilitate the
evaluation of higher order approximations and thereby the general assessment of
the result.
When a higher order solution is said to be more accurate, it is meant that it
approximates better the exact solution in a certain average sense, in accord with
the remarks of Section 3.1. Therefore we may anticipate these solutions to be
satisfactory in the cases when various averages or integral quantities are of interest,
for example, the total potential energy of the elastic system or its overall stiffness.
The error, in general, may be more substantial for derivatives, since these depend
on local behavior of the functions. It means that in the above considerations of
beams the prediction made for the deflection, w, should be more accurate than that
for the slope, w. x , and so forth.
Furthermore, in some cases, it is possible to establish that some functionals,
evaluated first for the exact and then for approximate solution, obey certain bounds.
To this end, consider a cantiliver under a concentrated prescribed force P (Fig. 2.6).
This is a static continuous system with an infinite number of degrees of freedom.
When we look for an approximate solution and set, say,
(3.40)
we essentially replace it by a system with two degrees of freedom. This may be
3.11. Considerations of Accuracy 107

thought of as the imposition of kinematic constraints, which should render the


system stiffer. We may therefore expect that the ratio
p
(3.41 )
w(x=L)
which is the overall stiffness of the cantiliver, would be greater than the exact one,
if evaluated via the Rayleigh-Ritz method.
Perhaps, a better formulation may be given in terms of the work done by the
static prescribed forces. This work done on the displacements following from the
Rayleigh-Ritz method is less or equal to the work done on the exact displacement.
For the above cantiliver, we get
PWR-R(X = L) ~ Pwex(x = L) (3.42)
which gives
WR-R(X = L) ~ wex(x = L) (3.43)
Here the superscript R-R denotes the displacement following from the Rayleigh-Ritz
approach, while ex denotes the exact displacement.
Note, the general rule is expressed by (3.42) and not by (3.43). The bounding
property may not hold for the displacement at an arbitrary point x. This question
is further discussed in Section 3.13.
Functionals involved are often positive definite, as, for example, in the case of
the least square method or in the Rayleigh-Ritz method applied to a static system.
Then a higher approximation may provide a "stronger" minimum of the functional
and may be anticipated to yield a better solution too.
The trial functions must comply with the requirements commented on earlier,
in particular, they must satisfy the imposed boundary conditions such as prescribed
displacements at the boundary of elastic solids. On the other hand, natural boundary
conditions might be ignored in case of the Rayleigh-Ritz procedure, as they follow
from the functional extremum. An example is given in Section 3.13. In case of the
Bubnov-Galerkin method, as it is given in Section 3.5, the trial functions should
satisfy all boundary conditions.
The best check of accuracy is the comparison with the exact solution. We first
investigate the case of absence of the elastic foundation, putting K = O. Then all
polynomial solutions obtained for a uniform beam provide (clamped ends),
qx 2 (L - X)2
w= (3.44)
24EI
which coincides with the exact result. Next, for a beam with the hinged ends resting
on elastic foundation, the exact solution is

w =!l [1 _ cosh Ax cos A(X - L) + cosh A{X - L)cos Ax J (3.45)


K cosh AL + cos AL
with

(3.46)
108 III. Direct Methods

This provides for x = Lj2 and KL4jEI = 4


L4 q
w=0'012505- (3.47)
EI
Now find the deflection at x = Lj2 for the above two approximations obtained
by the Rayleigh-Ritz method. In the case of programs given in Section 3.10 (N = 6)
we issue
(el2) ev(subst( [x = Lj2, k = 4*eijL '4J, %), numer);
and get
0'0125053l 4 q
(dI2)
ei
A similar command applied to the program of Section 3.9 (N = 5) yields
I· 2507942e - 02l 4 q
(dI8)
ei
It is seen that the higher approximation given by the above (dI2) indeed provides
a more accurate result. The same conclusion follows from the comparison of the
bending moment
M = - Elw.xx (3.48)
The exact solution following from (3.45) is
M(x = Lj2) = 0·119914Uq (3.49)
while the above approximation with N = 6 yields 0·1 1991632L q and that with N = 5
2

yields 0·12007624L2 q.
Of course, the accuracy is not always as satisfactory as in these cases, particularly
in two- and three-dimensional problems errors may be more appreciable. Some of
these problems will be dealt with in subsequent sections.

3.12 Plate on E lastic Foundation

The above methods naturally extend to the case of two or three dimensions, but
calculations become more involved. Consider an example of elastic plate
occupying the domain 0:::; x :::; a, 0 :::; y :::; d. It is subjected to a uniform transverse
load, q, (Fig. 3.4). Assume that the plate rests on elastic foundation with the
stiffness KO.
The governing equation for K = 0 was derived in Section 2.16 and given by
(d 10). Adjusting the notations, adding the force exerted by the elastic foundation
on the plate, Ff,
(3.50)
and dropping the inertial term, we get the equilibrium equation for the deflection, w,
V4 w + Kw = qjD with K = KOjD (3.51)
3.12. Plate on Elastic Foundation 109

~~~--------------~7~~----X

Figure 3.4 Plate on elastic foundation

Here V4 is the biharmonic operator


04 04 04
V 4 = ~ + 2~ +."..-;r = VZV Z (3.52)
ox ox uy uy
and the flexural stiffness, D, is given by (2.144).
Assume that the plate is clamped around the edge. All boundary conditions are
imposed and no variation of wand its first derivatives at the boundary is possible.
Accordingly, the boundary term in variation of the potential energy, like that
described in Sections 2.11 and 2.21, is expected to vanish. The theory of Bubnov-
Galerkin method, as given in Section 3.5, applies. Looking for a solution, say, of
the second order approximation, we set
(3.53)
where WI and W z should be chosen so as to satisfy the boundary conditions and
VI and Vz are unknown coefficients. Substituting (3.53) into (3.51), mUltiplying first
by wdx,y) and then by wz(x,y) and integrating over the plate area, we get two
equations
vI'b ll + vzb lz = C I
(3.54)
vI'b zl + vzb zz = C z
or in the abbreviated form
v;b j ; = cj (3.55)
Here, v; are the above unknown yet constants and

bj; = f: I: (V 4 + K)w{w;dxdy (3.56)

c = Dq Jor Jor wjdxdy


a d
j (3.57)

On solving (3.55) for VI and V 2 and substituting back into (3.53), we obtain the
solution.
It will be shown later that for the elastic problems under consideration bji given
110 III. Direct Methods

by (3.56) constitute a symmetric matrix. Accordingly, b2i may be replaced by b 12


in (3.54) to reduce the calculations. This may also be observed from (3.56).
A convenient way of calculating bji and cj in (3.54) is to use arrays of functions.
In agreement with (3.56) and (3.57) we issue
(cl) b[i,j](k):= integrate(integrate((diff(w[i](x,y),x,4) + diff(w[i] (x,y),y,4)
+ 2*diff(w[i](x,y),x, 2,y, 2) + hw[i](x, y»*w[j](x,y),x,O,a), y,O,d)$
(c2) c[j] (q):= integrate(integrate(qjsd*w[j](x, y), x, 0, a), y, 0, d)$
It is seen that on specifying the stiffness, K, load, q, and the coordinate functions,
Wi' the functions given by (el) and (c2) would compute the coefficients bijand Cj.
Note that the flexural stiffness, D, is denoted as sd in (c2) in agreement with the
notation of Chapter 2. On saving the above program we may proceed with
investigations of particular cases.
For the case of a clamped plate the boundary conditions generalize those of a
clamped beam considered earlier
w(x = 0, x = a) = 0, w,Ax = 0, x = a) = °
w(y = 0, y = d) = 0, w,y(y = 0, y = d) = ° (3.58)

We therefore set

Wi (x, y) = [xy(a - x)(d _ y)]2 (3.59)


w 2 (x,y) = [xy(a - x)(d - y)]2(X + y) (3.60)
It is seen that the lowest powers are preserved in these series representations, which
at the same time are consistent with the boundary conditions.
We type in
(c4) f(x,y):= (x*y*(a - x)*(d - y)t2$
(c5) w[l](x,y):= f(x,y)$
(c6) w[2](x,y):= f(x,y)*(x + y)$
and solve the system (3.54) for Vi and V2 • For example, if the elastic foundation is
absent, K = 0, type in
(c7) solve([vh bEl, 1](0) + v2* bEl, 2](0) = c[I](q), vh b[l, 2](0)
+ v2* b[2, 2](0) = c[2](q)], [vi, v2]);
and get

(d7) [[ vi = (56d 4 + 32:;; + 56a4 )sd' v2 = °]]


Since V 2 = 0, the second coordinate function W 2 , as given by (3.60), is useless. In
fact, it could be foreseen that due to the symmetry of the problem, the odd powers
of x and y contribute nothing to the solution.
For a particular case of the square plate, d = a, the obtained solution yields

w(x=~ y=~)= 1·3292·1Q-3 a4 q (3.61)


2' 2 D
3.13. Further Investigations of Plates 111

while a more accurate series solution, which can be found in literature, gives

w(x=~ y=~)= 1·2625·1Q-3 a4 q (3.62)


2' 2 D
By placing the origin of the reference frame at the plate center and interpreting
a and b as half of the plate length in the x- and y-directions, respectively, we
incorporate the symmetry of the problem. This should improve the accuracy. Let
us calculate the deflection to the third order, putting
w(x, y) = (x 2 - a 2)2(y2 - d2)2(V\ + V2X2 + V3y2) (3.63)
We type in instead of earlier commands
(c4) f(x,y):= (x'2 - a'2)'2*(y'2 - d'2)'2$
(c5) w[l](x,y):= f(x,y)$
(c6) w[2](x,y):=f(x,y)*x'2$
(c7) w[3](x,y):=f(x,y)*y'2$
thus specifying the coordinate functions appearing in (3.63). Next, we formulate the
system of simultaneous equations given by (3.55) extending it to the case of three
coefficients, i, j = 1,2,3
(c8) vI * b[l, 1](0) + v2* bEl, 2](0) + v3* bEl, 3](0) = c[l](q)$
(c9) vI * b[l, 2](0) + v2* b[2, 2](0) + v3* b[2, 3](0) = c[2](q)$
(c 10) vI * b [1,3] (0) + v2* b [2,3] (0) + v3 * b [3,3](0) = c[3] (q)$
The system is linear and we call linsolve to get the solution
(ell) linsolve([d8, d9, dlO], [vI, v2, v3])$
which, after being substituted into the expression for w given by
(el2) w(x, y):= f(x, y)*(vl + v2*x'2 + v3*y'2)$
yields the deflection, w(x, y).
For the above case of a square plate we get the deflection at the center as
2'02022686e - 02a 4 qlsd, where a is this time half the plate length. Replacing a by
a12, we get 1·2626·1Q-3 a4 qID, which compares more favourably with (3.62) than
(3.61) does.

3.13 Further Investigations of Plates

In this section, we consider applications of the Rayleigh-Ritz method to the elastic


response of plates. Consider a plate of an arbitrary shape which is subject to a lateral
distributed load, q(x,y), as well as to the moments m(b) and lateral forces, Q(b),
distributed along its boundary, b (Fig. 3.5). Then the potential of the external surface
load and the boundary tractions is

U ext =- JIq(x,y)WdXdy+f[ m(b)~: -Q(b)w Jdb (3.64)


s
112 III. Direct Methods

~q('.YJ
s
m(o)

Figure 3.5 Plate subjected to a load q(x, y) distributed over the area S and to tractions m(.5) and
Q(.5) distributed over the boundary .5.

where S denotes the plate area, db is the element of the contour and n is the unit
normal. On the other hand, the strain energy is shown in the elasticity theory

ff
to be

U slr =~ D[(w,xx + W,yy)2 + 2(1 - v)(w~Xy + W,XXw,yy)]dx dy (3.65)


s
The potential energy to be minimized is given by
<1> = Uslr + Uexi (3.66)
Assuming, as in the previous section, that the deflection W is
N
W = L d j wj(x, y)
i=j
(3.67)

substituting (3.67) for W into (3.66) and performing the necessary calculations, we
would obtain
<1> = <1>(d 1 , d 2 , .••. d n ) (3.68)
This leads to the stationarity conditions
a<1>
-=0, i= 1,2, ... n (3.69)
ad j

the solution of which yields the coefficients d j •


It would be instructive to again consider a uniform rectangular plate clamped
around the edge and subjected to a uniform load q. Generalizing the solution for a
beam given in Section 3.6, we set for the first approximation

W = 21tY )
21tX) ( 1 - cosT
d 1 ( 1 - cos----;- (3.70)

which satisfies the boundary condition (3.58). Substituting (3.70) into (3.65) and (3.64)
3.13. Further Investigations of Plates 113

we get
3a4 + 3d4 + 2a 2 d 2
U SIr = D8i2n 4 a3 d3

U ex ! = - 8 1qad. (3.71)
which yields after substitution in (3.69)
qa 4 d4
8 ---~--~--~--~~ (3.72)
1 - D4n4(3a4 + 3d4 + 2a 2 d 2 )
Note that the contour integral in (3.64) vanishes since W = w,n = 0 at the boundary.
In order to obtain a more accurate result, we could set

cos 2(i + 1)nx) (cos 2(j + 1)ny )


y
2-j n-
W = " 1... 8.. (2inx
1... " cos --- - - cos ------- (3.73)
i j'J a a d d
Equations (3.70) and (3.72) show that the maximal deflection at the center of
the square plate in this approximation is

(3.74)

which, like (3.61), is larger than the exact solution in series given by (3.62). This
confirms the remarks of Section 3.11 that the bounding property of the Rayleigh-Ritz
method may not hold for the value taken on by the displacement function at a
particular point. Nevertheless, it can be shown that the work done by the external
prescribed forces on the displacement following from this method remains less than
the work done by these forces on the exact displacement. In other words,
(3.75)
which brings about an over-estimation of the overall stiffness of the plate.
As noted earlier, only the imposed boundary conditions must be accounted for,
while applying Rayleigh-Ritz method. This makes it particularly convenient for
analysis of plates with a free edge and/or internal holes and cuts. Figure 3.6 shows a
semicircular plate clamped along the line ¢ = 0 and subjected to a concentrated
force P. Thus, the imposed boundary conditions are
w(x = 0) = w.Ax = 0) = 0 (3.76)

Figure 3.6 Semicircular cantiliver plate subjected to a con-


y centrated force, P
116 III. Direct Methods

done by the external force, P, we get the functional, <1>,


<1> = U pi + Uf - Pw(r = 0) (3.91)
which should be minimized.
Since no boundary kinematic conditions are imposed, we set
w=A +Brn (3.92)
where all constants, namely, A, Band n are considered free. The representation of
w includes no dependence on E> because of the obvious symmetry. Substituting
(3.92) into (3.91) and taking derivatives with respect to A and B, we get

nK Oa2 (A +~)
n+2
P =

nDC 1 n 2
---::---B+nK a °2( -2A- + -
2B)
- =0 (3.93)
a (n-l)
2 n+22n+2
with
C 1 = 1 + 2v(n -1) + (n - nz
which may be solved for A and B.
In particular, the deflection at the center, r = 0, is

w(r = 0) = - - {
nK Oa2
P 1-
--- +n
2
4
---::------,:----;:--.=-----------=>
(n + 2)2 (n + 2)2 D [ 1 ]
n-l +2v +--
}-l (3.94)
n+l KOa 4 n-l

where n is not yet specified. For a given value of P the deflection (3.94) must be an
upper bound for the actual deflection. We therefore find n so as to minimize this
upper bound
dw(r = 0) = 0
(3.95)
dn
The appropriate root is n = 1·3 if v = 0·26 and D = Ka 4 • This gives
w(r = 0) = 0'3348P/Ka 2 (3.96)
compared to the exact result
w(r = 0) = 0'3355P/Ka 2 (3.97)
which can be found in literature. Note that, like the Kantorovich method, the present
one also requires a more involved analysis.
The considered methods assume the trial functions to satisfy the imposed
kinematic boundary conditions in case of the Rayleigh-Ritz method and also the
natural boundary conditions in case of the Bubnov-Galerkin method. Then the
error in satisfying the governing equation is minimized in one sense or another. A
different approach suggests that the trial functions are so chosen as to comply with
the governing equation, while the residual in fulfilling boundary conditions is then
minimized in one sense or another. This approach will not be pursued herein.
3.14. Other Direct Methods 115

Figure 3.7 Circular plate with a free edge resting on elastic


foundation

Substituting (3.81) for w,.we get

J:a [(x 2 - a 2)2 w2 .y),),y + (24x 2 - 8a 2)w2,YY + 24w2 - qo/D](x 2 - a 2)2dx = 0


(3.86)
which after integration yields
4 d4W2 2 d 2 w2 63 21qo
a ~--6a ~-+-w = - - (3.87)
dy4 dy2 2 2 16D
Hence, the equation

V4 w= qo (3.88)
D
has approximately been replaced by the simpler equation (3.87). This technique
provides better results than the Rayleigh-Ritz method at the expense of a more
involved analysis.
Another method to improve the accuracy is to introduce another free
parameter in trial functions, in addition to the linear coefficients ai . As an example,
consider a circular plate resting on elastic foundation and free at its edge (Fig. 3.7).
It is subjected to a concentrated force, P, at the center.
As in earlier considerations, the strain energy consists of that associated with
the plate deformations and that associated with the foundation deformations. The

r-
strain energy of the plate in polar coordinates rand 0 is given by

Up/ =~ fX J: {( w. rr + ~W.r + r12 w.ee 2(1 - v{ W,rrGW,r + r12 w,ee)

- Gw.re - r12 w,e9 rJ}rdrd0 (3.89)

where a is the plate radius. The strain energy of the foundation is

Uf = f J: KOw 2/2rdrd0 (3.90)

where KO is the foundation stiffness coefficient. Also taking into account the work
116 III. Direct Methods

done by the external force, P, we get the functional, <1>,


<1> = U pi + UJ Pw(r = 0) (3.91)
which should be minimized.
Since no boundary kinematic conditions are imposed, we set
w=A +Br" (3.92)
where all constants, namely, A, Band n are considered free. The representation of
w includes no dependence on e because of the obvious symmetry. Substituting
(3.92) into (3.91) and taking derivatives with respect to A and B, we get

nKOaZ(A+~)=P
n+2

nDC 1 n 2
-=----'-B + nK a
aZ(n-1)
0 z(- - + - -
2A
n+2
2B) = 0
2n+2
(3.93)

with
C 1 = 1 + 2v(n -1) + (n - nz
which may be solved for A and B.
In particular, the deflection at the center, r = 0, is

where n is not yet specified. For a given value of P the deflection (3.94) must be an
upper bound for the actual deflection. We therefore find n so as to minimize this
upper bound
dw(r = 0) = 0
(3.95)
dn
The appropriate root is n = 1·3 if v = 0·26 and D = Ka 4 . This gives
w(r = 0) = 0·3348P/Ka z (3.96)
compared to the exact result
w(r = 0) = 0·3355P/Ka z (3.97)
which can be found in literature. Note that, like the Kantorovich method, the present
one also requires a more involved analysis.
The considered methods assume the trial functions to satisfy the imposed
kinematic boundary conditions in case of the Rayleigh-Ritz method and also the
natural boundary conditions in case of the Bubnov-Galerkin method. Then the
error in satisfying the governing equation is minimized in one sense or another. A
different approach suggests that the trial functions are so chosen as to comply with
the governing equation, while the residual in fulfilling boundary conditions is then
minimized in one sense or another. This approach will not be pursued herein.
3.15. Shock Absorber, Preliminary Considerations 117

3.15 Shock Absorber, Preliminary Considerations


The direct variational methods apply not only to problems of a mainly academic
interest, but also to those of the direct technological relevance. We consider a
rubber-metal shock absorber shown in Fig. 3.8. It consists of a rubber block welded
at the top and bottom to metal plates. When subjected to a force P the shock
absorber deforms to the value Ll, so its axial stiffness K is
P
K =Li (3.98)

While rubber may easily undergo large elastic deformations without failure, the
case of small deformations, which is amenable to a linear analysis, is also of interest.
Experiments show that, unlike metals, rubber obeys well a linear behavior up to
the deformations about 8-10%. The natural rubber is practically incompressible
and its Poisson's ratio is taken as v = 0·5. If we denote the displacement along the
axis Xi by Ui (i = 1, 2, 3) then the incompressibility condition reads
div U = u t • t + U 2 ,2 + U 3 ,3 = 0 (3,99)
Turning to the problem at hand, shown in Fig, 3.8, we note that the boundary
conditions for the deformations of the rubber block are of the mixed type. The
external vertical planes of the block are free of stresses, while for its external
horizontal planes we get the following conditions for the components of the
displacement
Ut (X3 = ± h) = U2(X 3 = ± h) = 0 (3.100)
Ll
U3(X3= ±h)= +'2 (3.101)

Equations (3.100) and (3.101) express the conditions of the welded contact at the
interface between the two materials.
Due to the complexity of the boundary conditions, an attempt at the exact
solution appears unreasonable and we therefore resort to approximate methods.
The Rayleigh-Ritz method seems particularly suitable, since the condition of the
traction free external vertical planes is a natural one and may therefore be omitted
while formulating the trial functions. Also, the deformations of the metal plates can
be neglected as compared to the deformations of the rubber block. The strain energy
is therefore associated with that of the rubber only, while the external potential is
merely
V eXI = - PLl (3.102)
We may begin with a plane problem assuming that b t »a t , b t »h, (see Fig. 3.8),
in which case the displacement U 2 along the x 2 -axis should be much less than the
other two displacements, U t and U 3 • Further, under these conditions U t and U 3 may
be taken as independent of the coordinate X 2 • We therefore set
U2 =0 (3.103)
Ut = u t (x t ,x 3 ), U3 = u3(X t ,X 3) (3.104)
thereby reducing the problem to the plane one.
118 III. Direct Methods

metal
a)

rubber

Figure 3.8 Rubber-metal shock absorber

Situating the origin of the coordinate system at the center of mass, we note that
Ul should then be an even function of X3 and odd function of Xl' It must also comply
with the boundary condition (3.100). The simplest polynomial representation for U l
is therefore
(3.105)
with A being a free coefficient. A trial function for U 3 should be so chosen as to
comply with the incompressibility condition (3.99), which for the plane problem
reduces to
Ul,l + U 3 ,3 = 0 (3.1 06)
Substituting (3.105) into (3.106) we get the representation for U3

U3= -A(h2x3- X;) (3.107)

Because of (3.101) we may express A in terms of ~

A=- 3~

4h 3
(3.108)
3.15. Shock Absorber, Preliminary Considerations 119

and the trial functions become

U2 =0 (3.109)

U 3= -
3 ~ h
4h3 (2 X3
X~)
-"3
It remains to specify ~ so as to minimize the functional of potential energy. The
strain energy, US!" is given by

Us!r = Iv (!A0 2 + lI eij eij)dv (3.110)

where A and .u are the Lame constants and


0= Ui,j = Ul,l + U 2 ,2 + U 3 ,3 (3.111)
eij = (ui,j + uj,;}J2 (3.112)
Because of the incompressibility condition (3.99), we get 0 = Q. However, the Lame
constant, )" becomes unbounded, since
vE
lim A = lim -+ 00 (3.113)
v~O'5 v~O'5 (1 + v)(1 - 2v)
Here E is Young's modulus. Nevertheless, it can be shown that
lim ..1.0 2 -+0 (3.114)

and Us!r becomes

U str = G Iveilijdv (3.115)

where G = II is the shear modulus, The functional of interest is eventually given by

<1> = Us!r + Uex! = tG Iv eilijdv - p~ (3.116)

where use has been made of (3.102) ahd (3.115).


Note that instead of minimizing (3.116) with respect to ~, we may express this
functional in terms of A and then request
d
-<1> =0 (3.117)
dA
It is also convenient to take the advantage of the symmetry and write Us!r as

Us!r = 8G J:l Il J: eijeijdXldx2dx3 (3.118)

If the shock absorber is not long enough we have to incorporate the displacement
U2 along the x 2 -axes. We may also generalize the earlier analysis so as to allow for
120 III. Direct Methods

a higher order approximation. On setting, in view of (3.105), that


N
Ul = x 1(h 2 - x~) L aA
i=O
N
U2=X2W-X~) L bA (3.119)
i=O

the expression for U3 follows again from the incompressibility condition (3.99)
as

U3 = - f<UI.1+ U2 •2 ) dx 3 (3.120)

while the minimization procedure yields the unknown coefficients through the
equations
d<l> d<l>
-=0 -=0 (3.121)
daj , db j
In the following section we carry out this analysis with the help of the SMC.

3.16 Shock Absorber, Program and Results


We begin with a subroutine which would compute the integrand of (3.118), namely,
the strain energy per unit volume. This quantity will be denoted as energy (u, v, w)
where the arguments, u, v, and ware the displacements along the axes XI' X2 and
X 3 , respectively. We thus change notations, as compared with Section 3.1'5, to allow
for a more convenient programming. This function is given below
(c1) energy (u, v, w):= (h[1]:u,h[2]:v,h[3]:w,fori:1 thru 3 do
(for j: 1 thru 3 do e[i,j]:('ditT(h[i], x[j]) + 'ditT(h[j], x[iJ))j2),
sum(sum(e[i, j] *e[i, j], i, 1,3), j, 1,3), ev(%%, ditT» $
In the first three substatements the values of u, v and ware assigned to the indexed
variables hi' h2 and h3' respectively, for programming purposes. Then the do
statement formulates the deformations, eij = eij according to (3.112), and then we
sum their product, e~. If we would integrate this function over the volume of the
stressed body and mUltiply by G, we would get USlr , This will be performed at a
later stage of programming.
For the plane problem we need the displacements U and w only. We issue
(c2) u:a*x[1]*(h 2 - x [3r2);
x xn
A

(d2) l a(h 2 -
(c3) w: - integrate (ditT(u, x[1]), x [3]);

(d3) - a ( x3h2 - ~~)

°
which is in accord with (3.105) and (3.107). Next, integrate the specific strain energy,
given by energy (u,O, w) over the volume < XI < a1, 0 < X 2 < b1, 0 < X3 < h, because
of the symmetry. The integral obviously exists and we first properly adjust the
3.16. Shock Absorber, Program and Results 121

intanalysis and assume_pos options to avoid questions, which may be asked by the
code
(c4) assume_pos:true;
(d4) true
(c5) intanalysis:false;
(d5) false
(c6) integrate (integrate (integrate (energy (u, 0, w), x [1], 0, ai),
x [3], 0, h), x [2], 0, b 1);
bl (4Sa 2a1hs + lOa 2a1 3 h 3 )
(d6)
45
Note, that this must be multiplied by S to provide the strain energy of the entire
elastic body. Now define the decrease in the height, A, in accord with (3.101) and
then differentiate the functional «I> with respect to the single free coefficient, a
(c7) delta:- 2*ev(w,x[3] = h);
(d7)

Sb1g(96aa1hs + 20aa1 3 h 3 ) 4h 3 p
(dS)
45 3
Here g == G, while the multiplier S in the argument of diff accounts for the entire
volume of the rubber block. In order to complete the solution, solve this for a and
substitute the result into the expression for A
(c9) solve(%, a);

(d9) [ 15p ]
a = 192a1b1gh2 + 40a1 3 b1g
(elO) (subst(%, delta), ratsimp(%%));

(d10) 5h 3 p
4Sa1b1gh 2 + lOa1 3 b1g
Thus, the dependence A = A(P) is given by (d10) and reads
P 5h 3
A = ----=-------,,- (3.122)
Gb1 (4Sa1h 2 + 10a1 3 )
Let us derive the solution of a higher order approximation than in the above
considerations, which would also be applicable to the three dimensional problem.
In agreement with (3.119) and (3.120) issue the functions u, v, and w
(cll) u:x[1]*(h"'2 - x[3]"'2)*sum(a[i] *x[3]",i,i,0, 1);
(dll) Xl (a l x3 + ao)(h 2 - xn
(el2) v:x[2]*(h"'2 - x[3]"'2)*sum(b[i]*x[3]"'i,i,0, 1);
(d12) x2(b l x 3 + b o)(h 2 - x5)
122 III. Direct Methods

(cI3) w:- integrate(diff(u, X [I]) + diff(v, X [2]), X [3]);


- 6blx~hz - 12box3h2 + 3blx~ + 4box~
(dl3)
12

As a check we verify whether the incompressibility condition is fulfilled


(cl4) ratsimp(diff(u,x[I]) + diff(v,x[2]) + diff(w,x[3]));
(dI4) 0
Having defined u, v, and w, which contain four free coefficients a o , ai' bo , b l ,
we call energy (u, v, w) and then perform spatial integration in a way similar to the
previous one
(ciS) energy(u, v, w);
- 12b l x3h z - 12b oh z + I2blx~ + I2box~
(diS) expt ( 12

- 12alx3h2 - I2a ohz + 12alx~ + 12aox~ )


+ 12 ,2

(blxz(h Z- x~) - 2x Zx3(b l x3 + bo))Z


+ 2
(alx l (h Z - x~) - 2x l x3 (a l x3 + ao))Z
+ 2
+ (b l x 3 + bo)Z(hZ - x~)Z + (a l x3 + ao)Z(hZ - x~)z

(cI6) assume(al > 0, bl > 0, h > 0)$


(cl7) intanalysis:false;
(dI7) false
(cIS) integrate (integrate (integrate(d IS, X [1], 0, aI), X [2], 0, b 1), x [3], 0, h)$
In the next two commands we evaluate ~ and form the functional, <1>, to be
minimized
(cl9) delta:- 2*ev(w,x[3] = h);
-3bh4 -Sbh 3 -3ah4-sah3)
(dI9) _ 2( I 0 + I °
12 12
(c20) S*G*dIS - p*delta$
We take the derivatives of (d20) with respect to the free coefficients and solve
the generated linear system of equations
(c21) for i:O thru I do (r[i]:diff(%,a[i]), t[i]:diff(%, b[i]))$
(c22) linsolve( [r [0], r [I], t [0], t [1]], [a [0], a [1], b [0], b [1]])$
The values of a o , ai' bo and b l , just obtained, are substituted into (dI9) in order
to obtain the desirable dependence ~ = ~(P). Since the appearance of this equation
3.17. Flow Through a Duct 123

may be complicated we use bfloat with the option fpprec set to 3


(c23) fpprec: 3$
(c24) (subst(d22, delta), ratsimp(%%), delta: bfloat(%%));
(d24) (2'S7b6h 9 + (7'68b6bI 2 + 7'68b6aI2)h 7
+ (I'Slb6bI 4 + 1'71b7aa 2b1 2 + I'Slb6aI 4)h 5
+ (2'94b6aI 2bI 4 + 2'94b6aI 4 bI 2)h 3)p
1(1'7b7aablgh 8 + (S'31 b7al b1 3 + S'31 b7al 3bl)gh 6
+ (1'33b7albI 5 + 1'31b8a1 3b1 3 + 1'33b7aI 5 bl)gh 4
+ (3'13b7aI 3bI 5 + 3-13b7alb 5 bI 3)gh 2 + S'88b6aI 5 bI 5 g)
Thus the dependence ~ = ~(P) is given by (d24).
It is of interest to figure out how this result correlates with the previous result
(dlO) obtained for the plane problem. Obviously, (d24) should approximate (dl0) if
bl is large enough. To this end we may use a series expansion for large bl,
(c2S) taylor(%, bl, inf, 1);
(737h 5 + 1436a1 2h 3)p
(d2S) ITI (6S12algh4 + IS260a13gh2 + 2872aI 5 g)bl + ...
This result correlates satisfactory with (dlO). For example, for h = a 1 = 1, it yields
p
~=0'0882- (3.123)
biG
while (dl0) yields
p
~=0'0862- (3.124)
biG
The difference is due to the fact that (3.123) follows from a higher order approxi-
mation than (3.124). Indeed, it provides the stiffness, PI~, which is less than that
following from (3.124), in agreement with the theory of Rayleigh-Ritz method.

3.17 Flow Through a Duct


Figure 3.9 schematically shows the flow of Newtonian fluid through a square long
duct. In the coordinate system indicated the velocity components are
VI = V 2 = 0
(3.125)
V3 = V 3 (X I ,X 2 )

while the governing equation is as follows:


82 v 82 v 1 8p
-+----=0 (3.126)
8xi 8xi J1 8X3
In (3.126) p is the pressure, J1 the viscosity and V = v3 • Equation (3.126) is subjected
to the boundary conditions
(3.127)
124 III. Direct Methods

2a

2a

Figure 3.9 Square long duct

since the velocity vanishes on the boundaries of the duct. Note that in the problem
at hand the last term in (3.126) is a constant.
It can be verified by the direct computation that"the functional

1= f -aa fa-a [(-OXOV)2 + (OV)2


-
OX2
+2v-Op- ] dx
J1. OX
1 dx 2 (3.128)
1 3

generates the Euler-Lagrange equation, which coincides with the equation under
consideration (3.126). Consequently, we seek for a stationary value of (3.128) by the
Rayleigh-Ritz method instead of trying to directly solve (3.126).
A proper trial function is
v = (xi - a2)(x~ - a2)f(XI ,X 2) (3.129)
which satisfies the boundary conditions (3.127) and reflects the obvious symmetry
of the problem, provided the function, f(X I ,X2), is specified so as to account for
this symmetry. Restricting the analysis to the case of three free coefficients we set
v = (xi - a2)(x~ - a 2)[bo + b l (xi + xn + b2xi xD (3.130)
Substituting (3.130) into (3.128) and taking the derivatives of 1 with respect to bo, b l
and b2 , we may obtain the system of linear equations, which specifies the solution.
In the first steps of programming we state the dependence v = V(XI ,x2 ) and then
formulate (3.130) and the integrand of (3.128)
(c2) depends(v, [xl, x2]);
(d2) [v(x1, x2)]
(c3) (xl A2 - a A2)*(xr2 - a A2)*(b[0] + b[1]*(x1 A2 + x2 A2)
+ b[2]*xr2*xr2);
(d3) (x12 - a 2)(x22 - a 2)(b l (X22 + x12) + b 2x1 2x2 2 + b o)
(c4) diff(v, xlf2 + diff(v, x2r2 + m*v;

(d4) (~)2 +(~)2 +mv


dx2 dx1
3.17. Flow Through a Duct 125

where the constant m is given by


2 op
m=-- (3.131)
f.1 oX 3

Next, we evaluate the integrand of I


(c5) (subst(d3, v, %),ev(%%,diff»$
integrate this expression over the cross section of the duct and take the
derivatives. Since we do not doubt the existence of integrals, we adjust properly the
options assume_pos and intanalysis and then integrate
(c6) assume _ pos: true;
(d6) true
(c 7) in tanal ysis :false;
(d7) false
(c8) integrate (integrate (d5, xl, - a, a), x2, - a, a);
(d8) 4((588b 2a 10 + 5880b 1a 8 + 14700b oa 6)m + 704b~a 16 + 5120b 1b 2a 14
+ (2688b ob 2 + 19712bi)a 12 + 32256b ob 1a 10 + 47040b6 a 8)/33075
We take the derivatives with the help of do and then solve for hi' j = 0, 1,2
(c9) for i:O thru 2 do k[i]:diff(%, b[i])$
(elO) linsolve([k [0], k [1], k [2]], [b [0], b [1], b[2]]);
151m 21m 63m ]
[ o
(dlO) b = - 1024a2' b 1 = - 1024a4 ' b 2 = - 1024a6

(cll) eV(%,numer);

(dll) [b o = _ 0.1474~~9375m, b 1 = 0·0205078125m


- 4 '
a
b 2 = _ 0.0615234375mJ
a6
Substituting this into (d3) eventually yields the velocity, V(Xl' x 2 ),
(el2) subst(dlO, d3);
2 2 2 2 ( 21m(x22 + x12) 63mx1 2x2 2 151m)
(dI2) (xl - a )(x2 - a) - 1024a4 - 1024a 6
1024a 2
We may also be interested in the average velocity, v.v , defined by

= -12 fa fa dX 1 dX 2 (3.132)
-a-a
V,V V
4a
which is
(el3) (integrate(integrate(%, xl, - a, a), x2, - a, a)/(4*a A2), ev(%%, numer »;
(d13) - 0·07027777777777778a 2m
The obtained solution compares favourably with the exact one, as shown in the
following Table.
126 III. Direct Methods

Table I

XI = 0'2a XI = 0'8a
X2 =0 X2 =0 XI = X 2 = 0'4a XI = X 2 = 0'8a
(V/Vav ) approximate 2'026 0·823 1·562 0·367
(v/v av ) exact 2'025 0·826 1·561 0·372

3.18 Temperature Field in a Plate, Part I

Consider a plate which radiates heat at the rate f(x,y) per unit area and whose
edges are kept at zero temperature. Assume that under a proper normalization of
coordinates the plate occupies the region 0:::; x:::; 1, 0:::; y:::; n and that the above
radiation rate is given by
f(x, y) = b sin nx sin y (3.133)
The temperature, T, obeys the equation
82 T 82 T f(x,y) b. .
--2 + -- = - - = - sm nx sm y (3.134)
8x 8y2 k k
which is subjected to the following homogeneous boundary conditions:
T(x = O,y) = T(x = l,y) = T(x,y = 0) = T(x,y = n) = 0 (3.135)
Here k is the thermal conductivity.
As can be verified directly, (3.134) is the Euler-Lagrange equation for the following
functional:

$= f:f[(~:r +(~:r + 2~T sinnxsinY]dxdY (3.136)

This might be used to obtain a solution, say, by the Kantorovich method given
earlier in Section 3.14.
We seek for the solution as follows:
T = x(1 - x)f(y) (3.137)
which satisfies those boundary conditions from (3.135) which are concerned with
the x-coordinate. The explicit form of f (y) may then be obtained from the stationarity
of the functional (3.136) and the remaining boundary conditions.
In the program given below we put b/k = 1, (and also T = t), state the
dependencies involved, formulate the integrand of (3.136), the trial function (3.137)
and then integrate with respect to x only
(c2) depends(t, [x, y],f, y);
(d2) [t(x, y), f(y)]
(c3) dilf(t,xr2 + dilf(t,yf2 + 2*t*sin(%pi*x)*sin(y);

(d3) 2tsin(%PiX)Sin(Y)+(:~r +(::r


3.19. Temperature Field in a Plate, Part II 127

(c4) t:x*(1- x)*f;


(d4) f(1 - x)x
(c5) (subst(%, t, d3), ev(%%, diff»;

(d5) 2f(1 - x)x sin(%pix)sin(y) + (f(1 - x) _ fx)2 + (:;) 2(1 - X)2X 2

(c6) intanalysis :false;


(d6) false
(c7) integrate(d5, x, 0,1);

240fsin(y) + %pi 3 (~r + 10%pPf 2


(d7)
30%pi 3
At this juncture the functional ell is given by

ell = f: (d7)dy (3.138)

and its Euler-Lagrange equation easily follows as


d2 f 120
--lOf=-siny (3.139)
dy2 n3
We solve this equation with the help of ode2 and then incorporate the remaining
boundary conditions by be2
(c8) ode2(diff(f,y,2)-1O*f= 120 *sin (y)/%pi A3, f, y);
120sin(y)
(d8) f= -
11%pi3
+ %kl%e
0 0
SQrt (lO)y + %k2%e- SQrt (lO)y
0 0

(el2) bc2(%, y = 0, f = 0, y = %pi, f = 0);

(dI2) f = _ 120 sin(y)


l1%pP
which after substitution for f in (3.137) specifies solution for T by the Kantorovich
method.

3.19 Temperature Field in a Plate, Part II


The approach of the previous section extends to the second order approximation.
The trial function for the temperature field may be put in the form
T = x(1 - x)f(y) + x 2(1 - X)2g(y) (3.140)
which is a generalization of (3.137). Indeed, it contains two functions, fey) and g(y)
to be obtained from the variational procedure.
Setting derivabbrev option true to get a more compact appearance of the
derivatives, we first proceed as in Section 3.18. Namely, we state the integrand of
128 III. Direct Methods

cl> defined by (3.136) in (c2), the trial function (3.140) in (c3), then substitute and
integrate with respect to x in (c4) and (c7), respectively.
(c1) derivabbrev:true;
(d1) true
(c2) ('ditT(t, x, 1)t2 + ('diff(t, y, 1)t2 + 2*t*sin(%pi*x)*sin(y);
(d2) 2t sin (%pix) sin (y) + (t y)2 + (t.)2
(c3) t:x*(1- x) * f(y) + x 2*(1- xf2*g(y);
A

(d3) (1 - X)2x 2g(y) + (1 - x)xf(y)


(c4) (subst(%, t, d2), ev(%%, diff));
(d4) ((1 - X)2x 2g(y)y + (1 - x)xf(Y)y)2 + 2 sin(%pix)((l - X)2x 2g(y)
+ (1 - x)xf(y))sin(y) + (- 2(1 - x)x 2g(y) + 2(1 - X)2xg(y)
- xf(y) + (1 - x)f(y))2
(c5) intanalysis:false;
(d5) false
(c6) assume_pos:true;
(d6) true
(c7) integrate(d4,x,0, 1);
(d7) (%pi5(g(Y)y)2 + 9%pi 5f(y)yg(y)y + 21%pi5(f(Y)y)2
+ ((60480 - 5040%pi2)g(y) + 5040%pi~f(y))sin(y)
+ 12%pi5g2(y) + 84%pi5f(y)g(y) + 21O%pi 5f2(y))/(630%pi 5)
Hence, the functional cl> again gets the form

cl> = f: (d7)dy (3.141)

where the integrand this time contains two unknown functions, J(y) and g(y). The
Euler-Lagrange equations may be derived automatically in a way described in
Section 2.18.
We first introduce the convenient notations for J,y as Jy and for g,y as gy, and
then formulate two Euler-Lagrange equations with the help of eola-function.
(c9) [fy:diff(f(y), y), gy:diff(g(y), y)];
(d9) [f(y)y, g(Y)yJ
(elO) eula1 (la):= diff(la, f(y)) - diff(diff(la, fy), y)$
(c11) eula2(la):= diff(la, g(y)) - diff(diff(la, gy), y)$
We define the argument, la, in agreement with (3.141) and then call for eolal
and eola2.
(el2) la:d7$
(el3) (eula1(la),ratsimp(%%));
(d13) - (3%pi3g(y)yy + 14%pi 3f(y)yy - 1680 sin(y)
- 28%pi3g(y) - 140%pi3f(y))/(210%pi 3)
(el4) (eula2(la), ratsimp(%%));
(d14) - (2%pi5g(y)yy + 9%pi 5f(y)yy + (5040%pi2 - 60480)sin(y)
- 24%pi5g(y) - 84%pi 5f(y))/(630%pi 5)
The Euler-Lagrange equations are thus given by (d13) and (d14). These may be
solved with the help of ahaloe and desolve. As follows from the boundary conditions
3.19. Temperature Field in a Plate, Part II 1.29

(3.135) and the trial function (3.140), we get


g(y = 0) = g(y = n) = 0
(3.142)
f(y = 0) = f(y = n) = 0
Incorporating first the conditions at y = 0, we issue
(cI5) atvalue(f(y), y = 0,0);
(d15) 0
(cI6) atvalue(g(y), y = 0,0);
(dI6) 0
(cI7) desolve([d13, dI4], [f(y), g(y)]);
(dI7) [f(Y) = ilt(199920%pF':"- 1874880)lvar2 - 1874880%pi 2 + 8467200
1121%pi 5(lvar4 - 1121var2 + 1008) ,

Ivar y ) - (199920%pi2 - 1874880)sin(y)


-----=-:-:-::-:--:-:--:-;:--'-------"'--'-
, 1121%pi 5 '
(9324oo%pi 2 - 9313920)sin(y)
g(y) = 1121%pi5

'1 ( (9324oo%pi 2 - 9313920)lvar 2- 9313920%pi 2 + 103299840


t
+1
1121%pi 5(lvar4 -112lvar 2 + 1008 '

Ivar,y) ]

The above solutions contain the inverse Laplace transform, ilt, with respect to
Ivar with y as a parameter. Noting that the remaining conditions at y = n,
g(y = n) = f(y = n) = 0 (3.143)
would be met if we select in (dI7) only the terms containing siny, we omit the terms
containing the inverse Laplace transform. This is a correct procedure because of
the linearity of the system.
We obtain separately f(y) and g(y)
(cI8) first (%)$
(cI9) last (dI7)$
and then extract from these the sin-terms
(c20) part(rhs(d18),2);
(199920%pi 2 - 1874880)sin(y)
(d20) - 1121%pi5
(c21) part (rhs(d 19), 1)
(9324oo%pi 2 - 9313920)sin(y)
(d21) I 121%pi5
Hence, f(y) is given by (d20), g(y) by (d21), and the solution is
T = x(1 - x)(d20) + x 2 (1 - xf(d21) (3.144)
130 III. Direct Methods

The exact result is given by


sin nx siny
T= --~--'-­ (3.145)
Z n +1
which gives for the midpoint
T(x = t) = - 0.092 sin y (3.146)
The first approximation obtained in Section 3.18 and the present second approxima-
tion provide
T(1)(x = t) = - 0.088 sin y,
(3.147)
T(z)(x = t) = - 0.092 sin y
respectively.

3.20 Free Vibrations by the Rayleigh-Ritz Method


Dynamic problems are usually more complicated than static. Applications of the
direct methods may therefore be particularly useful. Indeed, these methods provide
an efficient way to analyze vibrations of elastic systems.
Consider a discrete conservative system with the generalized coordinates, '1i'
i = 1, 2, .. . Q. In case of free vibrations, these may obey the following law

'1i = Ui sin wnt (3.148)


where U i is the amplitude and Wn is the natural frequency. Consequently, the kinetic
energy may be given by
(3.149)
i j

with the "mass" coefficient, rno, given by


rn o = II aijuiUj (3.150)
i j

The potential energy may be put in the form


U = U max sin Z wnt (3.151)
where Umax is its maximal value.
We now turn to Hamilton's principle dealt with in Chapter 2

J i'2
'I
(T - U)dt = 0 (3.152)

Note that the instants of time, tl and t z are not subjected to variation in this relation.
We may therefore consider the time interval (tz - t 1 ) as the period of vibrations.
Substituting (3.149) and (3.151) into (3.152) we get

(3.153)
3.20. Free Vibrations by the Rayleigh-Ritz Method l~l

Then prescribing

(3.154)

with T being the period and integrating, we obtain


b(!w;rno - Urnax) = 0 (3.155)

1
since
2"/ro n COS2 W t 1t
n dt=- (3.156)
o sin 2 w nt Wn

Note that Wn in (3.155) is still unknown.


Although this has been derived for discrete systems, it applies, upon a proper
interpretation, to continuous systems too, if combined with direct methods. In fact,
it has been shown that these methods may be thought of as those of discretization
of continuous systems.
To this end, we think of U i as they were spatial functions and represent them by
(3.157)
where the spatial functions, Uij' are chosen so as to satisfy the boundary conditions.
Again, the number of terms is governed by the desirable accuracy of results.
Substitution of (3.157) into the conditions of stationarity (3.155) yields the system of
equations
1 2 orno oUrnax
2Wn----=0, i= 1,2, ... k (3.15&)
Oai oa i
which is linear and homogeneous. The determinant of (3.158) must vanish for the
solution to exist. This provides the frequency equation
(3.159)
which is of the k-th power in w;.
The number of roots corresponds to the number
of free parameters in (3.157). The modes of vibrations, given by Uij' follow from
substitution of these roots back to (3.158).
Finally, note that the first term in the bracketed expression in (3.155) is the
maximum of the kinetic energy, as (3.149) shows. The basic equation (3.155) may
thus be satisfied, as a particular case, by equating the maxima of the potential and
kinetic energies. This yields
2 Urnax
W (3.160)
n-- - -
Trnax
The maximal values appearing in this equation may be estimated with the help of
a static analysis, for example, by the direct methods considered, to provide a first
order approximation for w n • This particular procedure is known as the Rayleigh
method.
It has been noted earlier that the potential energy predicted by the Rayleigh-Ritz
method is higher than the exact one. Equation (3.160) suggests that the same
is true for W n • Further, (3.158) now appears as a means of minimizing this upper
bound.
132 III. Direct Methods

3.21 Free Vibrations of a Non-uniform Beam


For flexural vibrations of a beam with the hinged ends, we set for the deflection
w = u sin wnt (3.161)
It is seen that the boundary conditions (3.29) are satisfied by the functions
knx
siny, k= 1,2,3 ... (3.162)

where L is the beam length. We therefore represent u appearing in (3.161) as


. nx . 2nx
u=a 1s111-+a 2 s111- (3.163)
L L
which is in agreement with (3.157). The beam is thereby replaced by a
system of two degrees of freedom, with a 1 and a 2 being the generalized
coordinates.
Generalizing (3.150), we get

mo = tL pu 2 dx (3.164)

r
The maximum of potential energy is given by

Um • x =t Elu~xxdx (3.165)

as follows from (3.161) and (3.22).


Let the mass density per unit length, p, and the stiffness, EI, be given by
(Fig. 3.10).

p= Po (1-2:)
(3.166)
EI = 1-2: )
J0 (

Substituting (3.163) and (3.166) into (3.164) and (3.165) and evaluating the integrals,

p=p (1- ~)
o 2L

J~t L

Figure 3.10 To vibrations of a non-uniform beam


3.22. Master Program 133

we obtain
mo -_ Po L(a8i + 8a9naz + 3a~)
8
l Z

(3.167)
_ n J o(3ai 32a a
4
l Z z)
U max - 2L3 8+~+6az

Substituting these into (3.158) and taking derivatives with respect to a l and a z , we
get two homogeneous equations. This provides the determinantal equation
3({JZ - 1) 8({Jz - 4)
4 9n z
f(w;;) = =0 (3.168)
8({Jz - 4) 3 ({Jz - 16)
9n z 4
where
WZP L4
{J=_n_o_ (3.169)
n4 J o
The roots of this equation are
{Ji = 0·0013, {J~ = 16·14 (3.170)
which, because of (3.169), provide the following natural frequencies

(3.171)
w(Z)
n
= 4.017 n Z Va
LZ~ Po
Note that the method easily extends to the case of beams resting on an elastic
foundation by adding in (3.165) the term,

f L

o
Kuz
--dx
2 '
(3.172)

which accounts for the strain energy of the foundation.


The next section presents symbolic computations which carry out the presented
technique.

3.22 Master Program

A program, which performs the analysis, similar to that given in the previous section,
but for various end supports is given below. Its first part, which deals with the
boundary conditions, may be taken identical to that of Section 3.10. We therefore
key in w, its first and second derivatives, and the expressions involved in the boundary
conditions
(c1) sum(a[j] *x'j,j, 1,5)$
(c2) difT(%, x)$
134 III. Direct Methods

(c3) diff(%, x)$


(c4) [fL:ev(dl, x = L), flO:ev(d2, x=0),flL:ev(d2, x = L),
f20:ev(d3, x =0), f2L:ev(d3, X= L)]$
It is understood that the first three coefficients in (el) follow from the boundary
conditions. Next, introduce the rid-function, which depends on the above spatial
mode function, u, the density, r, and stiffness, ei. These, in turn, may be spatial
variables. The right-hand side of this function, rid (u, r, ei), is defined below as a
compound statement, which performs subsequently the operations needed,
(c5) rid(u, r, ei):= ('diff(u, x, 2), ev(%%, diff), umax:integrate
(%%A2/2*ei, x, 0, L), mO:integrate(r*u A2, x, 0, L),
for j:4 thru 5 do b[j]:wn2/2*diff(mO,a[jJ-diff(umax,a[j]),
coefmatrix([b[4], b[5]], [a[4], a[5]]), determinant(%%),
solve (%%, wn2))$
where wn2 = w; .
It is seen that the second derivative of u is evaluated and then substituted into
(3.165) to obtain Urnax which is denoted by umax. The value of mo, which follows
from (3.164), is denoted as mO. Then the do statement provides the expressions
equivalent to (3.158), one of them denoted as b4 and a~other as bs . We construct then
the relevant matrix by invoking coefmatrix, find its determinant and solve it for w;,
which is denoted by wn2.
To verify the program, we save it and consider the problem of Section 3.21. The
condition w(O) = 0 has been satisfied by the very choice of win (el). We first solve
the equations accounting for the rest of the boundary conditions (3.29) and then
substitute the coefficients into (dl) to obtain the deflection w
(c7) solve([fL, f20, f2L], [a[I], a[2], a[3]])$
(c8) subst(%,dl)$
It remains to call the rid-function
(c9) rid(%,rO*(1-x/(2*L)),jO*(1-x/(2*L)));
wn2 = _ (71280sqrt(5704143) - 192147120)jO
(d9) [
2268111 4 rO '
(71280sqrt(5704143)+ 192147120)jO]
wn2=--------------~---------
2268111 4 rO
(elO) float (%);
96'585342jO 1597'7515jO]
(dl0) [ wn2 = 14 rO ' wn2 = 14 rO

These results are in agreement with (3.171). The slight difference follows from
the fact that the trial functions applied in the previous section are trigonometric,
unlike a polynomial given by (el).
Our next example deals with a uniform beam clamped at the ends
(el5) solve([fL, flO, flL], [a[I], a[2], a[3]])$
(el6) subst(%,dl)$
3.22. Master Program 135

(el7) rid(%,r,ei);
504ei 3960eiJ
[ wn2=~,wn2=~
(d17)

The exact result is


(\) 2 _ 501·76El (2) 2 _ 3806·89El
[W n ] - pL4 ' [W n ] - pL4 (3.173)

Note that in agreement with the previous comments, the Rayleigh-Ritz prediction
is higher than the exact one and that its accuracy is better for the lower natural
frequency.
The program modifies so as to treat the beams resting on an elastic foundation.
In this case, as commented on earlier, the strain energy, Urna., becomes

Urna• =2:
1 fL (Elu. xx + Ku
0
2 2
)dx (3.174)

We may therefore issue a new function, say, ridel (u,r,e,k), which includes K as one
of its arguments and incorporates (3.174) in the definition of the strain energy
(el8) ridel(u, r, ei, k):= ('diff(u, x, 2),ev(%%, diff),
umax:integrate(%%A2/2*ei + u A2/2*k,x,0, L),
mO:integrate(r*u A2, x, 0, L),
for j:4 thru 5 do b[j] :wn2/2*diff(mO,a[j])-diff(umax,a[j]),
coefmatrix([b[4], b[5]], [a[4], a[5]]), determinant (%%),
solve(%%, wn2))$
This, along with the previously given statements (el)-(c4) constitutes an independent
program of which the previous one is a particular case.
Consider a uniform beam clamped at x = 0 and hinged at x = L, which rests on
an elastic foundation with the variable stiffness given by
K=sx (3.175)
The boundary conditions are
w(x = 0) = w(x = L) = 0
(3.176)
w,x(x = 0) = w,xix = L) = 0

where the first of these equations, w(x = 0) = 0, has been satisfied in (el). We issue
(c19) solve([fL, flO, f2L], [a[l], a[2], a[3]])$
(c20) subst(%, d1)$
It may be useful prior to integration involved in the ridel-function to let the
code know about the nature of the quantities involved. Indeed, the integration
process might provide results in various forms, depending on this information.
We therefore type in
(c21) assume(ei > 0, r > O,k > 0);
(d21) [ei > 0, r > 0, k > 0]
(c22) intanalysis:false $
136 III. Direct Methods

and then invoke the above ridel-function with (3.175) substituted for K. This yields
the squares of the natural frequencies, which are then evaluated by
(c24) ev(%, numer);
(d24) [wn2= 1·7482517e-03 (-3'3166248(8111 1 °s2
- 2135232eil 5s + 40597438464ei 2)0'5 + 3081 5s + 804672ei)/(14r),
wn2 = 1·7482517e-03 (3'3166248(8111 1 0s 2 - 2135232eil 5s
+ 40597 438464ei 2)0' 5 + 3081 5s + 804672ei)j(l4r)]
For a particular case of K = 0, we get
(c25) %,s=O;
238-482ei 2575.0564eiJ
(d25) [ wn2 = l4 r ' wn2 = 14r

while the exact values are


237·16El 2500El
----rfP
(1) 2 _ (2) 2 _
[w n ] - L4p , [w n ] (3.177)

3.23 Free Vibrations by the Bubnov-Galerkin Method


The Bubnov-Galerkin method is another possible technique. Consider, as an
example, longitudinal free vibrations of a non-uniform bar shown in Fig. 3.11.
Let the mass density per unit length, p, and the cross section, A, be
p = Po(1 + x/L), A = A o(1 + x/L) (3.178)
where L is the bar length. The equation of vibrations with respect to the axial
displacement, ua(x, t), is

d ( dUa) d 2 ua (3.179)
dx EA dx - P dt 2 = 0

where the first term represents the elastic force, while the second the inertial force.
The boundary conditions are
Ua(x = L) = 0
(3.180)
ua'x(x = 0) = 0

Figure 3.11 To vibrations of a non-uniform bar


3.23. Free Vibrations by the Bubnov-Galerkin Method 137

The first of these relations prohibits the displacement at the built-in end, while the
second ensures zero stress at the opposite free end.
Representing once again the dynamic displacement as a product of spatial and
temporary functions, set
u.(x, t) = f(x) sin wnt (3.181)
with Wn the natural frequency. Substituting this into (3.179) we get

~(EA
dx
df ) + pw;f= 0
dx
(3.182)

In turn, f(x) assumes the form similar to (3.157)


f(x) = adl + ad2 + .. ·adk (3.183)
where fi(X) should be chosen so as to satisfy the boundary conditions (3.180). On
*
substituting this into (3.182), we arrive at the residual, say, t/I(f(x)) O. In accord
with the Bubnov-Galerkin technique, the system of homogeneous linear equations

r
is given by

t/I(f(X))fidx=O (3.184)

i= 1,2,oo.k.
A solution exists ifthe determinant of this system vanishes, which yields the frequency
equation for Wn'
Confining the analysis to the first two frequencies, we put

(3.185)

which satisfy (3.180). Substituting this into (3.184) yields two equations

r [(EAfJ + pw nfjdx
Jo
L
2 = 0 (3.186)

i,j = 1,2
where prime denotes differentiation with respect to x. The natural frequencies follow,
as mentioned earlier, from the determinant associated with (3.186).

r
If we denote

r
T;j = pfJj dx
(3.187)
Vij = (EAf;),fj dx

then the above determinant is given by

j T ll w; + V ll T12W; + V12j =
0 (3.188)
T21 Wn
2
+ V21 T22 w n + V22
2

The program which performs these calculations makes use of arrays of functions
138 III. Direct Methods

and is as follows:
(el) f[s](x):= 1 - (x/Lt(s + 1)$
(c2) t[i,j]:integrate(rO*(1 + x/L)*f[i](x)*f[j] (x), x, 0, L)$
(c3) p[s](x):= diff(e*aO*(1 + x/L) * diff(f[s] (x),x,x) $
(c4) v[i,j]:= integrate(p [i] (x)*f[j] (x), x, 0, L)$
(c5) genmatrix(t, 2, 2)*wn2 + genmatrix(v, 2, 2)$
In (el) we generate the coordinate functions given by (3.185) with s = 1 or s = 2,
and then formulate the first of (3.187) in (c2) while taking into account (3.178). The
command (c3) defines the derivative of the bracketed term in the second equation
of (3.187) which is then used in (c4). It remains to create the matrix expression
associated with (3.188). For a second order matrix this may be done as in (c5). For
a higher order one entermatrix could be more convenient.
Next, we find the determinant and solve the frequency equation, which yields
the natural frequencies
(c6) determinant(%)$
(c7) solve(%, wn2);

[ n2 = _ (21sqrt(218141) - 12663)eaO
(d7) w 88712rO' .

wn2 = (21sqrt(218141) + 12663)eaO]


8871 2rO
(c8) ev(%, numer);

(d8) _ 3.2185242eaO _ 25.33389geaO]


[ wn2 - FrO ,wn2 - 12rO

Here wn2 = w; .
To assess how satisfactory this solution is, we consider the first order approxima-
tion, setting a2 = a 3 = ···ak = 0 in (3.183). Then (3.186) generates the single equation
Tllw; + VII =0 (3.189)
in notations of (3.187), and we issue
(elO) solve(t[l, 1]*wn2 + v[l, 1], wn2);

(dlO) [wn2 = lO~aO]


31 rO
(cll) eV(%,numer);

(dll) [ wn2 = 3.3333333eaO]


12rO

Comparing (dll) with (d8) we conclude again that the higher order approxima-
tion, given by (d8), not only provides the second natural frequency too but it also
better· estimates the first one. Indeed, since the discussed method yields an upper
bound, the first natural frequency predicted by (d8) is more accurate than that given
by (dll).
3.24. Nonlinear Vibrations by the Bubnov-Galerkin Method 139

3.24 Nonlinear Vibrations by the Bubnov-Galerkin Method


The classical equation for a harmonic oscillator
mx+kx=O (3.190)
holds for small x only. Consider therefore a more general equation
mx + F(x) =0 (3.191)
where F(x) is a nonlinear function of the displacement, x. In particular,
F(x) = kx + k 1 x 3 (3.192)
which gives Duffing's equation
mx + kx + k 1 x 3 = 0 (3.193)
This equation describes the free oscillations of a mass when the elastic restoring
force is given by (3.192), and is known as the case of cubic nonlinearity. Note that,

F(x) / k1=O
a)
/ (linear case)

./ /
/

j/
./
If
.~

b) a

Figure 3.12 To non-linear oscillations


140 III. Direct Methods

unlike k, the coefficient kl in (3.192) may be either positive or negative, as Fig. 3.12a
shows.
Periodic solutions to (3.193) are of primary interest from the engineering point
of view. We therefore try, as a first approximation, the simple harmonic solution
x = acoswt (3.194)
which is well-known from the linear theory. Here the unspecified yet frequency w
and period, T, are related by
211:
T=- (3.195)
w
It is convenient to denote

f(x) = F(x)
m
k (3.196)
w n2 =_
m
and write (3.193) in the form
XU + w;(x + m 1 x 3 ) = 0 (3.197)
where

(3.198)

Note, that Wn as given by the second equation of (3.196) is the natural frequency of
the associated linear system.
In the framework of Bubnov-Galerkin method, we may consider (3.194) as a
trial function. Substituting it for x into (3.197), multiplying the result by cos wt and
integrating over the period, T, we may obtain a relation between the amplitude, a,
and frequency, w.
The program given below carries out the above operations. Here
w=w, wn2 =w;, m1 =m l (3.199)
(c2) 'diff(x, t, 2) + wn2*(x + m1 *x 3);
A

d2 x
(d2) dt 2 + wn2(mlx3 + x)
(c3) (subst(a*cos(w*t), x, %), ev(%%, diff»;
(d3) (a 3 ml cos 3 (tw) + acos(tw»wn2 - aw 2 cos (tw)
(c4) intanalysis:false;
(d4) false
(c5) assume pos:true;
(d5) true
(c6) integrate(d3*cos(w*t), t,0, 2*%pijw) = 0;
(3%pia 3 ml + 4%pia)wn2 - 4%piaw2
(d6)
4w
o
3.24. Nonlinear Vibrations by the Bubnov-Galerkin Method 141

(c7) solve(%, w'2);

(d7) [ w2 = (3a 2ml; 4)wn2 ]

As (c5) shows, this result follows for the case m, > 0 which corresponds to the
"rigid" characteristic (Fig. 3.12a). Repeating the computations for m, < 0 we get
(c8) assume(m I < 0);
(d8) [ml < OJ
(c9) integrate(d3 *cos (w *t), t, 0, 2*%pi/w);
(3/~pia3ml + 4%pia)wn2 - 4%piaw2
(d9)
4w
which is identical to (d6).
Hence, the result given by (d7) holds either for m, > 0 or for m, < O. It shows
that, unlike the linear systems, free vibrations of the nonlinear system exhibit the
dependence between the frequency of oscillations and their amplitude. Fig. 3.12b
shows this dependence according to (d7).
It is possible to improve this result by adding a term in the trial function (3.194).
However, its particular form is not immediately clear. The following heuristic
iteration scheme may therefore be useful.
Write (3.197) as
(3.200)
where k denotes the number of iteration. Choosing for k = I
x, = a cos OJt (3.201)
where a and OJ are related by (d7), we solve (3.200) for x 2 , which may be an improved
solution
(elO) 'diff(x, t,2) + wn2*x= -a'3*cos(w*tr3*mhwn2;
d2x
(dIO) -2 +wn2x= -a 3 mlcos 3 (tw)wn2
dt
(ell) ode(%,x,t);
(dll) x = - (cos(tw)(3a 3 mlwn22 - 27a 3 mlw 2wn2)
+cos(3tw)(a 3 mlwn22 - a 3 mlw2wn2))/(4wn22 - 40w 2wn2
+ 36w4 ) + %k I sin (t sqrt(wn2)) + %k2 cos (t sqrt(wn2))
The last two terms in (dll) must vanish, since we look for a steady-state solution,
without any influence of initial conditions,
(el2) subst([%kl = 0, %k2 = OJ, %);
(dI2) x = - (cos(tw)(3a 3 mlwn22 - 27a 3 mlw 2wn2)
+ cos (3tw)(a 3 mlwn22 - a 3 mlw 2wn2))/(4wn2 2 - 40w 2wn2 + 36w4 )
This relation shows the generation of higher harmonics with the frequency 3M,
which is another feature typical of nonlinear system. Note that the parameters a
and OJ are still related by (d7). Substituting (dI2) for X2 into the right-hand side of
(3.200), one may get the next approximation, x 3 , and so forth. We conclude, in
142 III. Direct Methods

agreement with the earlier results of Chapter 1, that unlike the linear oscillator, the
nonlinear system investigated shows the dependence of amplitude on frequency of
vibrations and generation of higher harmonics.

3.25 Mathematical Considerations. Scalar Product of Functions

The direct variational methods are essentially heuristic and need to be examined
and justified from a more rigorous point of view. This and following sections of this
chapter are concerned with this question.
To clarify the conditions under which the direct methods may hold, we have to
restrict the nature of the functions and mathematical operations involved. This may
be done with the help of rigorously stated definitions, which is one of the subjects
of subsequent considerations. Furthermore, it has been shown in Chapter 2 how a
function may be found, which yields an extremum to a certain functional. The inverse
problem, which deals with the question how to find a functional, an extremum of
which is provided by a given function, is, of course, of similar interest. This will also
be considered in the following considerations.
The mathematical consistency requires a function to be defined in some domain,
V. This domain arises when the points of a solid are given the coordinates in a
reference frame. The boundary of a domain, Q, is the set of points in any proximity
of which there are points which do belong to the domain and which do not belong
to it. This is, of course, a formal definition of the intuitively clear concept. The
domain and its boundary constitute together a closed domain, Vo'
Confining the analysis to functions continuous in Vo we introduce the so-called
scalar product of two of them. If Q is a point of Vo and u and v are two functions,
then their scalar product (u, v) is given by

(u, v) = Iv u(Q)v(Q) dV (3.202)

It can be shown that the scalar product of two functions just introduced has the
properties similar to those of the scalar product of two vectors. For example, the
functions, u and D, may be interchanged without affecting the product
(u, v) = (v, u) (3.203)
as follows from (3.202).
Next, the scalar product of any function with itself is obviously non-negative
and may be zero if and only if this function is equal to zero. Also, the following
relation holds
(atu t +a 2 u 2 ,b t v t +b 2 v2 )
= at b t (u t , v t ) + a t b 2 (u t , v2 ) + a 2 b l (u 2 , bd + a 2 b 2 (u 2 , V2) (3.204)
if at, a z , b t and b z are constants. The proof is based on the straightforward appliction
of (3.202). All of the above relations are common for the functions and vectors.
To further extend this analogy, we need to introduce the quantity similar to the
length of the vector, a,
lal = a = (a'a)t (3.205)
3.26. Operators and Functionals 143

We therefore define the so-called norm of a function, f, by


If I = (f,f)t (3.206)
Now we elaborate some of the properties common for the just defined functions
and vectors. For example, the norm of a function equals zero if and only if the
function is zero. This is obviously the case for vectors too. For vectors a and b we get
a' b = ab cos IX :( Ia II b I (3.207)
where IX is the angle between a and b. Similarly for the above functions, the following
relation holds
l(u,v)l:( lullvl (3.208)
Finally, the triangle inequality also holds for the norms
lu+vl:(lul+lvl (3.209)
To this end, consider the quantity
lu + vl 2 = (u + v,U + v) = (u,u) + 2(u,v) + (v,v) = lul 2 + Ivl2 + 2(u,v) (3.210)
Substituting (3.208) into this equation, we get (3.209).
The above considerations may be generalized to the case of vector functions for
which

(u, v) = Iv (uxv x + UyVy + uzv z) dV (3.211)

is the scalar product and

luI 2 =(u,u)= Iv (u~+u;+u;)dV (3.212)

is the square of the norm.


Equations (3.210) and (3.211) resemble the operations with the usual vectors. It
may therefore be assumed that the concepts introduced are useful for functions
to the same extent.

3.26 Operators and Functionals


In the previous considerations we frequently dealt with transformation of functions,
in particular, with various operations appearing in differential equations. The
operator is said to be defined for some set of functions if a law is prescribed which
specifies a correspondence between each function of this set and one and only one
function of the new set. This resembles the definition of a function. These two sets
of functions merit special names. The set of functions the operator acts upon is
referred to as the field of its definition, while the resulting set as its field of values.
For example, one of the operators often appearing in considerations is the
biharmonic operator
84 84 84
~4=_+_+2__ (3.213)
8x 4 8y4 8x 28y2
144 III. Direct Methods

An operator which has zero as its field of values is called a null operator, while
an operator which results again in the function it acts upon is called an identity
operator, T. Furthermore, we may define the sum of two operators (A + H) and their
product AH by
(A + H)f= Af+ Hf (3.214)
AHf= A(Hf) (3.215)
where f denotes a function from the fields of definition of A and H. If
AHf=HAf (3.216)
the operators A and H are said to be permutable. The inverse operator A- I is
defined by
AA- I =[ (3.217)
The linear systems are particularly known to possess features facilitating their
analysis. We therefore introduce the concepts of linear set of functions and of linear
operator.
If for any functions fl and f2' belonging to a set of functions, fl + f2 and afl
also belong to the same set, then the set is called linear. Here a is any constant. The
examples are endless: the set of continuous functions, the set of polynomials, the
set of functions which take on zero value at a certain point. A counterexample is,
say, the set of functions for which
f(x = 3) < 5 (3.218)
which may not satisfy either of the above conditions and is therefore nonlinear.
In turn, the operator A is linear, if for any number n and constants aI' a2, ... an
the following equation holds
n n
A I
i;;::1
aJ;= I
i=l
AaJ; (3.219)

where the functions f; belong to the linear set of the field of definition of A. The
identity operator, [, and the null operator are obviously linear. For example
n n
II aJ;= I
;=1 i=l
aJ;
(3.220)
n n
I
;=1
IaJ;= I
i=}
aJ;

The biharmonic operator (3.213) is linear if applied to a linear set, say, to functions
having continuous derivatives up to the fourth order and vanishing at the boundary.
The functionals dealt with earlier now appear as a particular case of operators.
Indeed, an operator which generates a constant from any function, which belongs
to its field of definition, is a functional. The definition of a linear functional follows
therefore from the above definition of a linear operator.
We define the so-called quadratic functional by
(Af, f) + If +C (3.221)
where A is a linear operator, I is a linear functional and C a constant. Quadratic
functionals playa major role in the subsequent considerations.
3.27. Symmetric and Positive Definite Operators 145

3.27 Symmetric and Positive Definite Operators


An operator A is called symmetric, if for any two functions, f 1 and f 2' of its field of
definition the following relation holds
(3.222)
It is assumed that fl and f2 are continuous within the closed domain and the
functions Afl and Af2 have the finite norr~s.
As an example, consider the operator, A, given by
_ d2 f
Af = - dx 2 (3.223)

This operator is defined for functions, which have continuous derivatives up to the
second order in the closed segment, say, 0,;:; x,;:; 1. Then

fl( d 2fl 2f2 )


- . -.
(Afl,f2)-(jI,Aj2)= - 0 f2 dx2 - fl ddx 2 dx (3.224)

Since the integrand on the right-hand side equals

(3.225)

this yields for the left-hand side


- (f2f't - ftf~)16 (3.226)
Hence, if we narrow further the field of definition of A and require the functions fl
and f2 also vanish at the segment ends
fi(X = 0) = f;(x = 1) = 0, (i = 1,2) (3.227)
the operator A becomes symmetric. For the identical operator, 1, we get
(lft ,f2) - (ft ,lf2) = (ft ,f2) - (fl,f2) = 0 (3.228)
The null operator is also symmetric.
A symmetric operator A is called positive definite, if
(Af,f)~O (3.229)
for any function f from its field of definition. It is assumed therefore that (3.229)
vanishes only if
f=O (3.230)
This type of operators is closely related to the energy of elastic systems.
As an example, consider the operator Agiven by (3.223) subjected to the boundary
conditions (3.227). We get for (3.229)

(AJ,f) = - I fxxfdx (3.231)

which after integration by parts, gives

I f~xdx - ff,{ (3.232)


146 III. Direct Methods

The last term in (3.232) vanishes because of (3.227) and we get

(4f,f) = (f~xdX ~ 0 (3.233)

Furthermore, it follows that the equality in (3.233) is possible only for f == O. Hence
A is positive definite. On the other hand, as (3.22) shows the strain energy of the
beam differs from (3.223) only by a constant multiplier. To point out this fact, the
scalar product
(3.234)
with A being positive definite is referred to as the energy of the function f.
These considerations enable us to define a new measure of the closeness of the
functions, fl and f2' from the field of definition of A, namely, the following quantity
(A(fl - f2),(fl - f2))t (3.235)
which is the square root of the energy of their difference. In turn, this leads to a
new type of convergence. The sequence, fn' converges in energy to f if
lim (A(fn - f), (fn - f)) -+ 0 (3.236)

Note, that the operator A in (3.236) must be positive definite and, if it is differential,
then the functions involved must be continuous and have continuous derivatives of
the necessary order. Further, the functions must satisfy the homogeneous boundary
conditions. The energy convergence does not automatically imply the uniform
convergence.

3.28 The Minimum Theorem and Minimizing Sequence


Consider an operator equation
Af=t/I (3.237)
where t/I is a given function, and f is an unknown solution, which has also to satisfy
certain boundary conditions. We first show that if A is positive definite then (3.237)
has a unique solution. Indeed, assume that fl and f2 are solutions to (3.237)
Afl = t/I, Af2 = t/I (3.238)
Since A is linear we get by substracting (3.238)
Afo=O (3.239)
with
fo=fl- f2 (3.240)
Consequently, the energy of fo is
(Afo,fo) =0 (3.241)
which implies
fo=O, fl=f2' (3.242)
and proves the uniqueness.
3.28. The Minimum Theorem and Minimizing Sequence 147

Next, consider the quadratic functional associated with the equation (3.237)
F(f) = (Aj, f) - 2(f, 1jJ) (3.243)
or in the explicit form

F(f)= LLf A f - 2fIjJJdV (3.244)

where A is positive definite. We show that of all its values provided by the functions
from the field of definition of A, the least is the value provided by the above unique
solution of (3.237).
To this end, let u be the solution to (3.237)
Au=1jJ (3.245)
Replacing IjJ in (3.243) by Au we get
F(f) = (Af, f) - 2(f, Au) (3.246)
It can be verified by direct calculations that (3.246) is equal to
F(f) = (A(f - u),(f - u)) - (Au, u) (3.247)
Since A, appearing in both of the above terms, is positive definite the minimum of
(3.247) is given by
F(u) = - (Au, u) (3.248)
which follows from
f=u (3.249)
This is known as the minimum functional theorem. It provides a rule to actually
construct the functional, if an equation is given, thereby replacing the latter by a
variational prinCiple. Note that this result may not apply to dynamic problems.
Indeed, it can be shown that the quadratic functional (3.243) is proportional to the
static potential energy of a system. The theory of Euler-Lagrange equations, treated in
Chapter 2, provides a "reverse" way from the functional to the equation.
Consider some functional, <l>(u), with the exact lower bound, c. Then the sequence,
Un' is said to be minimizing if

lim <I>(u n ) = c (3.250)

Now we may show that a minimizing sequence for the functional, F(f) given by
(3.243), converges in energy to the solution of (3.237). In fact, adjusting (3.247) we get
F(u n ) = (A(u n - u),(u n - u)) - (Au,u) (3.251 )
which has the limit
lim F(u n ) = c = - (Au, u) (3.252)
as n --> 00, as (3.248) shows. Consequently,
(A(u n - u),(u n - u))-->O (3.253)
which illustrates the convergence typical of direct methods. Unfortunately, the
148 III. Direct Methods

statements as rigorous as arrived at in this section, are only possible for quite a
narrow class of operators. Nevertheless, they clarify the mathematical basis of these
methods.

3.29 Orthogonal and Linearly Independent Functions

Various comments concerning the choice of coordinate functions have been made
earlier. To bring to light other relevant aspects, we introduce the concept of
orthogonal functions. Two functions, II and 12, are said to be orthogonal over
V if
(3.254)
For example, the functions
1, cos x, sin x, cos 2x, sin 2x .... (3.255)
°
all orthogonal in the interval < x < 2n, as may be verified by the direct integration.
If all functions of an orthogonal set are normalized, the set is referred to as
orthonormal. This may be achieved by dividing each function of the set by its norm.
Hence, for the orthonormal set, Ii, we get

(f",fk) =
{a,1, n #k
n= k (3.256)

The functions of an orthonormal set can be shown to be linearly independent. It


means that the equation
(3.257)
holds when and only when all constants a i are equal to zero.
The 'concepts of orthogonality and linear independence of functions are closely
related to the direct methods. In fact, if the coordinate functions chosen are linearly
dependent then, as (3.257) shows, they may represent a vanishing solution even
though the constants a i are not zeros. This may cause computational difficulties.
On the other hand, the direct methods involve various integrations of functions
over V. If the coordinate functions obey the orthogonality condition (3.254), this
may simplify the calculations in quite a radical way.
A solution to the equation at hand is usually known to belong to a certain class
of functions. The relevant question is whether a selected set of trial functions is
capable of representing any function of the above class. This leads us to the concept
of the complete set of functions, defined as such which has the above capability.
For example, the set, Ii, is complete in the sense of convergence in the mean
if any function with a finite norm can be approximated to in the mean
within V by a linear finite combination of Ii' Another example is given by the powers
of x
(3.258)
which form a complete set with respect to the functions continuous in the interval
b.
a:;{, x:;{,
3.29. Orthogonal and Linearly Independent Functions 149

A point to note is that the cases when an orthonormal and complete set is used
to construct trial functions correspond mostly to problems of a purely academic
nature. In practices, trial functions, which satisfy the necessary boundary conditions
and symmetry and contain sufficiently low powers (frequencies), may yield a
satisfactory solution, without being orthonormal or complete.
Chapter IV
Introduction to the Finite Element
Method

Compared to the direct methods considered earlier, the finite element technique
further extends the idea of discretization, this time of the very structure or solid
under investigation. This allows to broaden the class of problems amenable to
solution so as to include those dealing directly with modern technology. On the
other hand, a sufficiently fine mesh and/or high order of approximation within
elements, ensure that the error is kept reasonably small. This technique requires the
processing of extensive data and may efficiently be implemented with the help of
computers only.
It could be useful to go over the Appendix at the end of the book before reading
this chapter. Programs given in various sections are interrelated. This is illustrated
in the diagram given below (Fig. 4.0), and should be taken into account while saving
these programs.

4.1 Finite Elements. The Element Stiffness Matrix

Methods presented in Chapter 3 suggest that the trial functions satisfy, at least, the
imposed (essential) boundary conditions all over the domain. For complex geo-
metrical shapes this may be the requirement difficult to comply with, even though
techniques for automatization of this process, the master programs, have been given
earlier. Also, these methods may not be appropriate, if there are abrupt spatial
variations in the distributions of elastic and inertial properties.
A natural way to bypass this difficulty is to think of the structure (solid) as an
assemblage of finite, sufficiently small elements, which are properly connected with
each other. Then trial functions for an element may be chosen in a simple way, since
the necessity to satisfy the conditions all over the boundary is not relevant anymore.
Further, this allows for an efficient use of digital computers and standardization of
the computational procedure. It is seen that the idea of discretization, this time of
the spatial domain occupied by the structure, once again finds applications in
engineering analysis.
We have considered earlier the bending of beams by formulating trial functions,
which span the entire interval, 0 :s; x :s; L. Let us now assume that a beam is composed
of finite elements of the length, h, (Fig. 4.1). In order to implement the idea of the
method, we first consider a single element. The analysis should be carried out in
4.1. Finite Elements. The Element Stiffness Matrix 151

~I
Sect.4.2 I - - -...... Sect.4.11I.... --~..a-tl Sect.4. 12 1

I Sect.4.7 a-tl
I - - - -...... SeCt.4.9\1- --....,·a--tl Sect.4.10\

I Sect.4 .18 I-I----!.


a-il Sect.4. 19 1

Figure 4.0 Diagram

------

Figure 4.1 Beam element

terms of the deflections, rotations, moments, and transverse forces at the ends of
the elements. Indeed, these quantities are necessary for formulating the potential
energy. They should be matched across the boundary of the element to ensure their
discontinuity. Solutions for separate elements are then to be properly assembled to
yield the result for the entire beam. In the sequel, we first consider the procedures
for finding the relevant elemental matrices and later deal with the assembling
process.
Figure 4.1 shows a finite element subjected to the end transverse forces q I and
q3 and moments q2 and q4' The deflections at the ends are denoted as WI and W3
and the rotations as 12 and 14' respectively. These quantities are referred to as the
nodal ones. For convenience, we introduce the so-called nodal displacement vector
152 IV. Finite Elements Method

(matrix)

(4.1)

and the nodal force vector (matrix)

(4.2)

Note, the entries of {w} as well as {q} may have different dimensions"For example,
W t and W3 have the dimension oflength, while 12 = W 2 and 14 = w4, being the angles,
are dimensionless. For convenience, {w} is also referred to as the generalized
displacements and {q} the generalized forces.
It is seen that, as far as the elementary theory is concerned, the nodal force
vector {q} uniquely defines the loading of the element, while the nodal displacement
vector {w} its geometrical configuration. The crucial fact in specifying (4.1) and (4.2)
is that the work done on the element can be stated in terms of {w} and {q}, as will
be shown later.
Invoking the example of the linear spring
F= kx (4.3)
as an analogue, we would like to express the dependence between {q} and {w} as
{q} = [k]{w} (4.4)
where [k] is a 4 x 4 matrix which is called the element stiffness matrix. The nodal
forces, {q}, should be understood as those acting on the element. Equation (4.4)
shows that the stiffness matrix, [k], characterizes the response of the element to the
extent to which k in (4.3) characterizes that of the spring.
Bearing in mind that the kinematic conditions at the ends given by (4.1) involve
four quantities, the simplest approximation for the deflection, w(x), is
(4.5)
Note, this is in accord with the governing equation, w,xxxx = 0, and with the earlier
comments on the selection of trial functions. The coefficients, ai' do not have,
however, an explicit physical meaning. It is desirable to express these coefficients in
terms of the nodal displacement, {w}, taking into account that the rotation angle,
I, is given by
1 = dw (4.6)
dx
This may be done by using the boundary conditions.
The following program performs the necessary computations using the notations
wx = w,x, wxx = w. xx , wxxx = w,xxx (4.7)
4.1. Finite Elements. The Element Stiffness Matrix 153

(c2) w:sum(a[i]*x'i,i,0,3);
(d2) a 3 x3 + a 2x2 + ajx + ao
(c3) wx:diff(w, x);
(d3) 3a 3 x2 + 2a 2x + a j
(c4) [wi = ev(d2, x = 0), w3 = ev(d2, x = h), f2 = ev(d3, x = 0),
f4 = ev(d3, x = h)] $
(c5) linsolve(%, a [0], a[l], a[2], a[3]]);

(d5) _ _ __ - 3w3 + 3wl + (f4 + 2f2)h


[ a o - wl,a l - f2,a 2 - h2 '

a3 = - 2w3 + 2W l3 + (f4 + f2)h ]


h

(c6) w:subst(%,d2);
(-2w3 + 2wl + (f4 + f2)h)x 3 (- 3w3 + 3wl + (f4 + 2f2)h)x2
(d6) h3 2 + f2x+ wi
h
(c7) wx:subst(d5,d3);
3( - 2w3 + 2wl + (f4 + f2)h)x 2 2( - 3w3 + 3wl + (f4 + 2f2)h)x
(d7) h3 h2 +f2

In (d2) and (d3) we stated wand w,x, respectively, while in (c4) formulated the
boundary conditions
WI =w(x=O), = w(x = h)
W3
(4.8)
12 = W 2 = w,Ax = 0), 14 = W 4 = w,Ax = h)
T~e next command, linsolve, finds the expression for a i in terms of Wi' as shown in
(d5). Substituting these expressions for ai in (d2) and (d3), we find wand w,x,
respectively, in terms of x and the nodal displacement vector, {w}, These are given
by (d6) and (d7), respectively.
Noting that the nodal force vector, {q}, and the nodal displacement vector, {w},
are related by the system of equations
qj = Elw,xxAx = 0), q2 =- Elw,xAx = 0)
(4.9)
q3 = - Elw,xxAx = h), q4 = Elw,xAx = h)
we find the element stiffness matrix, [k]. To this end, state w,xx and w,xxx by
(c8) wxx:diff(d7, x);
6( - 2w3 + 2wl + (f4 + f2)h)x 2( - 3w3 + 3wl + (f4 + 2f2)h)
(d8) h3 - h2

(c9) wxxx:diff(%, x);


(d9) 6( - 2w3 + 2:! + (f4 + f2)h)

and then (4.9) by


(c10) [ev(wxxx, x = 0), - ev(wxx, x = 0), - ev(wxxx, x = h), ev(wxx, x = h)];
154 IV. Finite Elements Method

6( - 2w3 + 2w1 + (f4 + f2)h) 2( - 3w3 + 3w1 + (f4 + 2f2)h)


(dlO) [
h3 ' h2 '

6( -2w3 + 2w1 + (f4 + f2)h) 6(- 2w3 + 2w1 + (f4 + 2f2)h)


h3
_ 2( -3w3 + 3wI + (f4 + 2f2)h)]
h2
It is seen from (4.9), which are explicitly given by (dIO), (the multiplier El omitted),
that they provide the "transformation" of {w} to {q}, as defined by (4.4). Therefore,
it is sufficient to find the coefmatrix of (dlO) with respect to {w} to specify [k]
(cll) k:coefmatrix (dIO, [wl,f2, w3,f4]);
12 6 12 6
h3 h2 h3 h2
6 4 6 2
h2 h -h 2 h
(dll)
12 6 12 6
h3 h2 h3 h2
6 2 6 4
-
h2 h h2 h
Note that the multiplier, El, has not been incorporated and the final form of the
element stiffness matrix, [k] is
(c12) k:ei*%;
12ei 6ei 12ei 6ei
h3 h2 h3 h2
6ei 4ei 6ei 2ei
-
h2 h h2 h
(d12)
12ei 6ei 12ei 6ei
h3 h2 h3 h2
6ei 2ei 6ei 4ei
h2 h h2 h
Equations (dll) and (d12) show that [kJ is a symmetric matrix. Nqte again that,
like {w} and {q}, the k-matrix components have different dimensions. By going over
to the modified matrices

(4.10)
4.2. Energy Analysis of a Finite Element 155

we express the element stiffness matrix, [k], as follows:


6 -12

ll2
-~J
EI 4 -6
[k] =];3
-I~ -6
2
12
-6
(4.l1 )

where use has been made of (d12). Clearly, (4.4) becomes


{iJ} = [k]{w} (4.12)
Each of the matrices, {w}, {iJ}, and [k] has the entries of the same dimension.
It is desirable to put the deflection, w(x), as given by (4.5), in a matrix form too.
To this end, we set
w(x) = {d(X)}T{W} (4.l3)
where

{d(x)} ={ ~:~:~}
d3 (x)
(4.l4)

d4 (x)
is known as the interpolation (shape) functions vector. The very form of (4. 13) shows
that di(x) is the ratcoef of Wi in the expression for w as given by (d6),
(c13) [d[1](x):= ratcoef(w, w1),d[2](x):= ratcoef(w,f2),
d[3](x):= ratcoef(w, w3),d[4](x):= ratcoef(w,f4)];
The explicit form of di(x) follows from a resort to the do and display-commands
(c14) for i:1 thru 4 do display(d[i](x));
2x 3 - 3hx 2 + h 3
dJ(x)= h3

x3 _ 2hx 2 + h 2 x
d 2 (x) = h2
(d14)
2x 3 - 3hx 2
d 3 (x) = - h3

x 3 - hx 2
d4 (x) = - - : : - -
h2
Interpolation functions playa major role in the finite element method.

4.2 Energy Analysis of a Finite Element

The considerations of the previous section show that either the coefficients, ai' or
the nodal displacement matrix, {w}, may be considered as the generalized degrees
of freedom of the element. Indeed, once this matrix is given, the deflection, w, at
156 IV. Finite Elements Method

any point x of the element follows from (4.13) and (4.14). It is of a major interest
to express the kinetic and potential energies of the element in terms of the generalized
coordinates, {w}. Note, that in the dynamic case {w} = {w(t)}. The above energies
allow for natural definitions of relevant element matrices.
Considering the above beam under bending, we get for the kinetic energy

T = -
1 fh p(x)w 2 (x, t)dx (4.15)
2 0

where p(x) is the mass density per unit length. It is seen from (4.13) that
W'w = w2 = {w(t)}T{d(x)}{d(x)}T{~V(t)} (4.16)
Thus, the kinetic energy is
T = Hw(t)}T[m] {w(t)} (4.17)

f:
with
em] = p(x){d(x)}{d(x) Vdx (4.18)

being the so-called consistent 4 x 4 mass matrix of the element.


Similarly, the potential strain energy, U, is

U = f:
~ EI(x)w~xxdx (4.19)

On taking the second derivative of (4.13) with respect to x and substituting this into
the above equation, we get
U= Hw(t)} T[k] {w(t)} (4.20)
with

[k] ~ f: {d,xAx)}EI(x){d,xAx)}T dx (4.21)

being the 4 x 4 element stiffness matrix, Note a remarkable similarity, which (4.17)
and (4.20) bear with the kinetic energy of a particle and the potential energy of a
spring, respectively,
It has been assumed so far that the forces acting on the element are applied at
its ends, If there is a distributed load, b(x, t), then this should be lumped in a proper
way at the ends too.
It is seen from (4.13) that the virtual deflection, bw, may be written as
bw = {d(x)Vb{w(t)} (4.22)
and, consequently, the virtual work done by the above external load is

f: b(x, t)bw dx = {p(t)} Tb {w(t)} (4.23)

with the abbreviation

{p(t) V = f: b(x, t){ d(x) Vdx (4.24)


4.2. Energy Analysis of a Finite Element 157

being the nodal "distributed" force matrix. These nodal forces yield the same virtual
work as the distributed force, b(x, t) does, and in this sense are equivalent to the latter.
Note, that once the mass density, p(x), and the stiffness, EI(x), are given, the
kinetic and potential energies follow from (4.17) and (4.20), respectively, in terms of
the nodal displacement vector, {w(t)}, since {d(x)} is given by (d14), Section 4.1.
The same holds for the work done by the distributed load, b(x, t), as follows from
(4.23). This equation is valid for the concentrated forces too, since in this case a
delta-function may be invoked to describe the intensity of a distributed load. Also,
as follows from their definitions, the matrices, Em] and [k], are symmetric, in
agreement with the earlier remark.
Let us carry out the necessary calculations and find Em], [k], and {p} for a
uniform beam, as a sequel to the previous program. With the help of do we now
compute the elements of Em] as the array m[i,j] in accord with (4.18),
(c15) for i:1 thru 4 do for j:1 thru 4 do m[i,j]:
uintegrate(d [i](x)*d [j] (x), x, 0, h)$
Here r denotes the density, p. Then put the above result in a matrix form taking
into account that Em] is symmetric
(c16) entermatrix(4,4);
Is the matrix 1. Diagonal 2. Symmetric 3. Antisymmetric 4. General Answer 1,2,3
or 4
2;
Row 1 Column l:m[l, 1];
Row 1 Column 2:m [1,2];
Row 1 Column 3:m[1, 3];
Row 1 Column 4:m[1,4];
Row 2 ColUl.nn 2:m[2,2];
Row 2 Column 3:m[2,3];
Row 2 Column 4:m[2,4];
Row 3 Column 3:m[3,3];
Row 3 Column 4:m[3,4];
Row 4 Column 4:m[4,4];
Matrix entered.

13hr 11h 2 r 9hr 13h 2 r


-- - ---
35 210 70 420
11h 2 r h3r 13h 2 r h3 r
--
210 105 420 140
(d16)
9hr 13h 2 r 13hr I1h 2 r
- -- ---
70 420 35 210
13h 2 r h3r 11h 2 r h3 r
--- ---
420 140 210 105
A similar algorithm yields [k]. In accord with (4.21) first take the second derivative
158 IV. Finite Elements Method

of {d(x)} and then integrate from 0 to h to get the array k[i,j],


(c17) for i: 1 thru 4 do for j: 1 thru 4 do
k[i, j] :ei * integrate (diff (d [i](x), x, 2)* diff(d [j] (x), x, 2), x, 0, h)$
(cIS) entermatrix(4,4); (Here we key in the entries as in the above case).
This provides [k] as follows:
12ei 6ei 12ei 6ei
h3 h2 h3 h2
6ei 4ei 6ei 2ei
h2 h - h2 h
(dIS)
12ei 6ei 12ei 6ei
-}0 h2 h3 h2
6ei 2ei 6ei 4ei
h2 h h2 h
The matrix [k] just obtained is identical to that of the previous section.
It remains to compute {p(t)}. Assume that the element under consideration is
subject to a uniform distributed force, 8 0 (t). Then (4.24) reads

{p(t)} = 8 0 (t) f: {d(x)} dx (4.25)

Accordingly, we compute the array, p[i], and then the matrix {p} by typing in
(cI9) for i:l thru 4 do p[i]:eO*integrate(d[i](x),x,O,h)$
(c20) entermatrix(4, 1); etc.
where eQ = 8 0 , This yields {p}
heO
2
h 2eO
12
(d20)
heO
2

As shown in the previous section, by introducing the nodal displacements vector


{w}, given by (4.10), the matrices of interest may be put in more "homogeneous"
forms. In particular, the elemental stiffness matrix, [k], becomes that given by (4.11).
The matrices [m] and {p} are then formally replaced by

~ ph
[
156
22
22
4
54
13
- 13
-3
J (4.26)
[m] = 420 54 13 156 - 22
-13 -3 -22 4
4.3. Truss Element 159

(4.27)

4.3 Truss Element


Consider a structure shown in Fig. 4.2, which is a truss consisting of three
pin-connected bars. Each of the bars may naturally be thought of as a finite element.
Since no bending moments occur, the bar suffers purely axial elastic strains due to
the axial displacement, u. It also undergoes the transverse displacement, v, which
is, however, a rigid-body motion. It contributes nothing to the elastic energy of
deformation, but does contribute to the kinetic energy. In plane, each of the two
nodes of the bar (finite element) (see Fig. 4.3) has two degrees of freedom. This
provides four degrees for the bar.

y
y
Global
reference
x frame
X
h
element 1

y
x element
node 2 node 3

Figure 4.2 Truss

y WI = UI
W2 = Vt
W3 U2
W4 = V2
WI
X
/ node 1
Figure 4.3 Truss element
160 IV. Finite Elements Method

We begin the analysis of this finite element on the understanding that it may
apply, perhaps with necessary modifications, to any of the bars, which the truss
consists of. Denoting the axial coordinate as x, we define the two components of
the displacement, u(x) and v(x), in accord with the earlier comments. Since
the element has four degrees of freedom, the simplest possible approximations
are
(4.28)
with ao, aI' bo and b l being unknown coefficients. If we introduce the 4 x 1 matrix
of the nodal displacement, {w}, by (see Fig. 4.3)

(4.29)

we may express (4.28) in terms of {w} to obtain, as in the earlier sections, a physically
meaningful representation.
On substituting x = 0 and then x = h, we get from (4.28)

(4.30)

and (4.28) become

u(x) = (1- ~ )u I +~U2' v(x) = (1-~)v1 +~V2 (4.31)


Here

dl(X)=(1-~} d2(X)=~ (4.32)

are the interpolation (shape) functions. Equations (4.31) may be put in a matrix form
u(x) = {wf{DI(x)}, v(x) = {wf{D2(X)} (4.33)

where {w} is given by (4.29) and

{DI(x)} ={ ::t:},
o
{D2(X)} ={d'~XJ }
d2 (x)
(4.34)

This representation facilitates the computation of the energies.


Indeed, turning to the kinetic energy of the element, we get

T=~fh p(x)[u 2(x) + v2(x)]dx


2 0

=~J: p(x){w}T[{DI(X)}{DI(X)f + {D2(X)}{D2(X)}T] {w}dx (4.35)


4.3. Truss Element 161

where use has been made of (4.33). The elemental mass matrix is given by

em] = J: p(x)[{D1(x)}{D1(x)}T + {D 2 (x)}{D 2 (x)V]dx (4.36)

Accordingly, (4.35) acquires the form identical to (4.17).


Turning to the potential energy of deformations, note that only the axial
component of the displacement should be accounted for. We get, say, for the bar 2

U ="21 fh0 EA(x)u~x(x)dx (4.37)

where EA(x) is the variable stiffness. Making use of (4.33) we obtain

u = ~J: EA(x){wV {D1.Ax)}{D1.xV {w}dx


=HwV[k]{w} (4.38)
which provides the following elemental stiffness matrix

[k] = J: EA(x){Dl.Ax)}{Dl,Ax)V dx (4.39)

Consequently, the expression for the potential energy becomes identical to (4.20).
We go over to computations of em] and [k], assuming, for certainty, that we
deal with the bar 2 (Fig. 4.2) and the xy-reference frame is that shown in the figure.
According to (4.32) and (434), the interpolation matrices, {Dl(X)} denoted below
as del and {D2(X)} denoted as dcl are
(c2) dc1 :matrix([l - x/h], [0], [x/h], [0];

x
1--
h
0
(d2)
x
h
0

(c3) dc2:matrix([0], [1 - x/h], [0], [x/h]);


o
x
1--
h
(d3)
o
x
h
This yields the leading bracketed term in (4.36) as follows:
162 IV. Finite Elements Method

(e4) de 1.transpose (del)+ de2. transpose( de2);

x( 1-~)
(1-~r 0
h
0

x( 1-~)
0 (1-~r 0
h
(d4)
x( 1-~) 0
x2
0
h h2

x( 1-~) x2
0 0
h h2
For a uniform bar the mass matrix, Em], given by (4.36), is

Em] = p s: (d4) dx (4.40)

Denoting p = r we key in
(e5) intanalysis: false$
(e6) m:integrate(d4, x, 0, h)*C;

hr hr
o o
3 6
hr hr
o 3
0
6
(d6)
hr hr
6
o 3
o
hr hr
o 6
o 3

l
which may be put in the form

ph
[m]2 ="6
02 02
1 0
01 1
2 0
°l (4.41)

o 1 0 2

The elemental stiffness matrix, [k], is defined by (4.39). Preparing first {Dl,x(x)}
denoted below as delx
4.4. Physical Meaning of the Element Matrices 163

(c7) dclx:difT(dcl, x);

I
--
h
0
(d7)
I
-
h
0

we then find [k] for a uniform bar


(c8) k:integrate(dclx.transpose(dcIx), x, 0, h)*ea;

ea ea
0 0
h h
0 0 0 0
(d8)
ea ea
0 0
h h
0 0 0 0

This may be put in the form

l' ~J
0 -I
EA 0 0 0
[k]2 =T
(4.42)
~~ 0 I
0 0

Note that upon proper orientation of the reference frame, the obtained results apply
to the other bars of the truss too.

4.4 Physical Meaning of the Element Matrices

The stiffness matrix, [k], governs the relation between the nodal force vector, {q},
acting on the element, and the nodal displacement vector, {w}, according to (4.4).
To appreciate better the physical meaning of its elements consider again, without
any loss of generality, the beam element shown in Fig. 4.1, for which [k] is given
by (d 18), Section 4.2, and assume that {w} T is given by [1000], In other words,
the deflection at the node I is given as unity, while all other "displacements" vanish.
In order to find {q}, load the program of Section 4.2 and then recall [k]
164 IV. Finite Elements Method

(c22) k:d18;

12ei 6ei 12ei 6ei


h3 h2 h3 h2
6ei 4ei 6ei 2ei
h2 h h2 h
(d22)
12ei 6ei 12ei 6ei
h3 h2 h3 h2
6ei 2ei 6ei 4ei
h2 h h2 h

which yields [k]. Next, key in {w} given above and find {q}
(c23) w:matrix([1], [0], [0], [0]);

(d23) m
(c24) q:k.w;
12ei
h3
6ei
h2
(d24)
12ei
h3
6ei
h2

It is seen from (d24) and (d22) that {q} is merely the first column of [k]. Consequently,
the elements of this column should be interpreted as the components of the nodal
force vector, {q}, when {w} is given as in (d23).
Similarly, if we define {w} as
(c25) w:matrix( [0], [1], [0], [0]);

(d25) LJ
then {q} is given by
(c26) q:k.w;
4.4. Physical Meaning of the Element Matrices 165

6ei
hZ
4ei
h
(d26)
6ei
hZ
2ei
h
which is precisely the second column of [k]. The identification of other elements of
[kJ is made in the same way.
Next, compute the determinant of [kJ
(c27) determinant (k);
(d27) 0
Hence, [kJ is a singular matrix. The reason is that it describes the stiffness of a
structure, which is "floating" in space and includes thereby the translation of the
structure as a rigid body. Such motions cause no strains. To confirm these comments
define {w} as follows:

fa
(c28) w:matrix( [zJ, [OJ, [zJ, [OJ);

(d28)

This nodal displacement vector prescribes, as (4.1) shows, a pure rigid body motion,
since it forbids the rotations of the cross-sections given by W z and w4 , and implies
the translation in the transverse direction, defined by z. The nodal forces associated
with (d28) vanish, as expected,

m
(c29) q:k.w;

(d29)

On the other hand, the mass matrix, [mJ, describes the inertial properties of the
finite element, or in more precise words, the "distribution" of the inertia over its
degrees of freedom given by {w}. In the dynamic case, the latter is a function of
time, {w} = {w(t)}.
Without any loss of generality, assume that the time-dependence is given by
sin wt, as in case of free vibrations, for example, and define {w(t)} as follows:
166 IV. Finite Elements Method

(c30) w:matrix([l], [0], [0], [O])*sin(wl *t);

sin (tWl)l
(d30) [ ~
o
where wI = OJ. Next, define the matrix of acceleration of the nodes, wt2, as follows:
(c31) wt2:diff(w, t,2);

-w12 sin (tWl)J


(d31) [ ~
o
and recall the mass matrix, em], given by (d16), Section 4.2
(c32) m:d16;
l3hr Ilh 2r 9hr l3h 2r
-- - ---
35 210 70 420
11h2 h3r 13h 2r h3r
--
210 105 420 140
(d32)
9hr 13h 2r 13hr 11h 2r
- -- ---
70 420 35 210
13h 2r h3r Ilh 2r h3r
420 140 210 105
Then t~e inertia forces, {i}, associated with the nodes are
(c33) i:m.wt2;
13hrw1 2 sin (twl)
35
Ilh rw1 2 sin (twl)
2
210
(d33)
9hrw1 2 sin (twl)
70
l3hrw 12 sin (tw 1)
420
Comparing this with the first column of em] shows that this column represents the
effective masses (moments of inertia) associated with the nodes, when the displace-
ment vector, {w}, is given as in (d30). Similar considerations apply to interpretation
of other elements of em].
It is seen that the matrices, [m] and [k], allow for a modeling of the basic mechani-
cal features of the "piece" of continuum, such as a beam, by those associated with the
discretely situated nodes. It is therefore another way to reduce the number of degrees
of freedom of the system and make the problem more tractable.
4.5. Global Reference Systems 167

4.5 Global Reference Systems


Modeling a structure by an assemblage of discrete elements is the essence of the
method. Therefore, the elemental matrices derived in local coordinates should be
expressed in global ones, which would facilitate the matching of elements. Since the
assemblage may consist of elements differently oriented in space, the point in question
is the transformation of the matrices due to rotations of the reference frame. Then,
for example, the stiffness matrix for the bar 3 of the truss (Fig. 4.2) could be obtained
by a proper transformation of that of the bar 2 or 1. Similarly, the elemental matrix
for, say, the bar 2 may be deduced from that of the bar 1 and vice versa, instead of
deriving the both matrices independently.
For the sake of certainty consider a bar shown in Fig. 4.4 which is thought of
as a finite element. Its ends (nodes), 1 and 2, have the displacements WI' W 2 , W3 and
W 4 , w 5 , W 6 , respectively. These are considered as the generalized coordinates. The
element has thus six degrees of freedom.
We introduce the local and global coordinate systems, x, y, z and X, Y, Z,
respectively. The associated displacements are Wi and Wi' i = 1,2, ... ,6, respectively.

m
The coordinate transformation is given by

{;l~[nl (4.43)

with en] being the matrix of direction cosines

(4.44)

Here, say, nxx is the cosine of the angle between the x and X -axes. This induces the
following transformation of the displacements

{ ::} ~ [nl {H {::} ~ [nl {::} (4.45)

Ws

z
z
"-
"-
'\
,
y-----:iI

x
Figure 4.4 Local and global coordinate systems
168 IV. Finite Elements Method

In order to arrive at a more condensed representation, which would employ a


single equation, we introduce the generalized transformation matrix [NJ given by

[NJ = [[n0JTnJ
J l OJ (4.46)

and the column matricies


WI WI
W2 W2
W3 W3
{w} = , {W}= (4.47)
w4 W4
Ws WS
W6 W6
Equations (4.45) become
{w}=[NJ{W} (4.48)
The matrix [NJ as well as [nJ is orthonormal. Note that they may vary from
one element to another.
Having defined the local-global coordinate transformation, write the expressions
for the energies in the global reference frame, making use of (4.17), (4.20) and (4.48)
T=t{w}T[m]{w} =tPVY[NY[m][NJ{W} =t{WV[M]{W} (4.49)
t t
U = {w} T[k] {w} = t{W}T[N]T[k] [N] {W} = {W}T[K] {W} (4.50)
Here
[M] = [N]T[m] [N] (4.51 )
is the elemental mass matrix and
[KJ = [NY[k] [N] (4.52)
is the stiffness matrix, both in the global coordinates.
Similarly, we get from (4.23) and (4.24)
{P} = [NY {p} (4.53)
for the nodal "distributed" force vector expressed in the global coordinates.
In case of a planar structure referred to the xy-plane, the rotation-of-axes
transformation, [nJ, simplifies to

° ° ~J
cosa sina
[n J = [ - sin a cos a (4.54)

where a = (x X) is measured counterclockwise. This reduces to a 2 x 2 matrix.


A

In order to illustrate the application of the above formulae, consider the truss
shown in Fig. 4.2. For the bar 3 the angle, a = 3n/4, relatively to the bar 2 and
[n J3 becomes

[nJ3 = -
1[1
j2 1 (4.55)
4.5. Global Reference Systems 169

and, in turn, [N]3' according to (4.46), is given by

r -~J
-1 0
1 1 0
[N]3 = - j2 ~ (4.56)
0 1
0 1
Turning to symbolic computations of the elemental matrices for the bar 3 in
the global coordinates, we type in first [N]3' as given by (4.56), and then [m]3 and
[k]3' making use of (4.41) and (4.42), respectively. In the latter case, we adjust
properly the length which is h j2.
(c1) matrix([l, -1,0,0], [1, 1,0,0], [0,0, 1, -1], [0,0,1,1])$
(c2) N: - %/sqrt(2)$
Thus (c1) and (c2) have formulated [N]3 in accord with (4.56). We now state the
elemental mass and stiffness matrices, both in the local coordinates, as follows:
(c3) matrix([2,0, 1,0], [0,2,0,1], [1,0,2,0], [0, 1,0,2])$
(c4) m:%*sqrt(2)/6$
(c5) matrix([l,O, -1,0], [0,0,0,0], [-1,0,1,0], [0,0,0,0])$
(c6) k:d5/sqrt(2)$
It is seen that (c3) and (c4) yield [m]3 (without the multiplier ph). They have been
obtained from (4.41) by substituting j2h for h to take into account the difference
in lengths. Similarly, (c5) and (c6) formulate [k]3 (without the multiplier EA/h). This
has been obtained from (4.42) by the above substitution.
Now we compute [M]3' the mass matrix in the global coordinates, using (4.51)
(c7) M3:transpose(N).d4.N;

·2
0 0
3 sqrt (2) 3 sqrt (2)
2
0 0
3 sqrt (2) 3 sqrt (2)
(d7)
2
0 0
3 sqrt (2) 3 sqrt (2)
2
0 0
3 sqrt (2) 3 sqrt (2)

l
which should be mUltiplied by ph to give [M]3 as follows:

[M]3 = P3 h
2 02 01 OJ
0 1 (4.57)
3j2 1 0 2 0
o 102
It is seen that as far as the difference in the lengths of the beams 2 and 3 is
neglected, the elemental mass matrix in global coordinates, [M]3 is equal to that
in local coordinates, which is given by (4.41). A more general investigation, which
170 IV. Finite Elements Method

resorts to the rotation-of-axes transformation with an angle Ct. (rather than


= - n/4), confirms that for the bars at hand these matrices indeed coincide
Ct.
for arbitrary Ct..
In a similar way we compute (4.52) to find the elemental stiffness matrix in the
global coordinates, [KJ3
(c8) K3 :transpose(N).d6. N;

2 sqrt (2) 2 sqrt (2) 2 sqrt (2) 2 sqrt (2)


1
2 sqrt (2) 2 sqrt (2) 2 sqrt (2) 2 sqrt (2)
(d8)
1 1 1 1
2 sqrt (2) 2 sqrt (2) 2 sqrt (2) 2 sqrt (2)
1 1
2 sqrt(2) 2 sqrt (2) 2 sqrt (2) 2 sqrt (2)

which, after incorporating the omitted multiplier, yields [KJ3

-~j
-1 -1

r
EA3 -1
[KJ3 = rn
2.,,; 2h -
1 1 -1
(4.58)

1 -1 -1 1

Finally, as noted earlier the elemental matrix for the bar 1 may also be derived
by rotation of the known matrix for the bar 2. For this element Ct. = - n/2. The
matrix [NJ I, according to (4.54) and (4.46), is

il
(c9) Nl: matrix ([0, -1,0, OJ, [1,0,0, OJ, [0,0,0, -IJ, [0, 0, 1, OJ);

(d9) [~ t ~ -
-

while [kJI' on omitting the multiplier EA/h, is given by (d5) (see also (4.42)).
(elO) k1:d5;

(clIO) [r ~: ]
Consequently, the element stiffness matrix, [KJ I ' in the global coordinates follows
from (4.52) as
(ell) Kl :transpose(Nl).kl.Nl;
4.6. Generalizations. Governing Equations of a Structure 171

(dIll r~ J~ -~l
where the multiplier EAJ/h has been omitted.

4.6 Generalizations. Governing Equations of a Structure


The one-dimensional elements considered represent, of course, a particular case,
which arises from a process of discretization of the structures consisting of
beams and bars. In general, for plane or spatial problems, one arrives at two-
or three-dimensional elements, which may also have internal nodes, curved
boundaries, etc.
Figure 4.5a shows a one-dimensional element with three nodes, the nodal
points 1 and 2 being the external nodes, and the nodal point 3 being the internal
node. The simplest two- dimensional element is a triangle (Fig. 4.5b). The corner
nodes 1, 2, and 3 are referred to as the primary external nodes, while 4, 5, and 6
the secondary external nodes. The node 7 is the internal one. The quadrilateral and
rectangular elements are shown in Figs. 4.5c and 4.5d. The latter may, of course,
be thought of as a particular case of the former. Figures 4.5e and 4.5f show two
three-dimensional elements, a tetrahedron and a prism. These examples in no way
exhaust the variety of possible finite elements. The choice of dimensionality, shape
and size of the element depends on the structure under consideration and is a matter
of engineering judgement. Additional relevant comments on this subject will be
given later.
The basic equation (4.4) should also be generalized, since it does not incorporate
various factors, in: particular, the distributed forces, b(X, t), the element may be subject
to. Besides this, because of various reasons, like the assembling and technological
processes applied or temperature changes, the structure may be subject to initial
strains or stresses. Taking this into account, we generalize (4.4) as follows:
{q} = [k]{w} - {p} + {Po} (4.59)
Here {p} represents the nodal forces needed to balance the distributed loads acting
on the element and given in (4.24), while {Po} those needed to balance the initial
strain. Further, (4.59) indicates that the first term on the right-hand side represents
those forces which are due solely to the displacement of the nodes, while that on
the left-hand side the resultant forces. Each term of (4.59) thus has a clear physical
meaning. Note, that in global coordinates this equation becomes
{Q} = [K] {W} - {P} + {Po} (4.60)
In the dynamic case both of the above equations should be so modified as to
include the forces of inertia. As follows from considerations of Section 4.4, these are
applied to the nodal points. In particular, we get the following equation of motion
of the element in global coordinates:
{Q} = [M]{W} + {K}{W} - {P} + {Po} (4.61)
172 IV. Finite Elements Method

a)
o~------~o~---------o
1 3 2

6
1 4 2

d) e) 4

f)
~-----~7

Figure 4.5 Various elements

In the sequel we shall neglect the effect of residual stresses described by the last
term in (4.61).
Note that the method of finite elements introduces various approximations.
Lumping the forces at the nodes and satisfying the equilibrium (motion) equations
for a discrete system of points only, do not necessarily ensure that these equations
are satisfied everywhere throughout the domain. Certain compatibility conditions,
such as continuity of the displacement across the boundary between the elements,
should be complied with. Finally, a way must be indicated of assembling the elements,
in other words, a way of constructing the assembly matrices [MJa and [KJa from
4.6. Generalizations. Governing Equations of a Structure 173

the element matrices [M]e and [K]e. Preliminary discussions of this question are
given below.
Assume that an elastic continuum or structure has been represented by a mesh
of finite elements, for each of which we get
{ Q } e = { K ]e { W} e (4.62)
nxl nxn nxl

The {W}e and {Q}e are n x 1 matrices, where n is the number of degrees of
freedom of the element. Consequently, [K]e is a square n x n matrix.
Denote the number of elements as Z and the number of degrees of freedom
of the entire structure as N. Obviously,
N<Zn (4.63)
since assembling the elements is accompanied by the imposition of constraints.
Consider an example of assembling four plane finite elements, A, B, C, and D,
shown in Fig. 4.6. The displacement at the node, which is 3 for A, 4 for B, 1 for C
and 2 for D, must be made the same regardless of the element to ensure the
compatibility. Assuming, for simplicity, that the element has four degrees offreedom,
one degree per node, we get 16 degrees of freedom for the set of independent elements,
but only 9 degrees of freedom for the assembly shown in Fig. 4.6b. Consequently,
the nodal displacement vector of the assembly, {W}a = [WI W2 ••• W9 Y, may be
introduced, which accounts for this fact.
Next, the displacement (a field variable) should be matched not only at the nodes,
but across the entire boundary between the adjacent elements. These comments are
relevant, of course, for two- or three-dimensional elements only.
This interelement continuity at the interface may be achieved by a proper choice
of the polynomial approximation for the field variable. In general, the number of
terms in such an approximation must fit the number of nodes. Consider, say, a
triangle with six nodes shown in Fig. 4.5b (without the internal node). The field
variable, u, may be given as
(4.64)
At the interface between the two adjacent elements, the so-called nodal line (see

a) local numbering b) global numbering


scheme scheme

QO,
434 3

7 I~ 9
0 C

do
4 5 6
A B

1 2 3
121 2
Figure 4.6 Assembling four elements
174 IV. Finite Elements Method

1 4

element 1 element 2
2
Figure 4.7 To the continuity of the field variable across the nodal line 2-3.

Fig. 4.7), u is given by a parabolic curve with three coefficients only. Identifying
these in terms of the values of u at the nodes, which are equal for both of the
elements, we ensure the continuity of u across the nodal line.
Figure 4.8 illustrates the situation for a simple case of two triangular elements
having four nodes all together. For each of the elements, we use the linear
approximation
(4.65)
shown in the Figure 4.8 as the vertical dimension. Along the nodal line 2-3 this
function is governed by the nodal values U2 and U3 which are the same for both
elements. This ensures the continuity across this line.
Note, that the continuity of the field variable does not necessarily imply the
continuity of its slope at the interface. The view A-A in Fig. 4.8 displays this fact.
Consequently, if needed, a special care should be taken to enforce the slope continuity.
We shall not investigate this question in more detail.
Denote the external forces applied at the nodes and acting on the elements of
the structure as {R}a (in global coordinates). Then {R}a is a N x 1 matrix, as well as
the nodal displaCement vector of the assembly, {W}a. Thus, if we would find the
stiffness 'matrix of the assembly, [KJa, it would be a square N x N matrix
{R }a=[ K Ja{ W}a (4.66)
Nxl NxN Nxl

Also, taking into account the inertia forces and distributed loads, represented by

node 1 p:J
element 1 element 2
view A-A
node 2
Figure 4.8 Field variable along the 2-3 line is governed by U2 and U3, but this does not ensure the
continuity of the slope.
4.7. Assembling 175

{P}a, (4.66) becomes


{R }a=[MJaPV}a+[ K Ja{W}a-{P}a=O (4.67)
Nxl NxN Nxl NxN Nxl Nxl

which is the governing equation of a structure and is similar to (4.61). Here [MJa
is the N x N mass matrix of the assembly.

4.7 Assembling
Although considerations of the previous section have provided a general form of
the equations governing the entire assembly, namely (4.67), we still have to develop
a technique for the actual construction of the assembly stiffness matrix [KJa' The
construction of the assembly mass matrix [MJa can be shown to follow the same
rules and will be dealt with later.
Note that the equations of equilibrium of the element are incorporated (in the
overall sense, at least), while specifying the element stiffness matrix, [KJe.1t therefore
becomes clear that it sufficies to ensure the equilibrium of the nodes ofthe assembly.
To this end, consider a typical node, i, which may be subjected to the external force,
R i . On the other hand, the elements sharing the node, i, exert the forces, which are
opposite to the nodal force vector {Q}i' The equilibrium equation for the node may
be put in the following symbolic form
(4.68)

where the right-hand side of the equation includes the forces due to all elements
sharing the node. Equations of this type allow to construct the assembly stiffness
matrix [KJa' Note that assembling techniques apply a global coordinate system.
To illustrate the procedure, consider the truss shown in Fig. 4.9, which is similar
to that shown in Fig. 4.2. The arrows indicate the components of the displacement
(degrees offreedom) associated with the nodes. Write first explicitly three equations

2L
node 1 1

node 20--_.....;0:::;.2__-4:>6
L3 node 3
L 5

Figure 4.9 Degrees of freedom of truss


176 IV. Finite Elements Method

(4.62) for the three available elements in the global coordinates shown in the figure
WI Q~I)

WZ Q~I)
[KJI
W3 Q~I)

W4 Q~)

W3 Q~Z)

W4 Q<f)
[KJz (4.69)
WS Q~Z)

W6 Q~Z)

WS Q~3)

W6 Q~3)
[KJ3
WI Q~3)

Wz Q~3)

Figure 4.10 shows the components of the external forces matrix {R}a and the
assembly nodal displacement vector {W}a. Fig. 4.11 shows the components of the
nodal force vector {Q};, i = 1,2,3, acting on each of the elements. These figures are
helpful for writing the equilibrium equations of the nodes given below.
Observing from Figs. 4.9 and 4.10 and referring to (4.69) that these are the
elements 1 and 3, which share the node 1, we get

Q~l) + Q~3) = Rl}


node 1 (4.70)
(I)
Qz + Qz(3) -_ Rz

Here the superscript indicates the element, the subscript indicates the component
of the force in the global coordinates, while Rl and R z are the components of the

tR6 ,W 6
node 2 <>----_-__ ~_

node 3 Rs ,Ws
Figure 4.10 External forces and displacements associated with the nodes
4.7. Assembling 17,7

I_ -------<1
.
Q_(2_)
.
o~
: element 2
2)


element 1 0(1) CD G) 0(2)
3
q(2)
5
4

(Do::----

'0-_ _"'0(3)
5

Figure 4.11 Components of external nodal forces

external force RI applied at the node. Similarly, for the other nodes we get
Q~I) + Q~2) = R3}
node 2
Q4 + Q4 - R4
(I) (2) _

Q~2) + Q<{) = R5}


(4.71)
node 3
Q6 + Q6 = R6
(2) (3)

Substituting for the Q-components from (4.69) into (4.71), we get the assembly
stiffness matrix, [KJa, as relating between {W}a and {R}a, in agreement with (4.66).
To this end, setting for convenience that EA/h = 1 for all bars and turning to
symbolic computations, formulate the element stiffness matrices [K];, i = 1,2,3,
defined earlier in (4.42), (4.58), and (dl1), Section 4.5. These matrices are denoted

-
below as Ki, i = 1,2,3
(c2) K1:matrix([O,O,O,OJ, [0,1,0, -lJ, [0, 0, 0, OJ, [0, -1,0, 1J);

(d2)
l °°~ ~ °°~ ~J°
-1
0
1
(c3) K2:matrix([1,0, -l,OJ, [0, 0, 0, OJ, [-1,0, 1, OJ, [O,O,O,OJ);

(d3) ~ -~ ~J
° 1 °
° °°
178 IV. Finite Elements Method

(c4) matrix([I, -1, -1,1], [ -1,1,1, -1], [ -1,1,1, -1], [1, -1, -1,1]);

l-: -:]
-1 -1
1
(d4)
-1 1 -1
1 -1 -1 1
(c5) K3:%/(2*sqrt(2»;
1 1
2 sqrt (2) 2 sqrt (2) 2 sqrt (2) 2 sqrt (2)
1
2sqrt(2) 2sqrt(2) 2 sqrt (2) 2 sqrt (2)
(d5)
1 1
2sqrt(2) 2 sqrt (2) 2sqrt(2) 2 sqrt(2)
1 1 1 1
2sqrt(2) 2sqrt(2) 2 sqrt (2) 2 sqrt (2)
Next, state the element nodal displacement vectors, {W} i' i = 1,2,3 in the global
coordinates. These matrices are denoted below as Wi, i = 1,2,3
(c6) WI :matrix([Wl], [W2], [W3], [W4]);

(d~ l~~]
(c7). W2:matrix([W3], [W4], [W5], [W6]);

(dn l~~]
(c8) W3:matrix([W5], [W6], [WI], [W2]);

(d8) l~!]
This allows to formulate the elemental equilibrium equations (4.69) as follows:
(c9) Ql :Kl.Wl;

(d9) l::;::J
4.7. Assembling 179

(elO) Q2:K2.W2;

(d9)
[W3~Wl
w5-w3
0

(ell) Q3:K3.W3;
w6 w5 w2 wI
2 sqrt(2)
+ 2 sqrt (2) + 2 sqrt(2) 2 sqrt (2)
w6 w5 w2 wI
2 sqrt (2) 2 sqrt (2) 2 sqrt (2)
+ 2 sqrt (2)
(dll)
w6 w5 w2 wI
2 sqrt (2) 2 sqrt (2) 2 sqrt (2)
+ 2 sqrt (2)
w6 w5 w2 wI
2 sqrt (2)
+ 2 sqrt (2) + 2 sqrt (2) 2 sqrt (2)

The equilibrium equations of the nodes are given by (4.70) and (4.71) and may
now be restated in the language of the code. Fig. 4.12 yields the transformation of
the physical components of the nodal forces Q)i), i = 1,2,3, j = 1,2, ... 6, shown in
Fig. 4.11, to the code language. Referring to Fig. 4.12, we define the six equations

01 [2,1]

02 [2,1] 02 [4, IJ
01 [1, IJ
node 1 0 - - - - -
element 2
element 1 01[4,1] node 2 02 [1,1] node 3 02 [3,1]

node 2 0 - - - - - 03 [4, IJ
01[3,1]

node 1 0 - - - .

03 [2, IJ

node 3 03 [1,1]
Figure 4.12 Components of external nodal forces in the notations of the code
180 IV. Finite Elements Method

of the equilibrium of the nodes

(cI2) QI[I, I]+Q3[3, 1] = RI;


w6 w5 w2 wI
(dI2) - - + =r1
2 sqrt (2) 2 sqrt (2) 2 sqrt (2) 2 sqrt (2)
(c13) QI[2, 1] + Q3[4, 1] = R2;
w6 w5 w2 wI
(dI3) - + -w4+ +w2- =r2
2 sqrt (2) 2 sqrt (2) 2 sqrt (2) 2 sqrt (2)
(el4) QI[3, 1] + Q2[I, 1] = R3;
(dI4) w3 - w5 = r3
(el5) Ql[4, 1] + Q2[2, 1] = R4;
(dI5) w4 - w2 = r4
(el6) Q2[3, 1] + Q3[I, 1] = R5;
w6 w5 w2 wI
(dI6) - + +w5-w3+ - r5
2 sqrt (2) 2 sqrt (2) 2 sqrt (2) 2 sqrt (2)
(cI7) Q2[4, 1] + Q3[2, 1] = R6;

(dI7) w6 _ w5 w2 wI
---+ =r6
2 sqrt (2) 2 sqrt (2) 2 sqrt (2) 2 sqrt (2)

It is seen that (dI2)-(dI7) interrelate between {R} a and {W} a' In agreement with
(4.66) the assembly stiffness matrix [K]a = Ka is given by

(cI8) Ka:coefmatrix([d12,d13,d14,dI5,dI6,dI7], [WI, W2, W3, W4, W5, W6]);

0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 2sqrt(2) + 1 1
2sqrt(2)
o -1
2sqrt(2) 2sqrt(2) 2sqrt(2)
0 0 0 -1 0
(d 18) 0 -1 0 0 0
2sqrt(2)+ 1
-1 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)

Accordingly, for the truss at hand, (4.66) becomes

{R}a = (dI8){ W}a (4.72)


4.8. Formalization of Assembling 181

4.8 Formalization of Assembling


In the previous section, the assembly stiffness matrix, [KJa, has been derived from
the equilibrium equations of the nodes. This helps to clarify the underlying physical
principle. A formalized procedure may also be developed, which yields [KJa without
any explicit formulation of the equilibrium equations. It consists of the following
steps: i). find the elemental stiffness matrices, [KJi, i= 1,2, ... Z, for all elements,
ii). if N is the number of degrees freedom of the assembly, set Z null matrices of the
order N x N, iii). insert the elements of [KJi into the null matrices, while referring
properly to the degrees of freedom of the assembly, iv). sum up the just obtained
matrices to get [KJa'
To illustrate this technique on the example of the above truss, again set that
(EAjh)i = 1, i = 1,2,3. According to (d2), (d3), and (d5), Section 4.7, [KJi are

. -ni
1 2 3 4

[K]. ~ l~ ~ ~

U ~l
3 4 5 6
0 -1 3
[KJz = 0 0 4 (4.73)
0 1 5

II
0 0 6
5 6 2
-1 -1 5
j2
-:l
[KJ3 = 1 -1 6
2 2 _ 1 -1 1
1 -1 -1 1 2
Note the global degrees of freedom which are associated with each row and column
of the matrices and which are indicated in the above equations. Fig. 4.10 is helpful
in defining these degrees of freedom.
Next, since the truss has six degrees of freedom, set three 6 x 6 null matrices
and then insert the entries from (4.73) referring to the degrees of freedom indicated
in (4.73). We obtain the so-called expanded element matrices,
1 2 3 4 5 6
0 0 0 0 0 0
0 0 -1 0 0 2
[KJ~xp = 0 0 0 0 0 0 3 a)
0 -1 0 0 0 4
0 0 0 0 0 0 5
0 0 0 0 0 0 6
182 IV. Finite Elements Method

1 2 3 4 5 6
0 0 0 0 0 0 1
0 0 0 0 0 0 2
[KJ~xp= 0 0 1 0 -1 0 3 b) (4.74)
0 0 0 0 0 0 4
0 0 -1 0 1 0 5
0 0 0 0 0 0 6
2 3 4 5 6
-1 0 0 -1 1 1
-1 1 0 0 1 2
1
[KJ3xP = 2J2 0 0 0 0 0 0 3 c)
0 0 0 0 0 0 4
-1 1 0 0 -1 5
1 -1 0 0 -1 6

Summing up the expanded element matrices, [KJixp, i = 1,2,3, we get the


assembly stiffness matrix, [KJa,
3
[KJa = L [KJixP
i= 1

2 3 4 5 6
1 1 1 1
2J2 -2J2 0 0
2J2 2J2
1 1 1 1
1+-- 0 -1 2
2}2 2}2 2}2 -2}2
0 0 1 0 -1 0 3 (4.75)
0 -1 0 0 0 4
1 1 1 1
-1 0 1+-- 5
-2}2 2}2 2}2 -2}2
1 1 1 1
0 0 6
2}2 2}2 -2}2 2}2
Note that [KJa just specified coincides with the result obtained for the truss in
Section 4.7 and given by (dI8). In the next section, we deal with the programming
of this procedure.

4.9 Truss
Turning to symbolic computations, as a sequel to the program of Section 4.7, define
three 6 x 6 zero matrices in the form of a compound statement
4.9. Truss 183

(c 19) (Kex 1:zeromatrix( 6, 6), Kex2: zeromatrix (6, 6), Kex3: zeromatrix( 6,6)) $
The expanded elemental stiffness matrices [KJ~xp, i = 1,2,3 follow from the above
zero matrices upon a proper substitution for the entries from (4.73). To this end,
denote the rows and columns, of [KJ~xp by I and J, respectively, and the rows and
columns of [KJ; by i and j, respectively. Then the degrees of freedom indicated in
(4.73) and (4.74) show the following correspondence
i. =_ I i. =_ 1,2,3,4
element 1 {
}- J } - 1,2,3,4

f+2=I i=1,2,3,4
element 2 (4.76)
j+2=J j=I,2,3,4

f+4=I i = 1,2
element 3
j+4=J j = 1,2

f - 2 =I i= 3,4
j-2=J j= 3,4
The do-statement allows for a convenient substitution of the elements of [KJ;,
i = 1,2,3 into the above zero matrices, according to the scheme described by (4.76).
In the code given below Kexi denotes [KJ~x
(c20) (for i:1 thru 4 do for j:1 thru 4 for do Kex1 [i,j]:K1[i,j], Kex1);

0 0 0 0 0 0
0 0 -1 0 0
0 0 0 0 0 0
(d20)
0 -1 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0

(c21) (for i:1 thru 4 do for j:1 thru 4 for do Kex2[i+2,j+2]:K2[i,j],Kex2);


0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 -1 0
(d2l)
0 0 0 0 0 0
0 0 -1 0 0
0 0 0 0 0 0

In order to compute Kex3 = [KJ~x we apply a somewhat lengthy but explicit


statement which resorts to conditionals
(c22) (for i: 1 thru 2 do
(for j: 1 thru 4 do
184 IV. Finite Elements Method

IF j < = 2 THEN Kex3 [i + 4,j + 4]: K3 [i,j] ELSE Kex3 [i + 4,j - 2]:
K3[i,j]),
(for i:3 thru 4 do
(for j: 1 thru 4 do
IF j < = 2 THEN Kex3 [i - 2,j + 4J: K3 [i,j] ELSE Kex3 [i - 2,j - 2]:
K3 [i,j]), Kex3);

0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
0 0 0 0 0 0
(d22)
0 0 0 0 0 0

0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)

Note that (d20), (d21), and (d22) coincide with (4.74a), (4.74b), and (4.74c), respectively.
Summing these matrices yields the assembly stiffness matrix, [KJa
(c23) Ka:Kexl + Kex2 + Kex3;

0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1
+1 0 -1
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
0 0 1 0 -1 0
(d23) 0 -1 0 0 0
1
-1 0 +1
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)

which coincides with (4.75).


The static equation for a truss consisting of three elements and subjected to the
concentrated forces {R}. at its nodes is
(4.77)
which is formulated via the code as follows:
(c24) Wa:matrix([WIJ, [W2J, [W3J, [W4J, [W5J, [W6J);
4.9. Truss 185

wI
w2
w3
(d24)
w4
w5
w6
(c25) Ra:matrix([RIJ, [R2J, [R3J, [R4J, [R5J, [R6J);
r1
r2
r3
(d25)
r4
r5
r6
(c26) B:Ka.Wa-Ra;

(d26) . ([
matrIX w6 w5 w2 + wI r1 J ,
2 sqrt(2) 2 sqrt(2) 2 sqrt(2) 2 sqrt(2)

[_ w6 + w5 -W4+( 1 + I)W2- wI r2J,


2 sqrt(2) 2 sqrt(2) 2 sqrt(2) 2 sqrt(2)
[ - w5 + w3 - r3J, [w4 - w2 - r4J,

[_ w6 +( I +1)W5-W3+ w2 __w_l_
2 sqrt(2) 2 sqrt(2) 2 sqrt(2) 2 sqrt(2)
w6 w5 w2 wi
[
2 sqrt(2) - 2 sqrt(2) - 2 sqrt(2) + 2 sqrt(2)

where in (d26) we obtain the left-hand side of the equation (4.77) in the form of the
6 x 1 B-matrix. It is convenient to introduce a one-dimensional array, say, s[iJ,
i = 1,2,3,4,5,6 instead of the rows of the B-matrix
(c27) for i:l thru 6 do s[i]:B[i, IJ$
Note that (4.77) and, consequently, (d26) describe, in general, a "floating" truss
with [KJ. being a singular matrix. A similar feature has been earlier shown to
characterize the element stiffness matrix. The solution to (4.77) (or (d26)) may be
obtained, provided the boundary conditions are properly specified.
To this end, consider the truss shown in Fig. 4.l3a. It is seen that
WI = W 2 = W3 = W4 = ° (4.78)
Rs =0, R 6 =-P
Introducing this into (d27) and then solving for the unknown quantities, we get
(c28) subst([Wl = 0, W2 = 0, W3 = 0, W4 = 0, R5 = 0, R6 = - PJ,
[s[lJ, s[2J, s[3J, s[4J, s[5J, s[6JJ);
186 IV. Finite Elements Method

a) b)

5 5

Figure 4.13 Examples of a truss

w6 w5 w6 w5
(d28) [ - - rl - + - r2 - w5 - r3 - r4
2 sqrt(2) 2 sqrt(2) , 2 sqrt(2) 2 sqrt(2)' "

( 1 + I )W5 _ w6 , w6 w5 + p ]
2 sqrt(2) 2 sqrt(2) 2 sqrt(2) 2 sqrt(2)
(c29) linsolve(%, [R1, R2, R3, R4, W5, W6J);
(d29) [rl = - p, r2 = p, r3 = p, r4 = 0, w5 = - p, w6 = - 2 sqrt(2)p - pJ
Note that the results for {W}a obtained above should be multiplied by h/EA, which
has been omitted earlier.
Another example is shown in Fig. 4.13b, for which
R 1 =-Pcosrx, R 2 =-Psinrx, R3=0, W4 =WS =W6 =0
We get
(c30) subst([Rl = - P*cos(alpha), R2 = - P*sin(alpha), R3 = 0, W4 = 0,
W5 = 0, W6 = OJ, [s[lJ, s[2J, s[3J, s[4J, s[5J, s[6JJ);
w2 wI
(d30) [- + + cos(alpha)p,
2 sqrt(2) 2 sqrt(2)

( 1 + 1)W2 _ wI + sin(alpha)p, w3, - w2 - r4,


2 sqrt(2) 2 sqrt(2)
w2 wI w2
- w3 + - r5 - + wI - r6
]
2 sqrt(2) 2 sqrt(2) , 2 sqrt(2) 2 sqrt(2)
(c3I) linsolve(%, [WI, W2, W3, R4, R5, R6J);
(d31) [wi =((-2sqrt(2)-1)cos(alpha)-sin(alpha))p,
w2 = (- sin (alpha) - cos(alphs))p, w3 = 0,
r4 = (sin (alpha) + cos (alpha))p, r5 = cos(alpha)p,
r6 = - cos(alpha)pJ
4.10. Further Analysis of a Truss 187

4.10 Further Analysis of a Truss


As noted earlier the assembly stiffness matrix [KJa may, in tum, also be thought of
as the element stiffness matrix [kJe to be used in analysis of more complicated
structures. For example, considering the truss shown in Fig. 4.10 as a finite element,
we may then analyze the structures shown in Fig. 4.14 or more complicated
ones.
Consider the analysis of the truss shown in Fig. 4.14a, while using that shown
in Fig. 4.10 as a finite element. The program given below is a sequel to that of
Section 4.9. The structure at hand has 4 nodes and 8 degrees of freedom shown by
arrows in Fig. 4.14a and consists of two elements shown in Fig. 4.15.
The first thing to realize is that [KJa given by (d23) Section 4.9, is now the
element stiffness matrix of the element 1 and that of the element 2 in their local
coordinates (see Fig. 4.15) [kJl and [kJ2' respectively. For the element 1 it is also
the stiffness matrix in the global coordinates shown in Fig. 4.14a. We therefore need
to find this matrix for the element 2 only.
The rotation-of-axes transformation, [nJ2' given by (4.54) is
-1
[nJ2 = [ 0 (4.79)

r 2

a)

• X

Figure 4.14 Examples

node 3
node 1
x

element 1

node 2 node 3
•x y l
node 1
Elements in local coordinates
Figure 4.15 Two elements representing the truss shown in Fig.4.14a
188 IV. Finite Elements Method

since IX = 1t. The element has 6 degrees of freedom and the expanded matrix, [NJ, is

[NJ2 =
[n J 0
[ 0 0
0
[nJ
0
0
OJ
0 (4.80)
o 0 0 0 [nJ
Continuing the program of Section 4.9, we issue
(c32) (N2:zeromatrix(6,6),
for i: 1 thru 6 do for j: 1 thru 6 do (IF i = j THEN N2[i, j]:
- 1 ELSE N2[i,jJ:0), N2);

-1 0 0 0 0 0
0 -1 0 0 0 0
0 0 -1 0 0 0
(d32)
0 0 0 -1 0 0
0 0 0 0 -1 0
0 0 0 0 0 -1

thereby generating [NJ2' Next, redefine [KJa given by (d23), Section 4.9, as [kJ2
and then find its form in the global coordinates in agreement with (4.52)
(c33) k2:Ka$
(c34) K2:transpose (N2).k2.N2;

0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1 1
+1 0 -1
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
0 0 1 0 -1 0
(d34) 0 -1 0 0 0

-1 0 +1
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1 1
0 0
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)

Now we construct two 8 x 8 expanded matrices [KJ'lx and [KJ~x. For


[KJ'lx there is no need in renumbering the entries, since the local and global reference
frames coincide. For [KJ~x the renumbering of the entries is as follows:
I=i+4, J=j+4, i,j= 1,2,3,4
(4.81 )
I = i - 4, J = j - 4, i,j = 5,6
where i,j are the indicies of [KJ2 and I, J are those of [KJ'2x.
(c35) (Kex1 :zeromatrix(8, 8), Kex2: zeromatrix (8, 8))$
4.10. Further Analysis of a Truss 189

(c36) (for 1:1 thru 6 do (for j:1 thru 6 do Kex1[i,j]:Ka[i,j]),Kex1);


1 1 1 1
-- 0 0 00
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1
1 +1 o -1 ---00
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
0 0 1 0 -1 0 o0
0 -1 0 0 0 00
(d36)
1 1
--- -1 0 +1 - 00
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
1 1 1 1
0 0 --00
2sqrt(2) 2sqrt(2) 2sqrt(2) 2sqrt(2)
0 0 0 0 0 0 o0
0 0 0 0 0 0 00

(c37) (for i thru 6 do


(for j thru 6 do
(IF j < 5 AND i < 5 THEN Kex2 [i + 4,j + 4]: K2[i,j],
(IF j < 5 AND i > 4 THEN Kex2[i - 4,j + 4]: K2[i,j],
(IF j > 4 AND i < 5 THEN Kex2[i + 4, j - 4]: K2[i, j],
(IF j > 4 AND i > 4 THEN Kex2[i - 4,j - 4]: K2[i,j]», Kex2);

1
2sqrt(2)
+1
2sqrt(2)
o0 ---
2sqrt(2)
--
2sqrt(2)
-1 0

1 1 1 1
2sqrt(2) 2sqrt(2)
o0 --
2sqrt(2) 2sqrt(2)
0 0

0 0 o0 0 0 0 0
0 0 00 0 0 0 0
(d37)

2sqrt(2) 2sqrt(2)
o0 - -
2sqrt(2)
---
2sqrt(2)
0 0

1 1 1
2sqrt(2)
00
2sqrt(2) 2sqrt(2)
+1 o -1
2sqrt(2)
-1 0 00 0 0 0
0 0 00 0 -1 0

The sum of [K]~XP and [K]zXP yields the assembly stiffness matrix [K]a
(c38) Ka:Kex1 + Kex2;
190 IV. Finite Elements Method

1
--+1 --- 0 0 --- --- -I 0
sqrt(2) sqrt(2) sqrt(2) sqrt(2)
1 1 1
--- --+1 0 -1 --- 0 0
sqrt(2) sqrt(2) sqrt(2) sqrt(2)
0 0 0 -1 0 0 0
0 -1 0 0 0 0 0
(d38)
1
--- -I 0 --+1 - - - 0 0
sqrt(2) sqrt(2) sqrt(2) sqrt(2)
1 1 1 1
--- 0 0 --- ---+1 0 -1
sqrt(2) sqrt(2) sqrt(2) sqrt(2)
-1 0 0 0 0 0 0
0 0 0 0 0 -1 0
State the assembly displacement vector {W} a' the external nodal force vector {RL
and the equations of equilibrium (4.66) as follows:
(c39) (Wa:zeromatrix(8, 1), Ra:zeromatrix(8, 1),
for i:l thru 8 do Wa[i, I]:W[i], for i:l thru 8 do Ra[i, I]:R[i])$
which define
{W}a = [WI··· WsY
(4.82)
{R}a = [RI ... RsY
and

-WS+W3- r3
(d40)
w 4 - r 4 -w 2

w7 +r 7 -WI

w S - r S -w 6
which defines, as earlier, the right-hand sides of the equilibrium equations. These
may again be restated as an array Sj, i = 1,2, ... 8
4.11. Composite Beam 191

Figure 4.16 Examples of a truss

(c4l) for i:thru 8 do s[i]:B[i, 1]$


Consider the truss shown in Fig. 4.16. Introducing the boundary conditions and
solving for the unknown quantities, we get
(c42) subst([W[l] = 0, W[2] = 0, W[3] = 0, W[4] = 0,R[5] = 0, R[6] = 0,
R[7] = PI, R[8] = P2], [s[l], s[2], s[3], s[4], s[5], s[6], s[7], s[8]])
(c43) linsolve(%, [R[l], R[2], R[3], R[4], W[5], W[6], W[7], W[8]]);
(d43) [rl = p2 - pI, r 2 = - p2, r3 = - p2, r 4 = 0, Ws = p2,
W6 = sqrt(2) p2 + p2, w 7 = pI, Ws = sqrt(2) p2 + 2p2]

Note, once again, that the above values of {W}a must be multiplied by the omitted
factor hjEA.

4.11 Composite Beam


Returning to the bending of beams, consider a composite structure shown in Fig. 4.17.
Two parts of this beam may be viewed as finite elements with different stiffnesses,
(E1)1 and (E1)2, and lengths, hi and h 2, respectively. Assume that these parts are
firmly bonded together at the interface.

i----
CD
Ell
2
-
@
El2
6

--~ YL X
hi h2

b)

Figure 4.17 Alternating elements of the composite beam


192 IV. Finite Elements Method

As Fig. 4.17a shows, there are three nodes in the global scheme, each node having
two degrees offreedom. The beam has consequently six degrees of freedom. Introduce
therefore the nodal displacement vector of the assembly
(4.83)
The beam may be subject to external forces and moments applied at the nodes.
We therefore define the nodal force vector of the assembly as
{R}a = [R1R z ·.·R 6 Y (4.84)
The above quantities are related by (4.66)
[ K ]a { W} a - { R } a = 0 (4.85)
6x66xl 6xl

where [K]a is the stiffness matrix of the assembly. To deduce [K]a we need to
formulate the matrices of the elements, [K] \ and [K]z, then their expanded matrices
[K]~XP and [K]~XP, and then sum them up. Note, that since the elements are aligned
along the same axis, no rotation of coordinates is necessary, and the element matricies
deduced in Section 4.2 in the local coordinates hold for the global coordinates
too.
The program given below symbolically computes [K]a. It is written as a sequel
to the program of Section 4.2.
In the first two steps we formulate [K] \ and [K]2 by referring to (d 18), Section 4.2,
which yields the stiffness matrix for a beam with the length h and stiffness EI.
Accordingly, [K] 1 and [K]z follow from proper substitutions for these quantities
in (dI8)
(c19) Kl:subst([h = hl,ei = el],dI8)$
(c20) K2:subst([h = h2,ei = e2],dI8)$
Here, for brevity we denoted (E1}1 by el and (EI}z by e2.
Next, construct two 6 x 6 null matricies, to comply with the six degrees offreedom
of the beam
(c21) Kex I: zeromatrix(6, 6)$
(c22) Kex2: copymatrix(%)$
and then, to obtain the expanded matrices, insert properly the elements of [K]\
and [K]z from (d19) and (d20).
(c23) for i: 1 thru 4 do for j: 1 thru 4 do (Kexl [i,j]:d19[i,j], Kex2[i + 2,j + 2]:
d20[i,j])$
Note the shift of indicies i and j for the element 2, is in agreement with the degrees
of freedom shown in Fig. 4.l7a. It remains to sum the expanded matrices to obtain
[K]a, the stiffness matrix of the assembly,
(c24) Ka:Kexl + Kex2;
4.12. Particular Cases 193

12el 6el 12el 6el


h1 3
6el
h 12
4el
h1 3
6el
h12
2el
° °
h12
12el
hI
6el
h12
12e2 12el 6e2
hI
6el
°
12e2
°
6e2
h1 3 - h12 h2 3 +h1 3 hI 2 -hT2 h2 3 h22
(d24)
6el 2el 6e2 6el 4e2 4el 6e2 2e2
h12 hI h22 h12 hT+hT h22 h2
12e2 6e2 12e2 6e2
° ° h2 3
6e2
h22
2e2
h2 3 h22
6e2 4e2
° ° h22 h2 h22 h2
Next, state (4.83) and (4.84) with the help, say, of entermatrix,
(c25) Wa:entermatrix(6,1)$
(c26) Ra:entermatrix(6,1)$
In responding to (c25) and (c26) the code requests the entries of the matrices, and
we reply as follows: WI, W2, ... W6 for Wa and Rl, R2, ... R6 for Ra. Denoting the
left-hand side of (4.85), as the matrix b we issue
(c27) b:Ka.Wa-Ra$
(c28) for i:l thru do s[i]:b[i, 1]$
Here (d28) has introduced, as in the previous section, the array s[i] instead of the
6 x 1 matrix b[i, 1] in order to simplify further symbolic computations. Hence the
six elements of s[i] represent the left-hand sides of the six equations (4.85) which
may be solved provided the boundary conditions and loadings are given. This is
dealt with in the next section.

4.12 Particular Cases


As noted earlier, the finite element method allows for a convenient account of various
modifications in the boundary conditions and loading. This is further illustrated in
the following considerations.
In the case of a cantiliver subjected to a concentrated force, P, (Fig. 4.l8a),
substitute the proper boundary conditions into the array s[i] and then solve for the
unknown quantities
(c29) subst([WI =0, W2=0, R3=0, R4=0, R5= -P, R6=0], [s[I],s[2],
s[3],s[4],s[5],s[6]])$
(c30) linsolve(%, [Rl, R2, W3, W4, W5, W6]);
3h12h2p + 2h1 3 p
(d30) [ r1=p,r2=h2p+hlp,w3=- ,
6e1
194 IV. Finite Elements Method

t
=-
'1=~---=CD==[""1F-2 -=~®==-}13
a) b)

Figure 4.18 Examples of a composite beam

2hlh2p+h12p
w4= - ,
2el
elh2 3p+3e2hlh2 2p+ 3e2h12h2p+e2h13p
w5=---~~------~------~----~
3ele2
w6= _ elh22p+ 2e2hlh2P +e2h1 2p ]
2ele2
Note that these results reduce to the well-known case of a homogeneous cantiliver
upon substitution for the stitTnesses e 1 = e2 = E1. For example, we get for the
deflection at the end
p 3 2 2 3 pU
Ws = --3 (hi + 3hlh2 + 3hlh2 + hi) = --3- (4.86)
el E1
where L = hi + h2 is the beam length.
The next example is a hinged beam shown in Fig. 4.18b. Once again, substituting
the boundary conditions and external loading into s[i] and solving for the unknown
quantities we get
(c31) subst([WI =O,R2=O, W5=O,R6=O,R3= -P,R4= -M],
[s[l], [s[2], [s[3], [s[4J, [s[5], [s[6]])$
(c32) linsolve(%, [Rl, W2, R5, W6, W3, W4]);
h2p-m
(d32) [ r1 = h2+hl ' w2= -(h12(3e2h22p-3e2h2m) + h13(e2h2p-e2m)

+ 2elhlh2 3p + 2elh2 3m)/(6ele2h2 2 + 12ele2hlh2 + 6ele2h12),


hlp+m
r5 = h2 + hI ' w6 = (elhl (h23p + 3h2 2m) + hI 3(2e2h2p - 2e2m)
+ 3elhI2h22p+elh23m)/(6ele2h22 + 12ele2hlh2+6ele2h12),
w3 = _ h13(e2h22p-e2h2m)+elhI2h23p+elhlh23m
3ele2h2 2 + 6ele2hlh2+ 3ele2h1 2 '
w4 = hI3(e2h2P-e2m)-elhlh23p-elh23m]
3ele2h2 2 +6ele2hlh2+3ele2hI 2
where m denotes the external moment, M.
4.13. Automatic Generation of the Assembly Stiffness Matrix 195

4.13 Automatic Generation of the Assembly Stiffness Matrix


A program which would automatically deduce the assembly stiffness matrix for the
bending of a beam should include the following steps:
i) formulation of the polynomial for the deflection, w, first in terms of the
coefficients ai'
3
W = L aixi
i=O
(4.87)

and then in terms of the element nodal displacement vector {w}


{w} = [W1W2W3W4Y (4.88)
ii) formulation of the interpolation functions, {d(x)}, defined by
w(x) = {d(x)V{w} (4.89)
and the elemental stiffness matrix, [k], given by

[k] = J: EI(x){ d,xx(x)}{ d,x)x) f dx (4.90)

iii) formulation of the expanded elemental stiffness matricies and their summa-
tion to obtain the stiffness matrix of the beam, [K]a. shice the elements are
parallel to each other, no rotation-of-axes transform is required.
The program is given below. Here Z is the number of elements and N is the
number of degrees of freedom of the beam.
(el) w:sum(a[i] *XAi, i, 0,3)$
(c2) wx:diff(%, x)$
(c3) linsolve([w[l] = ev(w, x = 0), w[2] = ev(wx, x = 0),
w[3] = ev(w,x = h), w[4] = ev(wx, x = h)], [a[O] , a[l], a[2], a[3]])$
(c4) subst(%, w)$
(c5) for i: 1 thru 4 do d[i] (x):= ratcoef(d4, w[i])$
(c6) for i:l thru 4 do (for j:l thru 4 do k[i,j]:
ei*integrate (diff(d[i] (x), x, 2)*diff(dOJ (x), x, 2), x, 0, h))$
(c7) (kf: zeromatrix (4, 4), for i: 1 thru 4 do
(for j:l thru 4 do kf[i,j]:k[i,j]))$
(c8) Ka(Z,N):= (for q:l thru Z do (subst([ei = e[q],h = h[q],kf),
kff[q] :copymatrix(%%), ke[q] :zeromatrix(N, N), for i: 1 thru 4 do
(for j: 1 thru 4 do ke[q] [i + (q -1)*2,j + (q -1)*2]:kff[q] [i,j])),
sum(ke[q],q,l,Z))$
The commands (el)-(c6) are similar to those of Sections 4.2, namely, in (el) we
stated (4.87), then w,x and then eXpressed the coefficients, ai' in terms of the nodal
displacement vector, {w}, given by (4.88). In (c4) we found w in terms of {w} and
in (c5) the interpolation functions, {d(x)}, in agreement with (4.89). Next, (c6) yields
the element stiffness matrix [k] in the form of array k[i,j] and (c7), formulates [k]
denoted as kf by defining a 4 x 4 null matrix and then inserting properly the entries
196 IV. Finite Elements Method

from the previously defined array k[i,j]. Thus, the computation of [kJ, has been
completed in (c7) and the result has been denoted as /if.
The compound statement in (c8) has introduced the stiffness matrix of the
composite beam, as the function Ka(Z, N) of two arguments. Upon prescribing the
number of elements, Z, and the number of degrees of freedom, N, this statement
yields the desirable quantity, Ka(Z, N). The operations performed by this compound
statement are described below.
Assuming that each of Z elements of the beam may have its own stiffness and
length we first constructed Z elemental stiffness matrices by making substitutions
EI = e[qJ and h = h[qJ, q = 1,2, ... Z into the original elemental stiffness matrix, kJ,
and denoted the result as the array of matrices, kff[q]. The next step is to construct
Z expanded elemental matrices. This is achieved by introducing first the array of
N x N null matrices denoted as ke[qJ and then inserting properly the entries from
liff[q]. Note (see Fig. 4.18) that the transformation from the local i,j-scheme to the
global I, J-scheme obeys the rule
i-d + (q -1)2
q = 1,2, ... Z (4.91)
j -+ J + (q - 1)2'

It remains to sum the expanded matrices, ke[qJ, to obtain [KJa' which is performed
by the last substatement of (c8). For example, if we issue Ka(2,6), then we get [KJa
for the case of two elements investigated earlier.
Note that the program provides an analytical representation of [KJa, which may
then be used for optimization purposes or other needs requiring an analytical
evaluation. The next section illustrates the usefulness of this representation. Now
consider several examples.
A clamped beam shown in Fig. 4.19 suffers the bending under the concentrated
force Po. In agreement with the discussion of Section 4.2, this force should be lumped
at the nodes of element 2, which are 1 and 2 in the local numbering scheme and 2
and 3, in the global numbering scheme, respectively. For the statically equivalent
nodal forces, {p}, we get from (4.24)

{p} = Po f
h2
0 (j(x - e){d(x)} dx (4.92)

in the local coordinates. Here (j(x - e) is the delta-function with e indicating the
point of application, while {d(x)} is the matrix of interpolation functions given by
(d14), Section 4.1. This yields for the element 2
(4.93)

hi e
PC)
YL
~
--CD .@ X

h2

Figure 4.19 Example of the composite beam


4.13. Automatic Generation of the Assembly Stiffness Matrix 197

Pod 1 (~) t rOd3(~)

( i-,--e-le-m-e-nt-2---i, )
Pod2(~) Pod4(~)

Figure 4.20 Nodal loads produced by Po (Fig. 4.19)

The expanded form of this matrix in the global coordinates is


{P}~XP = [00d t (e)d 2 (e)d 3 (e)d 4 (e)Y Po (4.94)
Here use has been made of the procedure described in Section 4.8 for constructing
the expanded stiffness matricies. Fig. 4.20 shows the forces and moments which
follow from (4.89) and (4.94).
We turn to symbolic computations and assume for the sake of certainty that
e = h2/2. The first task is to compute {p} which is carried out in agreement with (4.93)
(c9) (p:zeromatrix(4, l),fori: 1 thru4do p[i, l]:ev(d[i](x),x = h 2 /2)*pO)$
(clO) p;
pO
2
h 2 PO
--
8
(dIO)
pO
2
h 2 PO
8
and then the expanded matrix, {P}~XP = {P}a,
(c11) (Pa:zeromatrix(6, 1), for i: 1 thru 4 do Pa[i + 2, l]:p[i, 1], Pal;
o
0
pO
-
2
hzpO
(dll)
8
pO
2
h 2 PO
8
198 IV. Finite Elements Method

The assembly stiffness matrix [K]a is given by


(c 12) Ka(2,6)$
which yields the result identical to (d24), Section 4.11.
Next, define {W}a and {R}a by

(cl3) (Wa:zeromatrix(6, I), Ra:zeromatrix(6, I),


for i:1 thru 6 do (Wa[i, 1]:W[i],Ra[i, I]:R[i]))$

and (4.67), while omitting the inertia term

(cl4) g:dI2. Wa - Ra - Pa$

Now we substitute the boundary conditions and then solve for the unknown
quantities

(clS) subst([W[I] = 0, W[2] = 0, R[3] = 0, R[4] = 0, W[S] = 0, W[6] = 0], %);

6e t w4 12e t w 3
-------rt
hi hf
2e t w 4 6e t w 3
------r
ht hi 2
pO (6ez 6e t ) (12e 2 12e t )
--2 + -h
2 --h
2 w4 + h"3+h"3 W3
2 t Z I
(dIS)
_ h 2PO + (4e 2 _ 4e t )W4 + (6e22 _ 6ez1 )W3
S hz ht hz hI
pO 6eZw4 12ezw 3
-2-r5-~-~

hzpO 2e 2w4 6e2w3


-S--r6+~+~

(cI6) for i: I thru 6 do s[iJ:%[i, 1]$


(c 17) linsolve( [s[I], s[2], s[3], s[ 4], s[S], s[6]], [R[l], R[2], W[3],
W[4], R[S], R[6]])$
The solutions are too lengthy to be given herein. Nevertheless, a check follows
from the solution for the homogeneous beam, which is obtained by

(cIS) (subst([e[2] = eel], h[2] = h, h[l] = h], dI7), ratsimp(%%));

(dIS) [rl = - S:20 ,rz = - 3~~0'W3= ~:~~ ,w4 = ~:~~,


r = _ 27pO r = 9h PO]
5 32' 6 32
4.14. Optimization 199

4.14 Optimization
Consider the hinged composite beam consisting of the alternating elements with
the same length h and the stiffnesses (EI), and (EI)z, respectively, (Fig. 4.21). The
beam is subject to a force Po applied at the midpoint
L
x = - = 2h, L = 4h (4.95)
2
The overall stiffness of this composite beam, f, is given by
Po
(4.96)
f= w(x=2h)
which is a function of the ratio (El)d(El)2'
f = f(El)d(EI)z) (4.97)
The subject of interest here is that value of this ratio, which would provide the
maximum to f. In the sequel we first solve the problem and then investigate the
extremum of f.
Noting from Fig. 4.21 that the number of elements, Z, and the number of degrees
of freedom, N, are
Z=4, N= 10 (4.98)
respectively, issue, as a sequel to the main routine of the program of the previous
section,
(c9) Ka(4, 10)$
which yields [KJa for the composite beam. Next, formulate the matrices {W}a and
{R}a
(clO) (Wa:zeromatrix(IO, I), Ra:zeromatrix(lO, 1))$
(cll) for i: I thru 10 do (Wa[i, I]:W[iJ, Ra[i, I]:R[iJ)$
and the equilibrium equations
(cI2) b:d9.Wa-Ra$
(c13) for i: I thru 10 do s[i]:b[i, IJ$
Hence, as in the earlier considerations, the array s[iJ, i = 1,2, ... 10 represents the
left-hand sides of the equilibrium equations for the nodes.

degrees
of freedom

® 5,6 @ 7,8

Figure 4.21 To the optimization problem


200 IV. Finite Elements Method

The next commands introduce the boundary conditions in s[i] and solve for the
unknown quantities. While performing the latter step we set the option globalsolve
true in order to get access to the solutions provided earlier by linsolve
(c14) subst([W[I] = 0,R[2] =0, W[9]=0,R[10] =0, R[3] =0, R[4] =0,
R[5] = - P, R[6] =0, R[7] =0, R[S] =0, [s[I], s[2],s[3],s[4], s[5],
s[6],s[7],s[S],s[9],s[10]])$
(c15) (linsolve(%, [R[I], W[2], R[9], W[IO], W[3], W[4], W[5], W[6],
W[7], W[S]]), globalsolve: true)$
At this stage we have at our disposal the analytical representations for the above
previously unknown quantities, which hold for arbitrary parameters of the. four
finite elements, i = 1,2,3,4. The desirable quantity, according to the statement of
the problem is the deflection at the midpoint x = 2h given by w[5]. We therefore
recall w[5] and make the necessary substitutions for the parameters of each of the
elements to take into account the given structure of the composite beam

(c16) W[5]$
(c17) subst([h[l] =h, h[2] =h,h[3] =h,h[4] =h,e[l] =ei,e[3] =ei,
e[2] =a*ei,e[4]=a*ei],dI6)$
where EI denotes the stiffness of the elements 1 and 3 and aEI that of the elements
2 and 4. The length of the elements is set to h. The expression for w[5] may be too
lengthy, so issue ratsimp to obtain a more compact form
(c1S) W[5] :ratsimp(%);
(2a + 2)h 3 p
(dIS)
3aei
where
(EI}z
a=-- (4.99)
(E/)1
Consequently, the function of interest given by (4.96) becomes

P I
f= Iw[5] 3aEI
= 2(a + l)h 3
(4.100)

and we may investigate the limitcases.


If the elements 1 and 3 become rigid, we get
(EI)l = EI --> 00
(EI}z = aEI = const (4.101)
a-->O
and (4.100) yields

f = 1.5 (EI}z (4.102)


h3
4.15. Reduced Stiffness Matrix 201

Conversely, if the elements 2 and 4 become rigid, we get


(EI}z = aEI --+ 00
(E/)I = EI = const (4.103)
a --+ 00

and (4.100) provides a similar relation

f = 1.5 (E/)I (4.104)


h3
Note, that ifthe finite element analysis would have been performed in a numerical,
unsymbolic way, then these investigations of the limitcases would be difficult to
carry through. In a similar way the results apply to investigations of other quantities
of interest, for example, the stresses. Since these are in analytical forms, usual
techniques of optimization hold.

4.15 Reduced Stiffness Matrix


With the increasing number of equations to be solved, the codes may fail to yield
the solution. In general, any reduction in the number of equations would be extremely
useful. One of the methods to achieve this is the elimination of rows and columns
associated with the zero displacement.
Consider for simplicity the case of a 3 x 3 assembly stiffness matrix. Generate
first, [K]a, {W}a and {R}a and then the equilibrium equations
(c2) (Ka:zeromatrix(3,3), Wa:zeromatrix(3, 1), Ra:copymatrix(%%),
for i:l thru 3 do (for j:l thru 3 do Ka[i,j]:k[i,j], Wa[i, 1]:W[i],
Ra[i,I]:R[i]»$
(c3) Ka.Wa = Ra;

(d3) [~:::::: !I~~:: :::~:::J = [::]


w3k 3 •3 + w2 k 3 •2 + w 1 k3.1 r3
Assume that according to the boundary condition W 2 = 0 and substitute this into (d3)
to get
(c4) subst(w[2] = 0, %);

(d4) [~:::::: ::~:::] = [::]


w 3 k 3•3 + w 1k 3 • 1 r3

Note that it is possible to solve the first and third equations in (d4) independently
of the second equation. In other words, one may eliminate the second row and
column in [K]a and the second row in {W}a and {R}a. The obtained entities are
called the reduced ones and denoted as [K]" {W}" and {R}r. The reduced
202 IV. Finite Elements Method

equilibrium equations become


(4.105)
Note that these incorporate the boundary conditions and therefore the determinant
of [KJr may not vanish.
In the case at hand we first construct the reduced quantities with the help of
submatrix
(c5) Kr:submatrix(2, Ka, 2);

(d5)

(c6) Wr:submatrix(2, Wa);

(d6) [::J
(c7) Rr:submatrix(2, Ra);

(d7) G:J
and then the reduced equilibrium equations
(c8) Kr.Wr = Rr;

(d8) [ k l .3 W3 + W1kl,lJ = [rlJ


w 3 k 3 •3 + w 1 k 3 • 1 r3

Note that (d8) coincides with the first and third equations of (d4). On solving (d8),
the second equation of (d4) may be treated independently to obtain r2 •
To illustrate this approach, consider again the problem of Section 4.14 dealing
with the hinged beam made of four alternating elements. The boundary conditions
imply, among others,
(4.106)
Therefore, as a sequel to the main routine of Section 4.13, call for Ka(4, 10) and
then state the reduced quantities
(c9) . Ka(4, 10)$
(elO) Kr:matrix(l, 9, d9, 1,9)$
(ell) Rr:matrix([OJ, [OJ, [OJ, [ - PJ, [OJ, [OJ, [OJ, [OJ)$
(el2) Wr:matrix([W2J, [W3J, [W4J, [W5J, [W6J, [W7J, [W8J, [W10J)$
Next formulate the reduced equilibrium equations which contain only eight
equations compared to ten given in Section 4.14. Solving this system and making
proper substitutions, recover the earlier result as follows:
(el3) (B:Kr.Wr-Rr, for i:1 thru 8 do s[iJ:B[i,IJ)$
(cI4) ev(linsolve([s[l], s[2J, s[3J, 8 [4J, s[5J, s[6J, s[7J, s[8JJ,
[W2, W3, W4, W5, W6, W7, W8, WlOJ), globalsolve:true)$
(cIS) ratsimp(W5);
4.15. Reduced Stiffness Matrix 203

(d16) - «ele2h~ + 2e l h l e2h 2 + elhie2)e3h~ + «3ele2h~ + 6e l h l e2h 2


+ 3e l hie 2)h 3 +(elh~ + 3e l h l hi + 3e 1 hih 2 + hie2)e3)e4h~ •
+ «3ele2h~ + 6e l h l e2h 2 + 3elhie2)h~ + (2elh~ + 6elhlh~
+ 6e l hih 2 + 2hie2)e3h3)e4h4 + «ele2h~ + 2e l h l e2h 2 + elhie2)h~
+ (elh~ + 3elhlh~ + 3e l hih 2 + hie2)e3h~)e4)pj(3ele2e3e4h~
+ (6e l e2e 3h 3) + (6e l e 2h 2 + 6elhle2)e3)e4h4 + (3ele2e3h~ + (6e 1 e2h 2
+ 6elhle2)e3h3 + (3ele2h~ + 6e l h l e 2h 2 + 3e l hie 2)e 3)e 4)
(c17) (subst([e[l] = ei, e[2] = a*ei, e[3] = ei, e[4] = a*ei, h[l] = h,
h[2] = h, h[3] = h, h[4] = h], W5), ratsimp(%%));
(2a + 2)h 3p
(d17)
3aei

which coincides with (dIS) Section 4.14.


The next example is the clamped composite beam under the concentrated force,
Po, shown in Fig. 4.19 and treated at the end of Section 4.13. The beam consists of
two elements, so we call
(cIS) Ka(2,6)$
and then formulate the reduced quantities while taking into account that

l
WI = W2 = Ws = W6 = 0 (4.107)
(cI9) Kr:submatrix(l, 2, 5, 6, dIS, 1,2, 5, 6);

J
12e2 + l2e l 6e 2 - 6e l
(d19) h 32 h3
I
h 3 "h 2
2 I
6e 2 6e l 4e 2 4e l
--- -+-
h~ hi h2 hi
(c20) Wr:matrix([w[3]], [w[4]]);

(d20) [::J
(c2l) Rr:matrix([R[3]], [R[4]]);

(d2l) [::J
(c22) Pr:matrix([pOj2], [h[2]*pOjS]]);

(d22) lh~]
where use has been made of (dll) Section 4.13.
The reduced equilibrium equations and their solutions are
(c23) B:Kr.Wr - Rr - Pr;
204 IV. Finite Elements Method

(c24) (subst([r[3J = 0, r[4J = OJ, %), solve([%%[l, 1J, %%[2, 1JJ,


[w[3J, w[4JJ))$
(c25) ratsimp(%);

((3elhihi - 3hie 2hDh 2


(d25) [ [ w - -:-::-~--:-::-:c=-:=------,.....,;:--=----=:.:.......:=---=------::-
3 - 48eihi + 192e 1h 1e 2 hi + 288elhie2h~ ...
+ 8e 1hfhi + 8hie2h~)pO
+ 192e1hfe2h2 + 48hie~'
((e l hi hi - hie 2h 2)h 2
w = 8eihi + 32elhle2h~ + 48elhie2h~
4

+ 2e 1hihi - 2hie2h~)POJJ
+ 32e 1hfe 2 h 2 + 8hie~
This yields for the homogeneous beam
(c26) (subst([e[2J = e[lJ, h[lJ = h, h[2J = hJ, d25), ratsimp(%%));

h3pO
[[ w3=48e h 2pO]]
(d26) l ' w4 =64e l

which coincides with the earlier result.


The technique of reduced quantities, which is based on incorporation of boundary
conditions, extends to the case when the prescribed displacement is a nonzero
constant. It is particularly convenient for analysis of dynamic problems treated in
the next section.

4.16 Free Vibrations of Beams

The equations of motion are given in (4.67) where [MJa is the assembly mass matrix.
This is constructed from the element mass matricies [mJe in the same way in which
the assembly stiffness matrix [KJa follows from [kJe. Equations (4.67) may be thought
of as describing the motion of a system with N degrees of freedom.
Consider the case of free vibrations for which the assembly nodal displacement
vector, {w}~yn, becomes
(4.108)
with w being the natural frequency of vibrations. Also, the external forces in (4.67)
vanish and, upon substitution of (4.108), we get
[MJaUV(t)}~yn + [KJa{W}~yn = { - w 2 [MJa + [KJ}{ W}a = 0 (4.109)
4.16. Free Vibrations of Beams 405

This equation does not reflect yet the kinematic boundary conditions, which
would uniquely specify a particular problem under consideration. Only upon
incorporation of these conditions, we arrive at the system of equations, which can
be solved. This incorporation may be carried out by the method of reduced matricies
given in the previous section. Consequently, (4.109) becomes
(4.110)
This equation is well-known as a typical "eigenvalue" problem. In general, for
a system with n degrees of freedom, there will be n values for ())2, which are referred
to as the natural frequencies. These values are defined as those for which the
determinant of (4.110) vanishes, thereby ensuring the existence of the solution.
Substituting each of these values back into (4.110) yields a particular mode,
{WL, of vibrations, in other words, the ratio of nodal displacements, not their
magnitudes.
Interested in an automatic generation of [M]a along with that of [KJa, we may
apply similar commands in both of these cases. For example, in the case of the
composite beam we define, as a sequel to the main routine of Section 4.13, the
computation of the element mass matrix and then of the assembly mass matrix
(c9) for i:1 thru 4 do (for j:1 thru 4 do m[i,jJ:
ro * integrate (d [i] (x)*d [j] (x), x, 0, h))$
(elO) (mf:zeromatrix(4,4), for i:1 thru 4 do
(for j:1 thru 4 do mf[i,j]:m[i,j]))$
(ell) Ma(Z,N):=(for q:1 thru Z do
(subst([ro = r[q], h = h[qJ], mf), mff[q]:copymatrix(%%),
me[q] :zeromatrix(N, N),
for i: 1 thru 4 do
(for j: 1 thru 4 do me [q] [i + (q - 1)*2, j + (q - 1)* 2]: mff[q] [i,jJ)),
sum(me[q], q, 1, Z))$
where (4.18) has been used in (c9). Note the similarity between these commands and
(c6)-(c8), Section 4.13.
In case of two elements (Fig. 4.17) the assembly mass matrix is as follows:
(el2) Ma(2,6);

13h,r, llhir,
--
35 210
llhir, hir,
--
210 105
9h,r, 13hir,
(d12) Col1= -- Co12=
70 420
13hir, hir,
---
420 140
0 0
0 0
206 IV. Finite Elements Method

9h l f l 13h l f l
-- ---
70 420
13hif l hif l
--
420 140
13h2f2 13h l rl _ 1h~f2 _ 11hirl
~+~ 210 210
Co13= Co14=
llh~f 2 11hirl h~f2 hif l
-----
210 210
-+--
105 105
9h2f2 13h~f 2
--
70 420
13h~f2 h~f2
---
420 140
0 0
0 0
9h2f2 13h~f 2
-- ----
70 420
13h~f 2 hif 2
Co15= -- Co16=
420 140
13h 2f 2 11 h~f 2
- - ---
35 210
11 h~f 2 h~f2
---
210 105
Here r i and hi afe the mass densities and lengths of the elements. The assembly
stiffness matrix, [KJa, follows, as earlief, from
(c13) Ka(2,6);
12e l 6e l 12e l 6e l
0 0
hi hi hi hi
6e l 4e l 6e l 2e l
- -- - 0 0
hi hi hi hi
12e l 6e l 12e 2 12e l 6e 2 6e l 12e 2 6e 2
---
h 3I h 2I hi + hi h 22 h 2I h~ h~
(d13)
6e l 2e l 6e 2 6e l 4e 2 4e l 6e 2 2e 2
- ---
h 22 hi
-+- h 22
-
hi hi h2 hi h2
12e 2 6e 2 12e 2 6e 2
0 0
h 32 h~ hi h~
6e 2 2e 2 6e 2 4e 2
0 0 .. - -
h~ h2 h 22 h2
4.16. Free Vibrations of Beams 207

which coincides with (d24), Section 4.11.


To investigate the free vibrations of the clamped beam we note that
W I =W2 =WS =W6 =0 (4.111)
and the reduced nodal displacement vector is therefore given by
(4.112)

Therefore, state first the reduced mass and stiffness matricies with the help of
submatrix, formulate {W}, in agreement with (4.112) and then define the equations
of motion given by (4.110)
(c14) Mr:submatrix(l, 2, 5, 6, d12, 1,2,5,6);
13h2r2 13hlrl llh~r2 _ llhtrl]
35 + 35 210 210
[
(d14) 2 2 3 3
llh 2r 2 llhlr l h 2r 2 hlr l
2iO - 2iO 105 + 105
(c15) Kr:submatrix(l, 2, 5,6, d13, 1,2, 5, 6);

(dI5) [1~~2
2
+ 1~~1 ~22 _ ~e21]
6e 2 6e l
I 2 I
4e 2 4e l
---- -+-
h~ hi h2 hI
(cI6) Wr:matrix([W[3]], [W[4]]);

(dI6) [::J
(c17) (-wn2*Mr+Kr).Wr$
where wn2 denotes w 2 •
Note that the system has been reduced to that of two degrees of freedom, as
(d16) shows. Two natural frequencies are therefore anticipated, W~I) and W~2).
For the solution to exist the determinant ofthis homogeneous system of equations
must vanish, which yields the frequency equation,
(c18) coefmatrix([%[I, 1], %[2,1]], [w[3], w[4]]);

(dI8)
208 IV. Finite Elements Method

(c19) (determinant(%), solve(%%, wn2), ratsimp(%%))$


where use has been made of $ to prevent the display of lengthy expressions for the
two roots.
Compact equations follow for the homogeneous beam, upon the substitution
hI = hz = h, (El)I = (EIlz = EI
(4.113)

(c20) (subst([h[l] = h, h[2] = h, E[l] = EI, E[2] = EI, r[l] = rO, r[2] = rO],
d18), determinant(%%), solve(%%), ratsimp(%%));

[ wn2 = -420ei 420eiJ


(d20) -- wn2 = - -
13h 4 ro' h4 ro
which yields the squares of the first two natural frequencies.
The exact solutions are

(4.114)

Thus, the prediction for (J)~2) is very crude. A finer mesh of elements with a greater
number of degrees would provide an improved accuracy (see Problem 4.14).

4.17 Plate Element, Part I

Figure 4.22 shows a rectangular plate element with four nodes. At each node there
are three components of displacement: the deflection, w, the rotation about the
x-axis, ex, and the rotation about the y-axis, ey. These are given by

ex = --
ow e =ow- (4.115)
oy' oxY

with positive directions defined by the right-hand screw law (Fig. 4.22). Hence, at

t7'------x

al al
z w
Figure 4.22 Rectangular plate element
4.17. Plate Element, Part I 209

the i-th node we consider the following degrees of freedom

f ~l. (4.116)
18
{W}j=
y •

This provides twelve degrees offreedom for the entire element, which is characterized
by the nodal displacement vector {w} e
{W}l
{ } = {w}z (4.117)
We {wh
{W}4
Accordingly, at each node there are three "force" factors: the force, qw, and two
couples, qx and qy,

{qL= f!:}
l qy j
(4.118)

This defines the nodal force vector, {q}e as follows:


{q}l
{q}e = {q}z (4.119)
{qh
{q}4
and, in view of (4.117), we may symbolically set up

(4.120)
(12 x 1) (12 x 12)(12 x 1)

with [kJe being the stiffness matrix of the element.


To specify [kJe define the deflection, w, in a way similar to (4.13)
W(x,y) = {d(x,y)V{w}e (4.121)
where d(x, y) are interpolation functions. Assuming that their explicit form is known,
we may derive the expression for the potential strain energy, that, in turn, will lead
to the expression for [kJe.
Indeed, the generalized strains {e} and stresses {O"} are
02W
ox 2
02W
{e} =
- oy2 (4.122)

02W
2--
oxoy
210 IV. Finite Elements Method

and

{a} = (4.123)

These are related by

{a} = [H]{e} (4.124)

[1~
with
Eh 3 v
(4.125)
[HJ = 12(1 - v2 ) 0

Here v is Poisson's ratio and h is the plate thickness.


On substituting (4.121) for W into (4.122) we get the strains as functions of the
nodal displacement vector, {w} e
a2
ax 2
a2
{e} = {d(x,y)r{W}e= [BJ{w}e (4.126)
ay2

2--
a 2

axay
This strain-displacement B-matrix may be thought of as an operator transforming
the nodal displacements into the generalized strains. Upon substitution of (4.126)
into (4.124) we get the stresses too,
{a} = [HJ[BJ{w}e (4.127)
When the nodal displacement vector, {w} e gets a virtual increment, b {w}", the
associated increment in the deflection, w, is
bw = {d(X,y)}T b{w}e (4.128)
as (4.121) shows. The virtual strains b{e} follow from (4.126) as
b{e} = [BJb{w}e (4.129)
and the virtual work done per unit area of the plate is
b{e}T {a} = ([BJ b{w}e)T {a} = b{w};"[BJY{a} (4.130)
Consequently the total virtual work is given by

b{ w}I If [BJT {a} dx dy (4.131)

which should be equal to the external work given by


b{w}I {q}e (4.132)
4.18. Plate Element, Part II 211

From (4.132) and (4.131) we get for the nodal forces

{q}e = If [BY { (J} dx dy (4.133)

which, in view of (4.127), becomes

{q}e = If [BY [ H] [B] dx d y {w} e (4.134)

Comparing this result with (4.120), we get for the element stiffness matrix

[k]e = If [BY[H] [B] dxdy (4.135)

where, as follows from (4.126),


82
8x 2
82
[B] = {d(x,y)r (4.136)
8y2
82
2--
8x8y
and [H] is given by (4.125).
If the element is subjected to a distributed load, six, y), then the work on the
virtual displacement bw is

(4.137)

where use has been made of (4.121) and the column matrix {p} given by

{p}T = If Sd(X,y) {d(X,y)}T dxdy (4.138)

represents the distributed load lumped at the nodes.


It is seen that the development of two-dimensional finite elements is completely
similar to that of the one-dimensional elements considered earlier. This similarity
is a feature of the well-defined and consistent technique. In the next section we
consider the explicit computations of the above element stiffness matrix, [k]., for
the case of a rectangular element.

4.18 Plate Element, Part II


In a spirit of the direct methods, we begin with an explicit expression for the
deflection, w(x, y), valid within the element. Taking into account that the element
212 IV. Finite Elements Method

has twelve degrees of freedom, we set


+ bolx + bo 3y + b04 Xl + bosxy + bo 6 y2 + b0 7 X3 + bosx 2y
w = bO I
+ bo 9 xy2 + bOlOy3 + bO ll X3y + b012xy3 (4.139)
Since no a priori given boundary conditions are involved, we just rewrote in (4.139)
the lowest possible powers of x and y in agreement with the earlier comments. Note,
that (4.139) contains twelve free coefficients, bOi' i = 1,2... 12.
The computations given below do not follow exactly the order of Section 4.17.
This allows for a simple, though somewhat lengthy programming. For this reason it
is also convenient to key in the program in the Editor mode of an operational
system and then run it by using Batch. .
First, formulate w(x, y) with the help of the po and a-matrices given below and
then the relevant derivatives of w(x, y), as follows:
(c3) po:matrix([I, x, y, xA2, x*y, yA2, x A3, x A2*y, x*y A2, y A3, x A3 *y, x*y A3])$
(c4) (a:zeromatrix(12, 1), for i: 1 thru 12 do a[i, 1]:bo[i])$
(c5) w:po.a;
(d5) b012xy 3 + bOlOy 3 + bo 9 xy2 + bo 6 y2 + bo ll x3 y
+ bosx 2y + bosxy + bo 3 y + b0 7 X 3 + b0 4 Xl + bo 2x + bO I
(c6) (wy:diff( -w,y), wx:diff(w,x))$
Denote the coordinates of the nodes as Xi and Yi' the values of w(x,y), Ox, and
Oy at these points as wEi], tetx[i] and tety[i], respectively, and compute these values
(c7) for i: 1 thru 4 do (subst([x = x[i], y = y[i]], w), wEi]:
%%,subst([x= x[i], y=y[i]], wy), tetx[i]:%%,subst([x = x[i],
y=y[i]], wx), tety[i]:%%)$
The linear system of equations may be symbolically written as
(4.140)
where {a} is the matrix of coefficients, bOi' of the deflection function, w(x, y), as given
by (c4). The c-matrix may be found with the help of coefmatrix. We therefore specify
the nodes as (see Fig. 4.22)
Xl = -aI, Yl = -a2
Xl = - aI, Y2 = a2
(4.141)
X3 = aI, Y3 = a2
x 4 = aI, Y4= -a2
and key in
(c8) (c: coefmatrix ([wI], tetx[ 1], tety[ 1], w[2], tetx[2], tety[2], w[3],
tetx[3], tety[3], w[4], tetx[4], tety[4], [bo[I], bo[2], bo[3],
bo[4], bo[5], bo[6], bo[7], bo[8], bo[9], bo[10], bo[II], bo[12]]),
c:subst([x[l] = -aI, y[l] = -a2, x[2] = -aI, y[2] =a2, x[3] =aI,
y[3] =a2,x[4] =al,y[4] = -a2], %%))$
where the c-matrix is computed for the nodes given in (4.141).
At this stage we may find the interpolation functions matrix {d(x, y)}. Indeed,
w(x,y) = {d(x,y)V {w}c = {d(x, y)V [c] {a} (4.142)
4.18. Plate Element, Part II 213

where use has been made of (4.140). On the other hand, it follows from (c5)
that
W(x, y) = [poJ{ a} (4.143)
Equating the last two equations we get
{d(X,y)}T = [poJ [crt (4.144)
The {d(x, y)} T denoted as interpoltr is given below in (d9)
(c9) (invc:c"( -I), interpoltr:po.%%)$
where invc is the inverse of the c-matrix.
Next, state the generalized stresses {e} according to (4.122), and then the s-matrix
which relates between {a} and {e}
{e} = [sJ {a} (4.144)
by the following commands:
(c10) (ex:-diff(w, x, 2), ey:-diff(w, y, 2), exy:2*diff(w, x, I, y, 1))$
(c11) s:coefmatrix( [ex, ey, exy J, [bo[lJ, bo[2J, bo[3J, bo[ 4J, bo[5J,
bo[6J, bo[7J, bo[8J, bo[9J, bo[10J, bo[llJ, bo[12JJ);

0 0 0 -2 0 0 -6x -2y o 0 -6xy


[ o 0 0 0 0 -2 0 0 2x -6y o
o 0 0 0 2 0 0 4x 4y 0 6x 2

It now follows from (4.140) and (4.144) that


{e} = [sJ[cr! {w}e (4.145)
and, consequently, the strain-displacement matrix, [BJ, given by (4.126), is
[BJ = [sJ [cr! (4.146)
We therefore compute (4.146), and state the matrix of the elastic constants, H,
as given by (4.125),
(c12) B:s.invc$
(c13) H:matrix([l, m, OJ, em, I,OJ, [0,0, m1J);

I m
(d13) [ m 1
o 0
where m = v, m! = (I - v)/2 and the common multiplier, D, has been omitted.
Eventually, compute the elements of the stiffness matrix kij in agreement with
(4.135)
(c14) (g:transpose(B).H.B, assume pos:true, intanalysis:false,
for i: 1 thru 12 do for j: 1 thru 12 do (if j > = i then
(k[i,j] :integrate(integrate(g[i,j], x, - aI, a1), y, - a2, a2),
display(k[i,j])) )$
214 IV. Finite Elements Method

For example,
I4aI 2 a2 2 mI +5aI 2 a2 2 m+ IOa2 4 + lOaI 4
k 1 . 1 = -------1O:-a-I-:;c3- a2"'3:;-------

2a2 2 mI + 5a2 2 m + IOaI 2


k = ---------;:----
1.2 2 IOala2
All what is needed for the further computations is the element stiffness matrix,
[k]l denoted as kI, and the interpolation functions matrix, {d(x,y)}, denoted as
interpol (or its transpose, interpoltr). Therefore, put the above array, kji , in a form
of the symmetric matrix by
(cI5) (kl:zeromatrix(I2, 12), for i: I thru 12 do for j: I thru 12 do
if j > = i then ki [i,j]:k[i,j] else ki [i,j]:kO,i])$
and save [k] 1 and interpoltr in the file, say, "plateelemt"
(c16) save("plateelemt", kI, interpoltr)
The next section deals with applications of the "plateelemt" -file to the analysis
of a plate.

4.19 Particular Cases. Batch Mode

Consider a square plate, which occupies the domain -1:::;; x:::;; 1, -I:::;; y:::;; 1,
(Fig. 4.23), and assume that the plate is clamped and subjected to a concentrated
force, P, at the center. .
Representing the plate as an assemblage of four elements, we first construct its
stiffness matrix, [K]a. Because of a considerable number of the steps to program,
it would again be convenient to use a Batch mode, which allows for easy editing.
Further, since the program is quite time consuming to run, this mode has an
additional advantage.
Instead of constructing the asemblage stiffness matrix, [K]a, via expanded
elemental matrices, we use below a more direct way, given in Section 4.7. In other
words, the matrix follows from the equations of equilibrium written for each of the
nodes in the global coordinate system. The orientations oflocal and global reference
frames coincide and [K]I = [k]I'
Name the file, say, as "plateelemtl" and proceed as follows in the Editor mode of
the operational system:
load ("plateelemt")$
to get access to the element stiffness matrix, [k] I, and the transpose of interpolation
functions matrix, interpoltr, computed earlier. Referring to the global degrees of
freedom shown in Fig. 4.23, state then the nodal displacement vector for each of
the four elements
(WI :zeromatrix(I2, I), for i: I thru 6 do Wl[i, I]:W[i],
for i:7 thru 9 do WI[i, 1]:W[i + 18], for i: 10 thru 12 do Wl[i, I]:W[i + 12])$
(W2:zeromatrix(I2, I), for i: 1 thru 9 do W2[i, 1] :W[i + 3],
4.19. Particular Cases. Batch Mode 215

4,5,6 7,8,9 4,5,6 7,8,9

element 2 element 3

<J5.2~.27
y
1,2,3 10,11,12 1,2,3 10,11,12
4,5,6 7,8,9 4,5,6 7,8,9

x
element 1 element 4

1,2,3 10,11,12 1,2,3 10,11,12


/ cg,23,}9 _ _ _ _
local global
number; ng scheme number; ng scheme
Figure 4.23 Four-element mesh

for i:10 thru 12 do W2[i, l]:W[i + 15J)$


(W3:zeromatrix(12, 1), for i: 1 thru 3 do W3[i, l]:W[i + 24J,
for i:4 thru 12 do W3[i, l]:W[i + 6J)$
(W4:zeromatrix(12, 1), for i: 1 thru 6 do W4[i, l]:W[i + 21J,
for i:7 thru 12 do W4[i, l]:W[i + 9J)$
Next, substitute al = a2 = 1/2 and v = 0·3 into [KJ 1 and formulate the equilibrium
equations of the four elements,
(subst([a1 = 1/2, a2 = 1/2, m = 3/10, m1 = 7/20J, Kl), K1 :ratsimp(%%))$
(Q1:K1.W1,sl[i]:= Ql[i, IJ)$
(Q2:K1.W2,s2[i]:= Q2[i, IJ)$
(Q3:K1.W3,s3[i]:= Q3[i, IJ)$
(Q4:K1.W4,s4[i]:= Q4[i, 1J)$
The s-arrays introduced above make the further programming of the equilibrium
equations for the nodes easier. Figure 4.23 is helpful for writing these equations,
which lead to the assembly stiffness matrix as follows:
Ka:coefmatrix([sl [lJ, sl [2J, sl [3J, sl [4J + s2[lJ, sl[5J + s2[2J, sl [6J +
s2[3J, s2[ 4J, s2[5J, s2[6J, s2[7J + s3[ 4J, s2[8J + s3[5J, s2[9J + s3[6J, s3[7J,
216 IV. Finite Elements Method

s3[8J, s3[9J, s3[1 OJ + s4[7J, s3[IIJ + s4[8J, s3[12J + s4[9J, s4[IOJ, s4[IIJ,
s4[ 12J, s I [IOJ + s4[IJ, s I [IIJ + s4[2J, sl [12J + s4[3J, s I [7J + s2[IOJ + s3[IJ
+ s4[4J, sl [8J + s2[IIJ + s3[2J + s4[5J, sl [9J + s2[12J + s3[3J + s4[6J J,
[w[IJ, w[2J, w[3J, w[4J, w[5J, w[6J, w[7J, w[8J, w[9J, w[IOJ, w[IIJ,
w[12J, w[13J, w[14J, w[15J, w[16J, w[17J, w[18J, w[19J, w[20J, w[2IJ,
w[22J, w[23J, w[24J, w[25J, w[26J, w[27JJ)$
Since the plate is clamped, the deflection, w, and its first derivatives vanish at
the boundary. It is therefore convenient to work with the reduced quantities. We
formulate the reduced stiffness matrix, [KJ, by
Kr:submatrix(l, 2, 3,4,5,6,7,8,9,10, II, 12, 13,14, IS, 16, 17, 18, 19,20,
21,22,23,24,Ka, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,
20,21,22,23,24)$
the reduced matrices of the nodal displacement {W}" and external force, {R} r'
respectively, by
Wr:matrix([W[25JJ, [W[26JJ, [W[27JJ$
Rr:matrix([PJ, [OJ, [OJ)$
The assembly equilibrium equations and their solutions are given by
b:Kr.Wr-Rr$
fpprec:6$
linsolve([b[l, IJ, b[2, IJ, b[3, IJJ, [W[25J, W[26J, W[27JJ)$
bfloat(%);
In order to run this program, call the expert system, MACSYMA, and then
key in
(cl) batch("plateelemtl");
This yields
(diS) [W 25 = 2'36743b-2p, W 26 = O'ObO, W 27 = O'ObOJ
Note that these values should be divided by the stiffness coefficient, D, omitted
in the statement of the H-matrix, (d13), Section 4.18. An analytical solution yields
PL2
W25 = 0,0056- (4.147)
D
with L being the plate length. For L= 2 this gives
P
W 25 = 0·0224- (4.148)
D
which is close to the result given in (diS).
The next example deals with a cantiliver plate clamped along the Y-axis
(Fig. 4.23). The plate is subject to a uniform load, 8 0 , This load should be lumped
at the nodes with the help of the vector {PL. To this end, find the elemental vector
{P} 1 with the help of the interpolation functions

{PL = eo II {d(x,y)} dxdy (4.149)

where use has been made of (4.138). In the code language we get, omitting the
4.19. Particular Cases. Batch Mode 217

multiplier eo
(c16) (subst([a1 = 1/2,a2= 1/2J,interpoltr),interpol:
ra tsimp (transpose (% %) ))$
(c17) assume _ pos: true$
(c18) intanalysis: false$
(c19) P1:integrate(integrate(interpol, x, - 1/2, 1/2), y, -1/2,1/2)$
To construct {P}. refer to Fig. 4.23 and sum up the components associated with
the finite elements, which share the same node. To make this procedure more
convenient, introduce the array hi and proceed as follows:
(c20) h[i]:= P1[i, IJ$
(c21) (Pa:zeromatrix(27, 1), for i: 1 thru 3 do Pa[i, l]:h[iJ,
for i:7 thru 9 do Pa[i, IJ :h[i - 3J, for i: 13 thru 15 do
Pa[i, l]:h[i - 6J, for i: 19 thru 21 do Pa[i, l]:h[i - 9J,
for i:4 thru 6 do Pa[i, l]:h[iJ + h[i - 3J, for i: 10 thru 12 do
Pa[i, l]:h[i - 3J + h[i - 6J, for i: 16 thru 18 do
Pa[i, l]:h[i - 6J + h[i - 9J, for i:22 thru 24 do
Pa[i, l]:h[i - 12J + h[i - 21J, for i:25 thru 27 do
Pa[i, l]:h[i - 18J + h[i - 15J + h[i - 24J + h[i - 21J$
Next, state the reduced quantities and the equilibrium equations taking into account
that
Wi=O, i=I,2,3 ... 9 (4.150)
(c22) Kr:submatrix(l, 2, 3, 4, 5, 6, 7, 8, 9, Ka, 1,2,3,4,5,6,7,8,9)$
(c23) Pr:submatrix(l, 2, 3,4,5,6,7,8,9, Pa)$
(c24) (Wa:zeromatrix(27, I), for i: 1 thru 27 do Wa[i, I]:W[iJ,
Wr:submatrix(l, 2, 3,4,5,6,7,8,9, Wa))$
(c25) br:Kr.Wr - Pr$
The solution to (c25) is as follows:
(c26) for i:l thru 18 do s[i]:br[i, IJ$
(c27) linsolve([s[IJ,s[2J,s[3J,s[4J,s[5J,s[6J,s[7J,s[8J,s[9J,
s[10J,s[IIJ,s[12J,s[13J,s[14J,s[15J,s[16J,s[17J,s[18JJ,
[w[lOJ, w[IIJ, w[12J, w[13J, w[14J, w[15J, w[16J, w[17J, w[18J, w[19J,
w[20J, w[21J, w[22J, w[23J, w[24J, w[25J, w[26J, w[27JJ)$
(c28) bfloat(%);
(d28) [w 10 = 6·87805b - 1, w 11 = 1·27822b - 1, w 12 = l-16097bO,
w 13 = 1'9965bO, W 14 = 9·83856b - 2, w 15 = 1'36107bO,
W 16 = 2'05157bO, W 17 = O'ObO, W 18 = 1'3646bO,
W 19 = 1'9965bO, w 20 = - 9·83856b - 2, W 21 = 1'36107bO,
W 22 = 6'87805b -1, W 23 = - 1·27822b -1, W 24 = 1'16097bO,
W 25 = 7-35963b - 1, W 26 = O'ObO, W 27 = 1·19366bOJ

Thus, the maximal deflection for al = a2 = 0·5 is given by

(4.151)

where we recovered the multiplier, eo/D.


218 IV. Finite Elements Method

4.20 Compatibility and Convergence

Compared to the direct methods considered in the previous chapter, the finite
element technique introduces a new dimension, which is the spatial partitioning of
the structure. Consequently, the nature of the obtained solutions should be discussed
from another viewpoint.
The compatibility requirements have been commented on in Section 4.6. Note
that the compatibility is satisfied at the nodes and within the element, provided the
displacement field is continuous. It is not necessarily complied with along the
interelement boundaries. Matching the displacement and its first derivatives does not
ensure the consistent fields for higher derivatives, as indicated in Section 4.6.
Consider, for example, the above rectangular plate element (Fig. 4.22).
Along the line 1-4, we set y = const and get from (4.139)
w = No + NIx + N 2X2 + N 3X3 (4.152)
while along the line 1-2 we set x = const and get
w = Mo + M1y + M2y2 + M 3y 3 (4.153)
Here N i , M i , i= 1,2,3,4 are constant coefficients, depending on {w}. It becomes
clear that the mixed second derivatives at the node 1, w,xP), found from (4.152)
and from (4.153), respectively, are not necessarily the same. This is an obvious
violation of the compatibility condition. Such elements are called non-conforming
or incompatible. Nevertheless, this particular element provides satisfactory results
and incompatibility, in general, should not be considered as a fatal drawback, if the
analysis is confined to the overall response of the structure. Moreover, allowing for
discontinuities or non-uniqueness at the limited number of points or surfaces, can
render the assembly "softer". This, in turn, may reduce the error, since direct methods
tend to overestimate the stiffness. The bounding feature ofthe result is no longer valid.
As far as the equilibrium is concerned, it is fully satisfied at the nodes, but because
of the approximate trial functions may be violated within the elements.
The ways of improving the accuracy are to refine the finite element mesh or/and
to apply a higher order approximation within the element. Depending on the
particular problem, there mayor may not be the convergence to the exact solution.
The so-called convergence requirements include, besides compatibility, the
capability to support a state of a rigid motion with zero strain. Indeed, since the
element may be thought of as traversing the entire structure or solid, it must be
capable of representing the various states possible. Among these, the above states
are most trivial, a realistic model must comply with.
Next, an element should be geometrically (spatially) isotropic in the sense
described immediately below. Assume that the displacement functions along the
axes x and y, U x and uV ' respectively, are prescribed as

Ux = ql+ q2 X + Q3Y + Q4XY


(4.154)
ul' = 91 + 92 X + g2Y + 94y2
Note that interchanging x and Y will change the above functional dependencies,
because of the difference between the last terms. This is therefore a violation of the
spatial isotropy.
4.21. Natural Coordinate Systems 219

These are simple considerations of "quality" of the elements in general terms.


Nevertheless, in special cases, an element may not meet the above requirements,
but still yields sufficiently accurate results.

4.21 Natural Coordinate Systems

The use of specific reference frames, the so-called natural coordinate systems, which
are adjusted to a particular finite element, simplifies the analysis and brings about
more general formulations. In a natural coordinate system any point of the element
is specified by dimensionless numbers whose magnitudes do not exceed unity. These
systems depend on the dimensionality and shape of the element.
A one-dimensional line element is shown in Fig. 4.24. The natural coordinates
(L l , L 2 ) of a point A of the element and its cartesian coordinate, x, are related by

(4.155)

where Xl and X 2 are the cartesian coordinates of the end points.


Key in the matricies involved in (4.155), denoting Xl as xl and X2 as x2,
(c2) cartesian:matrix([I], [x]);

(d2) [Xl]
(c3) natural:matrix([Ll], [Ll]);

(d3) [~~]
(c4) transform:matrix([I, 1], [xl, x2]);

I
(d4) [xlI X 2]

Then (4.155) yields


(c5) cartesian = transform. natural;

a)
e
1
I----::l
'I
0 ro
X=Xl X=X2 x
(1,0) (0,1)

b)
0 I 0
X=Xl X=X3 X=X2
(-1) 0 (1)
Figure 4.24 One-dimensional line elements
220 IV. Finite Elements Method.

(d5) C] = [L2~~: ~~x1]


It is seen that the first equation of (d5) merely states the dependence between Ll
and L2
Ll + L2 = 1 (4.156)
while the second yields the law of transformation
(4.157)
In order to find the inverse relations Ll = Ll(x) and L2 = L 2 (x) we issue
(c7) transform~( -1);

(d7)
X2~X1 X2~X1]
xl 1
l
x2 - xl x2 - xl
(c8) natural=d7.cartesian;

(d8) [ L1]=lX2~X1 X2~X1]


L2 x
-------
-
xl
x2-x1 x2-x1
Hence
(4.158)
with
(4.159)
The end points Xl and X 2 therefore get the coordinates (Ll = 1, L2 = 0) and
(Ll = 0, L2 = 1), respectively.
Instead of using two dependent natural coordinates, Ll and L 2 , one may
introduce the single natural coordinates, L, by
(c9) x = (L - 1)*X1/2 + (L + 1)*x2/2;
(1 + 1)x2 (1 - l)xl
(d9) X= 2 +--=-2-

which provides the following transformation law L = L(x)


(c10) solve(%, L);

(dlO) [L= _ X2+Xl-2X]


x2-xl
The end points, Xl and X 2 , get the natural coordinates L = - 1 and L = 1,
respectively, while the midpoint, X3 = (x I + x 2 )/2 gets the coordinate L = 0 (Fig. 4.24).
4.21. Natural Coordinate Systems 221

3 (0,0,1)

~ _ _ _ _ _~~~(0,1,0)
2
(X2,Y2)
Figure 4.25 Triangular element

For a triangular element shown in Fig. 4.25 natural coordinates are given by
(4.160)
where A is the total area of the element and Ai' i = 1, 2, 3 are the areas of smaller
triangles shown. Obviously, only two of the above coordinates are independent. The
transformation law is given by

1:)=[:1YI :z :3J!~:)
Y Yz Y3 L3
(4.161)

where Xi' Yi' i = 1,2,3 are the coordinates of the nodes.


We key in the matricies involved in (4.161)
(cI4) cartesian :matrix( [IJ, [xJ, [yJ);

(dI4) [;]

[m
(ciS) natural:matrix([LlJ, [UJ, [L3J);

(dI5)

(cl6) transform:matrix([I, 1, IJ, [xl,x2,x3J, [yl,y2,y3J);

l
(dI6) [:1 xl2 X 3J
yl y2 y3
Then (4.161) yields
(c 17) cartesian = transform.natural;

(dI7) IJ [ L3+U+Ll J
[ x = L3x3+Ux2+Llxl
y L3y3 + Uy2 + Llyl
222 IV. Finite Elements Method

The first of these three equations merely states the dependence among the natural
coordinates
1= Lt + L z + L3 (4.162)
while the other two provide the transformation law
x = Ltx t + Lzxz + L3X3
(4.163)
Y = LtYt + LzYz + L 3Y3
The inverse relations Li (x, Y), i = 1,2,3 are given below by (dI9) and follow from
(cI8) transform~( - 1)$
(cI9) (natural = d 18.cartesian, ratsimp(%%));

(x2 - x)y3 + (x - x3)y2 + (x3 - x2)y


(x2-xI)y3+(xl-x3)y2+(x3-x2)yl
(xI-x)y3+(x-x3)yl +(x3-xl)y
(x2-xI)y3 + (xl- x3)y2+(x3 -x2)yI
(xI-x)y2+(x -x2)yl +(x2-xI)y
(x2-xI)y3 +(xI- x3)y2+(x3 -x2)yl

In particular, the natural coordinates of the nodes are

m
(c20) (subst([x = xI,y=yl], %), ratsimp(%%));

(d20) [~~J ~
(c2I) (subst([x = x2, y = y2],dI9], ratsimp(%%));

(d21) [~}m
(c22) (subst([x = x3, y = y3], dI9), ratsimp(%%));

(dn) G~}m
These coordinates are shown in Fig. 4.25.
Generalizing (4.161) to the case of three dimensions yields

{ ~}-r:l :2 :3 :4l{~:}
Y -
Z
Yl
Zl
Y2
Z2
Y3
Z3
Y4
Z4
L3
L4
(4.164)

where L;, i = 1, 2, 3, 4 are the tetrahedral natural coordinates for the tetrahedron
4.21. Natural Coordinate Systems 223

(L 1,L2 ,L3.L.)
A(x,y,z)
~Y
x
3
(0,0,1,0)
(X3 'Y3 ,Z3)

Figure 4.26 Tetrahedron element

element shown in Fig. 4.26. Here Xi' Yi' Zi' i = 1, 2, 3 are the coordinates of the
verticies. The Li are given by
Li= VdV, i= 1,2,3,4 (4.165)
where V is the element volume and Vi the volume of the smaller tetrahedrone.
Formulating the matricies involved in (4.164) as follows:
(c23) cartesian:matrix([1], [x], [y], [z]);

(d23) Ul
(c24) natural:matrix([Ll], [L2], [L3], [L4]);

(d24) [m
(c25) transform:matrix([l, 1, 1, 1], [xl, x2, x3, x4], [y1, y2, y3, y4],
[zl, z2, z3, z4]);

~ \ x~]
1
(d25) x12 x3
y1 y2 y3 y4
zl z2 z3 z4
we find, in agreement with (4.164), the transformation laws X = x(L" L 2 ,L3 ,L4 ),
Y = y(L" L 2 , L 3 , L 4 ), and Z = z(L" L 2 , L 3 , L 4 )
224 IV. Finite Elements Method

(c26) (cartesian = transform. natural, ratsimp(%%));

L
d26 [!J= [L4X4 :
( ) y
~3~~: ~~~ ~lLlXIJ
L4y4 + L3y3 + L2y2 + Llyl
z L4z4 + L3z3 + L2z2 + Llzl
The first of these equations shows that only three of the four natural coordinates
are independent, since
1 = LI + L2 + L3 + L4 (4.166)
The inverse relations stem from
(c27) transform AA
1)$
( -

(c28) (natural = d27.cartesian, ratsimp(%%))$


where, in anticipation oflengthy expressions, we prevented the display of the results.
To find the natural coordinates of the verticies type in
(c29) (subst([x = xl, y = yl, z = zl], d28), ratsimp(%%));

(c30) (subst([x = x2, y = y2, z = z2], d28), ratsimp(%%));

(c31) (subst([x = x3, y = y3, z = z3], d28), ratsimp(%%));

[ttl m
(c32) (subst([x = x4, y = y4, z = z4], d28), ratsimp(%~~));

(d32)

These natural coordinates are shown in Fig. 4.26.


Natural coordinate systems may be similarly constructed for other two- and
three-dimensional coordinates. They facilitate, among others, the specification of
interpolation functions and also the integration over the area (volume) oftheelement.
For example, the integration of a polynomial term in the triangular coordinate
4.22. The Concept of Isoparametric Elements 225

system, L 1 , L z , L3 may be shown to obey the following expression

fA
L)L~L; dA =
(p
p'q'r'
. . .
+ q + r + 2)!
2A (4.167)

where O! = 1.

4.22 The Concept of /soparametric Elements

In the earlier considerations the expression for the field variable, say, the beam
deflection, w, have been first written as a polynomial with the coefficients, ai • Then
by a proper procedure these coefficients have been expressed in terms of the nodal
displacement vector, {w}, and excluded thereby from the further analysis. The use
of natural coordinate systems allows to avoid this step.
Consider a one-dimensional element and define the interpolation functions (in
natural coordinates) as those which take on unity at one nodal point and at the
same time vanish at all other nodal points. If we use only the nodes 1 and 2 with
L = - 1 and L = 1, respectively, then we may define the interpolation functions in
a simple way
l-L I+L
d 1(L)=-2-' d z (L)=-2- (4.168)

Obviously, we get for the nodes


d1(L= -1)= 1, d1(L= 1)=0
(4.169)
dz(L= -1)=0, dz(L= 1)= 1
If the field variable is u and the nodal displacement vector, is {u},

{u} ={::} (4.170)

we set
u = {d(L)}T {u} = -W - L)u 1 + t(1 + L)u 2 (4.171)
where the interpolation functions matrix is

(4.172)

We thus avoided the necessity to go over from the coefficients of a polynomial to


the nodal displacement vector.
Assume that we use three nodes, with L = - 1, L = 1, and L = O. Then the
interpolation functions modify their forms as follows

d 1 (L) = L(L21)' d (L)= L(L+ 1)


z 2'
d (
3 L) = 1 - L
z (4.173)

and the field variable, u, again becomes


U= {d(L)V{u} (4.174)
226 IV. Finite Elements Method

(4,175)

In these simple examples it has been possible to immediately construct the


interpolation functions. In general, these functions follow from standard procedures
of numerical analysis known as the Lagrangian and Hermitian interpolations.
Note that (d9), Section 4.21, which defines the geometry of the element (the
transformation between the natural and cartesian coordinates), may be put in the
form

X= {d(L)V tJ (4.176)

where {d(L)} is given by (4.172) and (4.168). Comparing (4.176) and (4.171), we note
that the geometry of the element and the field variable both are given by the same
transformation. Such an element is referred to as isoparametric.
Nevertheless, the model applied to define the geometry and that applied to define
the field variable should not necessarily be of the same order. For the subparametric
elements the geometry model is of a lower order than the field variable, while for
the superparametric elements the converse is true. For example, defining the
geometry by (4.176), which employs two nodes, and the field variable by (4.174) and
(4.175), which employ three nodes, we get a sub parametric finite element.
Furthermore, a transformation similar to (4.176)

(4.177)

may define curved elements in the cartesian space X, Y, Z. In other words, given
the "parent" element with a simple form in a natural coordinate system, we may
consider various curved elements in the global coordinate system X, Y, Z, which
arise from (4.177). These curved elements may fit better a surface of the solid under
consideration.
As an example, consider the axial load finite element shown in Fig. 4.27. The
natural coordinate, L, is given by (dlO), Section 4.21, which implies that the ends
given by x = Xl and X = X 2 , get the coordinates, L = - 1 and L = 1, respectively.
The cross sectional area, A(L) is a linear function of L and may be put in the form
A={d(L)V{A} (4.178)
where {d} is the matrix of interpolation functions given by
(1 - L)/2}
{d(L)}= { (I+L)/2 (4.179)
4.22. The Concept of Isoparametric Elements 227

node 1 o
"-....1Al
!
Xl
\

I e

node 2
/ Az
Figure 4.27 Axial load element
and {A} is the geometry matrix given by

{A} ={~J (4.l80)

with A 1 and A 2 being the end cross sectional areas. Consequently, (4.178) states the
geometry of the element in terms of the natural coordinate, L, and the matrix {A}.
On neglecting the possibility of buckling, the only field variable is the axial
displacement, u(L), which is put in the form similar to (4.174)
u = {d(L)V{u} (4.181)
where

{u} = tJ (4.l82)

is the nodal displacement vector. The strain now follows from (4.159) and (dIO),
Section 4.21, as

8=-=--=--
du
dx
du dL
dL dx
2 du
edL
(4.183)

which, after incorporating (4.l81), (4.168) and (dl0), Section 4.21 becomes

8=~{ ~r{u} (4.184)

It is convenient to define the matrix, {B}, by

{B} =~{ ~} (4.l85)

and put (4.184) in the form


e={BV{u} (4.l86)

I
The potential energy, U, is

U=-1
X
2
EAe 2 dx (4.l87)
2 XI
228 IV. Finite Elements Method

with
e2 = ee = {uV {B} {BV {u} (4.188)
and
e
dx ="2.dL (4.189)

Hence,
U=1{uV[kJ{u} (4.190)
with
[kJ = [2 {B}EA{BV dx

=~fl A(L){B}{BV dL (4.191)


2 -I

being the elemental stiffness matrix. Because of (4.178) we get

[kJ =~{B}{B}Tfl {d(L)V{A}dL (4.192)


2 -I

which, after substitution from (4.168) and (4.180), finally becomes

[kJ=~
E[ 1
4e - 1

= E(AI +A 2 )[ 1 -Ill (4.193)


2e -1 J

4.23 Some Plane Elements


The elasticity in two dimensions may use the displacement functions u and v along
the axes x and y, respectively. One of the simplest finite elements is a triangle shown
in Fig. 4.28. Each node has two degrees of freedom, so there are six degres of freedom
for the element. While better elements are presently known, it would be instructive
to consider the relevant formulae.
Since there are six degrees of freedom, assume that polynomial representations

Y,V
3

~ degrees
freedom
of
x,u
Figure 4.28 Triangular element
4.23. Some Plane Elements 229

for u and v should contain six free coefficients. The u and v are therefore to be linear
functions of x and y. This, in turn, gives rise to a constant strain within the element,
which is called the constant strain triangle. The representations should be similar
for u and v to ensure their invariance in the sense discussed in Section 4.20.
Below we construct the polynomials for u and v
(c3) Z:matrix([I,x,y]);
(d3) [1 x y]
(c4) Au:matrix([al], [a2], [a3]);

(d4) [~J

[;n
(c5) Av:matrix( [a4], [a5], [a6]);

(d5)

(c6) u:Z.Au;
(d6) a3y + a2x + al
(c7) v:Z.Au;
(d7) a6y + a5x + a4
Thus, (d6) and (d7) state u and vas linear functions of x and y and the coefficients
aj,j= 1,2, ... 6.
The next step is to represent u and v in terms of the nodal displacements, U j and
Vj, i = 1,2,3, respectively, and interpolation functions dj(x,y). To this end, substitute
the nodal coordinates, Xj and Yj, for x and y into U and v to find Uj and Vj as follows:
(c8) for i:l thru 3 do (subst([x= x[i], y=y[i]], u), u[iJ:%%)$
(c9) for i:I thru 3 do (subst([x= x[i], y=y[i]], v), v [iJ:%%)$
The results given by (c8) and (c9) may be put in the form

{::}
3x 1
[cu]
3x3
{::}
(4.194)

3x 1
and

{::}
3x 1
[cv]
3x3
G:} (4.195)
3x1
respectively. To find the cu and cv matrices key in
(etO) (cu:coefmatrix([u[I], u[2], u[3]], [aI, a2, a3]),
kill(u[I], u[2], u[3]), cu);
230 IV. Finite Elements Method\

I XI YI}
(dIO) { I x 2 Y2
I X3 Y3
(cIO) (cv:coefmatrix([v[I], v[2], v[3]], [a4, a5, a6]),
kill (v [I], v[2], v[3]), cv);

I XI YI}
(dIO) { 1 x2 Y2
1 X3 Y3

It is seen that [cu] = [cv], as anticipated.


By inverting, say, the cu-matrix, and using (c6) and (c7), we find the representation
of u and v in terms of nodal displacement vectors U j and Vj
(cI2) invc:cu A
1)$
( -

(c13) s:Z.invc$
(cI4) u:s.matrix([u[I]], [u[2]], [u[3]])$
(cI5) v:s.matrix([v[I]], [v[2]], [v[3]])$
where use has been made of $ to prevent a lengthy display. The interpolation
functions are the same for u and v, like the [cu] and [cv], and follow from the
commands,
(cI6) for i: I thru 3 do (d[i](x,y):= ratcoef(u, u[i]),
display(d [i] (x, y)));

(X3 - x 2)Y + (Y2 - Y3)X + X2Y3 - Y2 X3


d I (x, y) = _"----=--'----'-c::..-....:....::.._--''-'-''----'...::....c=_
(X2 - XI)Y3 + (YI - Y2)X3 + XI Y2 - YI X2

d 2 (X,Y ) -__ (x3- x dY+(YI-Y3)X+X I Y3-Y I X3


(X2 - XI)Y3 + (YI - Y2)X 3 + XIY2 - YI X2
(X2 - xl)y + (y 1 - Y2)X + XIY2 - YIX 2
d 3 (x,y) = -------------
(X2 - XI)Y3 + (y 1 - Y2)X 3 + XI Y2 - YI X2

(dI6) done
It is also possible to obtain these functions in a matrix form by
(cI7) d: ratsimp(Z.invc); .
4.23. Some Plane Elements 231

At this junction the expressions for u and v may be put in the standard form
HI
VI
0 dz 0 d3
~J
Hz
(4.196)
dl 0 dz 0 V2

H3
V3

where d; are the interpolation functions given in (dI6) or (dI7). Consequently, the
element stiffness matrix may be derived in the way indicated earlier. The
strain vector, {s}, follows from (4.196) by applying a differential operator,
which depends on the type of problem under consideration. Say, in case of plain stress,
we get

(4.197)

The stress vector, {O'} is defined by Hooke's law

(4.198)

where

[EJ=--2
E [1v (4.199)
I-v
o
Substituting (4.196) into (4.197) and using (4.198), we get the strain-displacement
relation
{s} = [BJ {w} (4.200)
where the nodal displacement vector {w} is
HI
VI
H2
{w} = (4.201)
V2

H3
V3

and the strain-displacement matrix, [BJ is

ajax 0 ] d
[BJ = [ 0 ajay [ 1 (4.202)
~ja
o y 0~j~
ox 0
232 IV. Finite Elements Method

y,v
V3
b
t4 3
u3
a

x,u

1
-
2

Figure 4.29 Rectangular element

The element stiffness matrix gets the form similar to (4.135)

[k] = fI[BY [E] [B] tdxdy


(4.203)
6x6 6x3 3x3 3x6
s
where t is the thickness. If [E] and t are constant, this reduces to
[k] = [BY[E] [B]tS (4.204)
Otherwise, a numerical integration over the triangular area may be useful.
The rectangular finite element of Fig. 4.29 has eight degrees of freedom. Its
analysis is a slight modification of the earlier case and is given below.
S'tate the u and v functions containing eight free coefficients,
(c3) Z:matrix([I,x,y,X*y]);
(d3) [1 x y xy]
(c4) Au:matrix([al], [a2], [a3], [a4]);

(d4) r~iJ
(c5) Av:matrix([a5], [a6], [a7], [a8]);

(d5) mJ
(c6) u:Z.Au;
(d6) a4xy + a3y + a2x + al
(c7) v:Z.Av;
(d7) a8xy + a7y + a6x + as
4.23. Some Plane Elements 233

It is now possible to formulate the nodal displacement vector consisting of Ui


and Vi' i = 1, 2, 3, 4

(c8) for i:1 thru 4 do (subst([x = x[i], y=y[i]], u), u[iJ:%%)$


(c8) for i:1 thru 4 do (subst([x=x[i], y=y[i]], v), v [iJ:%%)$
We proceed further, as in the previous case, to derive the four interpolation
functions

[:
(elO) (c:coefmatrix([u[l], u[2], u[3], u[4]], [aI, a2, a3, a4]),
kill(u[l], u[2], u[3], u[4], v[l], v [2], v[3], v[4]), c);

(dlO) ;~ ~: ;~~:l
1 X3 Y3 X 3 Y3

1 x4 Y4 X 4 Y4

(cll) invc:c -1)$ AA


(

(el2) s:Z.invc$
(el3) u:s.matrix([u[l]], [u[2]], [u[3]], [u[4]])$
(c14) v:s.matrix([v[l]], [v[2]], [v[3]], [v[4]])$
(el5) (subst([x[l] = - b, y[l] = - a, x[2] = b, y[2] = - a, x[3] = b, y[3] = a,
x [4] = - b, y[4] = a], u), u:ratsimp(%%»$
(el6) for i:1 thru 4 do (d[i](x,y):= ratcoef(u, u[i]), display(d [i](x, y));
(x - b)y - ax + ab
ddx,y)= 4ab

(x + b)y - ax - ab
d 2 (x, y) = - ---4--c ab,---------

(x + b)y + ax + ab
d 3 (x,y)= 4ab

(x - b)y + ax - ab
d 4 (x, y) = - 4ab

(d16) done
The U and V now assume the standard form

Ut

VI
U2
0 d2 0 d3 d4
t}=[~
0
~J
V2
(4.205)
dl 0 d2 0 d3 0 U3

V3
u4
V4

and the strain-displacement B-matrix may now be set up in the way indicated earlier.
234 IV. Finite Elements Method

Y,V

n
1
4 3

E. 2
1 2
u,x
(a) (b)

Figure 4.30 To the concept of distorted elements

The above elements do not take full advantage of the idea underlying the finite
elements method, namely, the idea of partitioning, in the sense that the element
shape has been taken as a trivial one. Also, the elimination of free coefficients in
the polynomial approximations appears tedious and should be avoided. We therefore
adopt the concept of isoparametric plane element and think, say, of the rectangular
element of Fig. 4.29, as a "parent" one, which generates isoparametric elements upon
certain transformations.
First, introduce the local natural coordinates 11 and ¢, thereby normalizing the
element as shown in Fig. 4.30a. The appropriate transformation is

11=-_c
y-y e x-x c (4.206)
- b
'-=~~-

a
where Xc and Yc are global coordinates of the element centroid. The four
interpolation functions, di (¢,I1), in the natural coordinates are
dl = (l - ¢)(l -1])/4 d2 = (I + ¢)(I -11)/4
(4.207)
d3 = (I + ¢)(I + 11)/4 d4 = (I - ¢)(I + 1/)/4
It is seen that, say, d l vanishes at each node, but node 1, where it takes on unity, etc.
Now map the element of Fig. 4.30a into the global XY-space by the trans-
formation

{~}=[d(¢,1])J{ct} (4.208)

where
0 d2 0 d3 0 d4
[d(¢,I1)] = [d0l
dl 0 d2 0 d3 0 ~J (4.209)
{ct} = [Xl Yl X2 Y2 X3 Y3 X4 Y4 Y
Thus, the nodal coordinates, given by {ct}, define the shape of the "distorted" element
4.24. Concluding Remarks 235

in the XY-space (Fig. 4.30b). Next, set for u and v


(4.210)
which is equivalent to (4.205), but the interpolation functions, di , are those given
by (4.207).
Having defined the displacement functions, u and v, by (4.210) and the "geometry"
by (4.208) we may proceed with computations of the stiffness matrix, [k], along the
lines indicated above. The difference is that the interpolation function depends this
time on the natural coordinates ~ and 1]. Accordingly, these computations involve
the Jacobian matrix associated with the transformation (4.208).

4.24 Concluding Remarks


This chapter deals with the core of finite element methodology, putting aside various
generalizations, which make the technique even more versatile. In particular, the
method may also be shown to follow from the weighted residual approach considered
in Chapter 3. It extends to problems involving non-linear effects, initial strain and
stress, as well as nonstructural problems, such as heat transfer and fluid flow.
Besides its physical and methodological aspects, the finite element method has
to cope with data and programming. While this matter may appear as a technical
one, it acquires a major importance in the context of the approach. The commercial
codes available use FORTRAN or other languages, which allow for a great number
of equations to be solved numerically. These codes may treat systems with thousands
of degrees of freedom. The huge amount of data to process makes necessary special
subroutines for a mesh generation, computer graphics, and programs to prepare
data and interpret the results .. Particularly, modern packages include preprocessors
and postprocessors to fulfill the latter tasks. While these routines do not deal directly
with the analysis, they are necessary for efficient implementations of the method
and may occupy a considerable part of the total program.
Appendix

Matrices
A rectangular array of real or complex numbers

... a2n
...
alllJ
(Ai)

amn
is called a matrix, with aij being its elements. A matrix with m rows and n columns
is referred to as (m x n) matrix. In the double-subscript abbreviations for the elements,
the first subscript denotes the row and the second subscript the column, which
contain the above element.
A row matrix (vector) is
[a l a2 ... an] (A2)
while a column matrix (vector) is as follows:

(A3)

If a matrix has the same number of rows and columns, it is called a square matrix.
Two matricies [a] = [a jk ] and [b] = [b jk ] are said to be equal iffor all occurring
j and k
(A4)
If the matrices have the same number of rows and the same number of columns,
their sum is [c] = [a] + [b] with the elements given by
(AS)
The product of an (m x n) matrix, [a ik ], by a scalar s is merely the matrix, [saikl
The transpose, [ay of an (m x n) matrix [a] = [aiJ is the (n x m) matrix, which is
Appendix 237

obtained by interchanging the rows and columns in [a],

[ay = [ak;] = [:;~ :;~ ::: ::~J (A6)

a l " a2" am"


For a symmetric square matrix with real elemel'lts we get
[ay = [a] (A7)
or
(AS)
while for a skew-symmetric matrix with real elements, we get
[a]T =- [a] (A9)
or
(A 10)
A square matrix [a] = [a ik ], whose elements below and above the diagonal are
all zero
(All)
is said to be a diagonal matrix. Further, if the elements of a diagonal matrix are
all 1, it is called a unit matrix, [I],

1 0 0)
[1]= ( 0 1 0 (AI2)
001
We go over to the definition of matrix multiplication. Let [a] = [aJk ] be (m x n)
matrix, and [b] = [b jk ] an (r x p) matrix. Then the product [a][b] = [e] is defined
only when r = n and is the (m x p) matrix, whose elements are given by
" ajibik
ejk = ajl blk + aj2 b2k + ... + aj"b"k = L (A13)
i= 1

In other words, ejk is merely the scalar product of the j-th row vector of [a] and
the k-th column vector of [b].
Note that, in general,
[a][b];e[b][a] (AI4)
and
[a] ([b] [e) = ([a] [b])[e] (AI5)
However,
[a] [I] = [I] [a] = [a] (AI6)
Unlike the scalar case, the relation
[a][b] =0 (AI7)
does not necessarily imply that
[a]=O or [b]=O (AIS)
238 Appendix

The transpose of a product equals the product of transposed factors taken in


reverse order
(A19)
Note that multiplication of a row matrix {a Vby a column matrix {b} yields a scalar

{"l'{b} ~ [a, a, . . a{:}


(A20)
i=l

This may also be written as

n
= L biai =
i=l
{aV{b} (A2l)

which is frequently used in the text.

Problems

Chapter 2

2.1

2.2
1= r
Find the variation of the functional given by

w~xx(x)dx
Find the natural boundary conditions for a beam clamped at its ends and
subjected to a distributed load.
2.3 Find the natural boundary conditions for a beam with simply supported ends.
2.4 Derive the equation governing the motion of an incompressible fluid with the
density p in a uniform u-tube with the cross sectional area A. (Fig. P.l).
2.5 Derive the equation governing the mechanism shown in Fig. P.2 with the help
of the program given in Section 2.13. Verify the result.
2.6 Modify the program of Section 2.13 to include the case of pendulum with the
time variable length, L(t). Obtain the Euler-Lagrange equation.
2.7 Consider the system shown ·in Fig. P.3 which consists of a mass, m, moving
along a rigid beam AB. The moment of inertia of the beam with respect to A
is J, and the spring coefficient is k. Derive the governing equations by means
of the program given in Section 2.14, while neglecting the friction. Assume
that mass moves under the action of the force p(t).
Problems 239

Figure P.I

L- x

mz Figure P ..2

p(t)
A

Figure P.3

2.8 Derive the equations of motion for the governor shown in Fig. P.4 with the
help of the program given in Section 2.14.
2.9 Suggest modifications which would simplify the program of Section 2.14.
2.10 Consider an elastic beam of a variable moment of inertia, which is subjected
to a time- and space-dependent distributed lateral load with the help of the

r(
program given in Section 2.18. The potential energy is given by

U= ~I w~xx - qw ) dx

2.11 Modify the previous equations (Problem 2.10) for the case when the distance
between the ends of the beam is fixed giving rise to the axial force. Consider
the beam as uniform.
240 Appendix

Figure P.4

2.12 For the Timoshenko beam the strain energy is

1
U = 2.
fL [EI(w,xx -
0 !3,J 2 + kT!3 2 ] dx
and the kinetic energy is

T= ~ J: [pAw~ + pI(w,xt - !3YJ dx


where w is the deflection, A the area of the cross section, I the moment of
inertia, p the density per unit length, !3 a "shear" function and kT correction
factor. Generalize the program of Section 2.18 to the case of two equations
and derive these for the Timoshenko beam,
2.13 Investigate the extremum of the functional

J= J:(y'2_ y2)dX, b>O, y(O)=O, y(b)=O

and verify Legendre's condition,


2.14 Investigate the extremum of the functional

J= f XIj1?
r. dx, y(O)=Y(X1)=Yl
o yY
and verify Legendre's condition,
2.15 Find the general solution to (2.233), which governs the constrained minimum
pressure drag, and derive the results for a particular case when the diameter
and surface are prescribed.
Problems 241

Chapter 3

3.1 Analyze a beam with the clamped ends resting on elastic foundation by the
least squares method if EI = a + bx with a, b, constants. Use a program given
in Section 3.4.
3.2 Consider a uniform beam under the load given by (3.14) by the least squares
method making use of trigonometric trial functions. Use a program given in
Section 3.4.
3.3 Write a program which performs calculations given by (3.22), with K = 0, (3.24)
and (3.25) for a beam hinged at the ends.
3.4 Apply the Bubnov-Galerkin method to the problem of bending a cantiliver
by a concentrated force. Compare the result with the exact solution.
3.5 Solve the above problem by the Rayleigh-Ritz method too and compare the
solutions with the exact one.
3.6 Use the program of Section 3.8 to obtain a solution to the uniform cantiliver
under a distributed constant load.
3.7 Use the program of Section 3.8 to obtain a solution to the non-uniform beam
with the clamped ends, q = sx 2 , EI = z + gx.
3.8 Consider a hinged-clamped uniform beam with the help of the program of
Section 3.8.
3.9 Consider a uniform beam clamped at its ends with the help of the ria-function
given in Section 3.10.
3.10 Write a master program based on the least squares method for a beam resting
on elastic foundation.
3.11 Derive a second order approximation for the clamped plate considered in
Section 3.12. Compare the deflection at x = a12, y = al2 of the square plate,
d = a, with that following from the first order approximation.
3.12 Consider the deflection of a plate with three sides hinged and one side free
under the uniform transverse load, q. (Fig. P.5).
3.13 Prove (3.204)
3.14 Prove (3.208)

hinged

~------\o-.........".--x

/
y free

Figure P.S
242 Appendix

3.15 Show that the functions, f, for which

Lf 2dV

does exist, constitute a linear set.


3.16 Replace the boundary conditions (3.207) by
1'(0) + af(O) = 0
1'(1) + bf(l) = 0
where a and b are constants and verify whether the A-operator remains
symmetric.
3.17 Show that the product of symmetric operators is symmetric if the operators
are permutable.
3.18 Verify whether the functions
. mnx . nny
Stn--Stn-
a b
are orthogonal over the domain 0 ~ x ~ a, 0 ~ y ~ b.

Chapter 4

4.1 Derive the stiffness matrix for a truss element directly in global coordinates
X and Y. Use Hooke's law to relate the axial force and elongation (Fig. 4.3).
4.2 Find the values which the interpolation functions given by (dI4), Section 4.1,
take on when x= 0 or x = h. Explain the result in view of (4.13).
4.3 Which of the equations given in the Appendix is used while deriving (4.16)?
4.4 Derive (4.25) from (4.24).
4.5 Find the nodal forces associated with the nodal displacement vector {w} =
[OzOzy, and the stiffness matrix given by (d22), Section 4.4. Explain the results.
4.6 Verify whether the elemental mass matrix for a beam depends on the orientation
angle.
4.7 Derive the elemental stiffness matrix for the bar 1 of the truss shown in
Fig. 4.2 by rotation of that for the bar 2.
4.8 Verify whether the determinant of the stiffness matrix of the truss shown in
Fig. 4.2 vanishes.
4.9 Use the program of Section 4.9 to analyze the truss shown in Fig. P.6.
4.10 Consider a clamped beam using a single finite element. Explain the result.
4.11 Verify the results of Section 4.12 with the help of the program given in
Section 4.13.
4.12 Consider a cantiliver beam by the technique of reduced quantities (use the
program for the composite beam).
4.13 Find the mass and stiffness matricies of the composite beam for the case of
three elements.
4.14 Consider free vibrations of a clamped beam using three finite elements and
the program of Section 4.16. Obtain numerical results for hi = h2 = h3 = hand
El 1= E12 = E13 = r l = r2 = r3 = 1.
Answers 243

P Figure P.6

4.15 Investigate a cantiliver plate USIng two finite elements and modifying the
program of Section 4.19.
4.16 What are the values taken on at the nodes by the interpolation functions
dJx,y) given by (d16), Section 4.23?
4.17 Find the Jacobian matrix associated with (4.210).

Answers

Chapter 2

2.1 i5I = 2 tL w. xxxx bw + 2[ - w. xxx bw + w,xxx bw,xJ~


2.2 None
2.3 w(O) = weLl = 0 are the imposed conditions while w,xAO) = w,xx(L) = 0 the
natural conditions.
2.4 2pAgx + pALX = 0

2.5

d '
2.6 .- (mL2fi)
dt
+ mgL
.
sin (! = 0

2.7 p(t)+ (x8 2 - x)m = 0


(xe + 2xx8)m + fike + Je = 0
2.8 (I + 2mL2 sin 2 I] 2)1, = const
(2mU + 4M L2 sin 2 1]2)ii2 + 4M L2 sin '12 cos '12 '1~
- 2mU sin 1]2 cos 1]21i + 2gL sin 1]2(m + M) = 0
2.9 (d4) and (d5) may be united in an array, while (d6)-(dI2) in a compound statement.
244 Appendix

2.10 POW,tt + Ew,xxI.xx + 2Ew,xxx l ,x + Elw,xxxx = q


2.11 pow. tt + Elw,xxxx - 3AE(w,x)2w.xx/2 = q
The last term on the left-hand side follows from the axial loading with A being
the corss sectional area.
02 0
2.12 OX2 [EI(w,xx - P,x)] - ax [pl(w,ttx - P,tt)] + pAw,1I = 0
a
ax [EI(w.xx - P)] - pl(w,lIx - P.II) + kTP = 0

2.13 The Euler-Lagrange equation is


y"+y=O
which gives
y = C I cos X + C 2 sin x
However, from the boundary conditions C I = C 2 = 0 if b of. kn, k = 1,2,3....
J,y'Y' =2 >0
2.14 In the parametric form we get from the Euler-Lagrange equation
y= CI(I-cost), x = C; (t - sint) + C 2
and
I
J .. =
,Y Y JY(l + y'2)3/2 >0
2.15 From (2.233) we get
dx = [2y/( - D + AI Y + A2y2)] 1/3 dy
which, after incorporating the boundary condition, becomes

X= i y

o
( 2y
-D+A l y+ A2y2
)1/3~

Denote

~ = X/XI' 1'/ = y/y, N = - D/YI' NI = - AI' N2 = - A2YI


Then we get

f q
I'/1/3(N - N 11'/- N 21'/2)-1 /3dl'/

f:
e=~o-----------------­
I'/1/3(N - N 11'/- N 21'/2)-1 /3dl'/

If X I and S are prescribed, then


N 2 = 0, N - NI = 0
Answers 245

and we get

(= 3J3 [--YII(l -11)2 + t Ln (Zh1 + VI -11)


2n

+ ~ tan - 1 _-=J=3=-Y=---II-----=j
J3 2-y1 -11 --YII
Chapter 3
3.1 Call the Li-function of Section 3.4 as
Li((L- xr2*sum(a[jJ *xAj, 2, 3), 3, q, a + b*X)
3.2 Replace the lower limit in the do statement of the Li-function of Section 3.4
from 2 to 1 and call
Li( (sum(a[j] *(1 - cos(2 *j * %pi * x/L) ),j, 1,2),2, s * x A2, ei).
Then solve the equations b[lJ and b[2J for a[lJ and a[2].
3.3 (cl) ei*diff(w,x,2r2/2-q*w$
(c2) sum(a[j]*sin(%pi*j*x/L),j, 1,2)$
(c3) subst(%, w,dl)$
(c4) ev(%, diff)$
(c5) (assume(L > 0), integrate(d4,x,0,L))$
(c6) diff( d5, a[ 1J)$
(c7) diff(d5,a[2J)$
(c8) solve([d6, d7J, [a[lJ, a[2JJ);

(d8) [[ a 1 - -4l4q
- a -0
- %pi 5 ei' 2 -
jj
3.4 and 3.5
(cl) sum(a[jJ*x Aj,j,2,4)$
for the Rayleigh-Ritz method
(c2) diff(%, x, 2)$
(c3) ei/2*integrate(%A2, x, 0, b) - P*ev(d1, x = b)$
(b is the beam length)
(c4) for j:2 thru 4 do s[j]:diff(d3,a[j])$
(c5) solve ([s[2J, s[3J, s[4J J, [a[2J, a[3J, a[ 4J J);
for the Bubnov-Galerkin method (c3) and (c4) take the form
(c3) ei*diff(d1,x,2)-p*(b-x)$
(c4) for j:2 thru 4 do s[jJ:integrate(d3*x Aj,x,O, b)
Both methods provide
bP P
a 2 =2EI' a 3 =-6EI' a4 =0
246 Appendix

The exact solution is obtained via


(el) ei*'diff(w(x), x, 2)- p*(b - x)= 0$
(c2) ode(dl, w(x), x);
3.6 (cll) solve(flO, a[I]);
(dll) [a l = 0]
(el2) subst(%,dl)$
(el3) ri(%, q, ei)$
(el4) for j:2 thm 5 do b[j]:diff(%,a[j])$
(el5) solve([b[2], b[3], b[4], b[5]], [a[2], a[3], a[4], a[5]]);
3.7 (cll) solve([fL, flO, fl L], [a[I], a[2], a[3]])$
(cI2) subst(%, dl)$
(el3) ri(%,s*x A2,z+ g*X)$
(cI4) diff(d13, a[4])$
(el5) diff(dI3,a[5])$
(el6) solve( [dI4, dI5], [a[ 4], a[5]])$
(el7) subst(%,dI2);
3.8 (cll) solve([f20, fL, flL], [a[l], a[2], a[3]])$
(el2) subst(%, dl)$
(el3) ri(%,q,ei)$
(cI4) diff(d13, a[4])$
(el5) diff(dI3, a[5])$
(el6) solve([dI4,dI5], [a[4].a[5]])$
(c17) subst(%, dI2);
3.9 (c7) solve([fL,flO,flL],[a[I],a[2],a[3]])$
(c8) subst(%,dl)$
(c9) ria(%, q, ei)$
(elO) solve([b[4], b[5], b[6]], [a[ 4], a[5], a[6] ])$
(ell) ratsimp(subst(dlO, d8));
3.10 Repeat the program of Section 4.10 replacing the ria-function as follows:
ria( w, q, ei):= (' diff (w, x, 2), ,diff (ei * %%), ev(%%, diff),
(%% + hw - qr2, integrate (%%, x, 0, L), for j:4 thm 6 do b[j]:
diff(%%,a[j]))$
3.11 (c5) f(x,y):=(x*y*(a-x)*(d-y))2$
(c6) w[1] (x, y):= f(x, y)$
(c7) w[2] (x, y):= f(x, y)*(x A2 + yA2)$
(c8) solve( [vI * bel, 1] (0) + v2* bel, 2] (0) = c[l] (q),
vh bel, 2](0) + v2* b[2, 2] (0) = c[2](q)], [vI, v2]);
This yields w(aI2, a12) for the square plate, d = a, as
1·3219841e - 03a 4 q
sd
The first order approximation of Section 3.12 gives
1·3292101e - 03a 4 q
sd
Answers 247

Better results for this problem may be derived by placing the origin at the
centre of the plate and choosing symmetrical coordinate functions, as shown
in the end of Section 3.12.
3.12 The function satisfying the kinematic boundary conditions is
w = Ay sin nx/a
Substitute this into the energy potential and find A. Note that w does not
satisfy the natural boundary condition at the free side.
3.13 Making use of the definition of scalar product, we get

(alu l + azuz,blv i + bzvz) = alb l Iv UIV I dV


+ alb z Iv UIVz dV + azb l Iv UZV I dV + azb z Iv UzV z dV
which is identical to (3.204).
3.14 Consider
(u + yv, U+ yv) ~ 0
where y is any real number. Next,
(u, u) + 2y(u, v) + yZ(v, v) ~ 0
since (u, v) = (v, u). All values in the above expression are non-negative which
implies that its discriminant is less than or equal to zero
(u, v)Z - (u, u)(v, v) ~ 0

3.15 L (aJ) 2 dV=a 2 L·rz dV

t(fl +f2)2dV~2(tftdV+ tf~dV)


since
(fl + fz)Z ~ (fl + f2)Z + (fl - fz)2 = 2(fi + n)
3.16 [f1(1)f~(1) - f2(1)f'I(1)J - [f1(O)f~(O) - fz(O)f'I(O)] = 0
since each of the bracketed terms vanishes.
3.17 If A1 and A2 are symmetric then
(A1Azfl'/Z) = (Azfl' Ad2) = (fl' A2Ad2)
If they are also permutable, then
(fl' A2Ad2) = (fl, A1A2f2)

3.19 f fb sin -
a mnx Lnx nny
- sin - - sin -
kny
sin - dx dy
o 0 a a b b
eq uals zero if m oF Lorn oF k
248 Appendix

Chapter 4

4.1 From Hooke's law


AE
F=-t.h
h
By prescribing a unit displacement at a node while holding the others to be
zero, find the entries of [K]. For example, set a unit displacement at node 1
in the y-direction. Then t.h = 1. sin IX and
AE
Fx = K 12 = h sin IX cos IX

AE
F v = K 22 = - h sin IX sin IX
.

4.2 Only dl(x) and d3 (x) govern the values of w for x = 0 and x = 4.
4.3 (A2l)
4.4 Use the focusing property of a delta-function.
4.S It is not a rigid body motion and the nodal forces do not vanish.
4.6 It does not depend.
4.7 IX = n/2 and the N-matrix is

rr -~ ~
lo
-noj
-
0 1
Use (4.S2) and (4.42) to obtain kl as follows:

l~ o
o
0
-1
~ ~ ~J0
0
0
1
4.8 Use ratsimp(radcan(determinant( ... ))) to obtain zero.
4.9 [rl = - sin (alfa) p, r2 = sin (alfa) p, r3 = (sin (alfa) + cos(alfa)) p,
W 4 = 0, Ws = (-sin(alfa) - cos(alfa)) p,
W6 = ( - sin (alfa) - cos(alfa)) p - sqrt(2) sin (alfa) p, W 7 = 0,
Ws = (-sin(alfa) - cos(alfa)) p - sqrt(2)sin(alfa) p]
4.10 There are no degrees of freedom. One needs two finite elements at least.
4.13 Call Ka(3,8) and M a(3, 8) (Program of Section 4.16).
4.14 As a sequel to the program of Section 4.16, type in
(c2l) kill(d12, d13)$
(c22) Ka(3,8)$
(c23) Ma(3,8)$
(c24) Kr:submatrix(I,2, 7,8,d22, 1,2,7,8)$
(c2S) Mr:submatrix(l, 2, 7,8,d23, 1,2,7,8)$
(c26) Wr:matrix([W[3]], [W[4]], eWeS]], [W[6]])$
Answers 249

(c27) (- wn2 * Mr + Kr). Wr$


(c28) coefmatrix([/~[I, IJ, %[2, IJ, %[3, IJ, %[4, IJJ,
[W[3JJ,[W[4JJ,[W[5JJ,[W[6JJ)$
(c29) (subst( [h[IJ = h, h[2J = h, h[3J = h, E[IJ = I, E[2J = I, E[3J = I,
r[ IJ = I, r[2J = I, r[3J = IJ, %), determinant(%%), ratsimp(%%))$
(c30) fpprec:3$
(c31) (solve(d29, wn2), bfloat(%%));
_ 6·22bO _ 2·64b2 _ 4·89bl _ l'04b31
(d31) [ wn2- h4 ,wn2- h4 ,wn2- h4 ,wn2- h4

(c32) subst(h = Lj3,d31)$


_ 5·03b2 _ 2·14b4 _ 3·96b3 _ 8'46b41
(d31) [ wn2- L4 ,wn2- L4 ,wn2- L4 ,wn2- L4

where L is the beam length.


4.15 Delete from the program of Section 4.19 the quantities associated with the
vanishing nodes
au au ax auay
4.17 -=--+--
a~ ax a~ aya~

cu auiJx iJucy
-=--+--
cry iJxiJry iJyiJry
or in a matrix form

{ u,~} = [JJ {u,x}


U", U,y

with

[JJ = [:'~ y'~l


," Y."
Similarly,
References

Chapter 1
Char, B.W., Geddes, K.O., Gonnet, G.H., Monagan, M.B. and Watt, S.M. (1988) First Leaves: A
Tutorial Introduction to MAPLE, Univ. of Waterloo, Waterloo, Ontario, Canada.
Davenport, J.R., Siert, Y. and Tournier, G. (1988) Computer Algebra, Academic Press.
DERIVFM, A Mathematical Assistant (1988), Softwarehouse, Inc.
MACSYMA Reference Manual (1985) Version 11, Symbolics, Inc.
MACSYMA User's Guide (1987) Symbolics, Inc.
Pavelle, R. and Wang, P.S. (1985), MACSYMA from F to G, J. Symbolic Computation, Vol. 1,
pp. 69-100, Academic Press.
REDUCE User's Manual (1983) Version 3.0, Edited by A.C Hearn, The Rand Corporation.
Thomson. W.T. (1981) Theory of Vibration with Applications, Prentice-Hall.
Winston, P.R. and Horn, B.K.P. (1984) LISP, Addison-Wesley.

Chapter 2

Bedford, A. (1985) Hamilton's Principle in Continuum Mechanics, Pitman.


Goldstein, H. (1980) Classical Mechanics, Addison-Wesley.
Langhaar, M.L. (1962) Energy Methods in Applied Mechanics, J. Wiley.
Miele, A. (editor) (1985) Theory of Optimum Aerodynamic Shapes, Academic Press.
Mikhlin, S.G. (1964) Variational Methods in Mathematical Physics, MacMillan.
Schechter, R.S. (1967) The Variational Method in Engineering, McGraw Hill.

Chapter 3

Bert, CW. (1987) Application of a Version of the Rayleigh Technique to Problems of Bars, Beams,
Columns, Membranes, and Plates, J. Sound Vibration, Vol. 119, No.2, pp. 317-326.
Langhaar, M.L. (1962) Energy Methods in Applied Mechanics, J. Wiley.
Mikhlin, S.G. (1964) Variational Methods in Mathematical Physics, MacMillan.
Schechter, R.S. (1967) The Variational Method in Engineering, McGraw Hill.
Shames, I.H. and Dym, CL. (1985) Energy and Finite Element Methods in Structural Mechanics,
McGraw Hill.

Chapter 4

The number of relevant sources is almost endless. Only a few are given below.
Cook, R.D. (1981) Concepts and Applications of Finite Element Analysis, J. Wiley.
Huebner, K.M. (1975) The Finite Element Method for Engineers, Wiley.
252 References

Noor, A.K. and Andersen, C.M. (1979) Computerized Symbolic Manipulation in Structural
Mechanics-Progress and Potential, Compo Struct. Vol. 10, pp. 95-118.
Shames, I.M. and Dym, C.L. (1985) Energy and Finite Element Methods in Structural Mechanics,
McGraw Hill.
Timoshenko, S. and Woinowsky-Krieger, S. (1959) Theory of Plates and Shels, McGraw-Hili.
Zienkiewich, O.c. (1986) The Finite Element Method, McGraw-Hili.
Index

Absint, 17 Euler-Lagrange equation, 49, 50, 51, 59, 60,


Arguments, 1 64,67,69,71, 72, 74, 75, 78, 80, 81, 82,
Assignment, 2 84, 86, 87, 96, 99, 114, 124, 126, 127, 128,
Assume, 20 244
Assume pos, 19, 121, 125
Atom, 1 Finite element
Atvalue, 14, 34, 128 axial load, 226
beam, 150, 151
distorted, 234
Batch, 1, 214, 216 isoparametric, 226, 234
Bc2, 13, 85, 127 parent, 234
Bigfloats, 3, 94, 123 plane, 228
Boundary conditions, 61 plate, 208
imposed, 61, 63, 102, 107, 113, 116, 247 rectangular, 208
natural, 61, 62, 80, 101, 107, 150 subparametric, 226
superparametric, 226
truss, 159, 183
First, 12
Closefile,26 Floating contagion, 2
Compatibility, 173,218 Floating-point number, 2
Compound statement, 9, 25, 72, 73, 74, 75, 95, Form, 2
98, 134, 196 Fpprec, 3, 5, 94, 123
Constraints, 46, 51, 53, 86, 173 Function, 2
Coordinate system admissible, 47, 53, 61, 76
global, 167, 168 trial, 92, 97, 101, 107, 117, 126, 134, 150,218
local, 167, 168 Functional, 47, 106, 107, 119, 124
natural, 219, 224 quadratic, 144, 147
Functions interpolation, 155, 160, 196,209,
216,225,231,233,235,242
D'Alembert's principle, 53, 55 Functions
Depends, 27, 64 linearly independent, 148
Derivabbrev, 23, 84, 127 arrays, 110, 137
DERIVE, 1 orthogonal, 148
Diff, 121
Display, 18,25, 155
Do, 9, 18,25, 105, 125, 134, 155, 183 Generalized coordinates, 46, 49, 55, 64, 73
Done, 25 Grind, 23
Dulling's equation, 36, 139
Hamilton's principle, 49, 50, 55, 56, 57, 58, 62,
96,130
Element mass matrix, 156, 160, 165, 169,204 Hermitian interpolation, 226
Element stiffness matrix, 152, 156, 163, 175,
211
assembly, 177, 181, 184, 192, 195,206,215 Ic2, 12, 39
Expression, 2 Ident,9
254 Index

lit, 129 null, 144


Intanalysis, 19, 23, 121, 125 permutable, 144
Integrate, 16, 17 positive definite, 145, 147
Invert, 10 symmetric, 145

Jacobian, 235, 249 Part, 22


Playback, 23, 26
Plus, 15
Lagrange multipliers, 51, 81, 86 Primi ti ve, 1
Lagrangian, 50, 55, 56, 57, 58, 59, 60, 64, 65, Proced ure, 1
67,70,71,72,73,74 Program, 1
Lagrangian interpolation, 226
Laplace, 34, 35
Ldefint, 17 Radcan,21
Legendre's condition, 78, 85, 240 Ratcoef, 21, 155
Let, 23 Ratsimp, 200
Letsimp,23 Ratsubst, 4, 22, 42
Lhs, 6 REDUCE, 1
Limit, 15 Rhs, 6, 21
LISP, 1,2 Romberg, 18
List, 2 Rotation-of-axes transformation, 170, 187
Load, 17
Lvar, 129
Save, 26
SCRATCH PAD, 1
MACSYMA, 1, 2, 3 Scalar product, 142
MAPLE, 1 Solve, 11, 27, 32, 100, 105
Matchdeclare, 23 desolve, 14, 128
MATHEMATICA, 1 globalsolve, 12, 23, 200
Matrix, 8 linsolve, 11, 111, 153,200
coefmatrix, 10, 134, 154, 212 String, 1
copymatrix, 9 Subst, 4, 105
entermatrix, 8, 138, 193
zeromatrix, 8, 9
submatrix, 202, 207 Taylor, 15
Method Tellsimpafter, 24, 68
Bubnov-Galerkin, 96, 101, 107, 109, 114, Transversality condition, 80, 81, 87
116, 136, 137, 140,241,245 Trigexpand, 6
Kantorovich, 114, 116, 126, 127 Trigreduce, 6, 37, 68
Least squares, 92 Tlimit,15
Rayleigh-Ritz, 89, 90, 100, 101, 103, 107, Tlimswitch, 15
109,111,113,115-117,124,130,241,245 Trigsimp, 22
Minimizing sequence, 147

Ode, 12, 14,65,66,85, 86 Variation, 49, 58, 75


Ode2, 12, 39, 127 first, 76
Operator, 143 second, 76
biharmonic, 143 Virtual work, 53
identity, 144
inverse, 144
linear, 144, 146 Writefile, 26
c. A. Brebbia (Ed.)
Finite Element Systems
A Handbook
3rd rev. ed. 1985. XXVI, 767 pp. 456 figs .
ISBN 3-540-15116-8

Although the engineering industry utilizes a


considerable number of computer codes .based on
the Finite Element Method, a reference book on
the topic was not available until October 1981,
when the first edition of this Handbook appeared.
The speed with which the book became out of
print demonstrated that it was of importance to
engineers, and a new edition was required in 1982
which, in tum, was also soon out of print.
The continual developments in the field call for a
still newer edition, rather than just a reprint of the
second one. The third revised edition covers 46
different systems instead of 34 in the old edition.
Among these 46 systems are some of the 34 origi-
nal programs, 7have been deleted and 19 new
systems have been incorporated in the 3rd edition.
,The format of the book, however, is unchanged,
, especially its introductory remarks on how to use
the book, in which a classification of the different
codes is attempted. Programs based on techniques
other than Finite Elements are also reported, par-
ticu larly the Boundary Element codes. Some pre-
and post-processor systems are included in view of
their importance for running Finite Element codes
efficiently.
Springer-Verlag Berlin
Heidelberg New York London Jointly published by Springer-Verlag and
Paris Tokyo Hong Kong A Computational Mechanics Centre Publication
E. Hinton, D. R. J. Owen,
G. Krause (Hrsg.)
Finite Elemente Programme
fur Platten und Schalen
Mit Beitragen von 1. A. Figueiras, E. Onate,
H. H. A. Rahmann, B.Suarez
1989. XV, 400 S. 73 Abb. ISBN 3-540-51546-1

Diese Finite Elemente Programme flir Platten und


Schalen bieten viei mebr a1s nur eine Bescbreibung
von Programmen. Die Autoren behandeln die
Thematik so, da13 auch der Nicbtfachrnann den Ein-
stieg findet.
Die matbematiscben Grundlagen bescbranken sicb
auf Differentialgleichungen und Matrizenrechnung;
die Voraussetzungen der schubweichen Plattentheorie
und einer speziellen Schalentheorie werden so weit
dargestellt, wie sie fur das Aufstellen der finiten Glei-
chungen benotigt werden. Die hergeieiteten Bezie-
hungen bieiben nicht "graue" Theorie, sondem
werden in Form von Program men dem Leser prak-
tisch vermittelt.
Daher sind nicht nur die Ableitungen relativ einfach
nachvollziebbar, sondem es wird die Umsetzung an
praxisorientierten Beispielen demonstriert.
Die Programme konnen dazu dienen, eigene Anwen-
dungen zu rechnen, die Software weiter auszubauen
oder aber verfeinerte Algorithmen zu implementie-
ren.
Diese Ausgabe ist gegeniiber dem engliscben Origi-
nal erganzt und aktualisiert worden.
Das Buch wendet sicb an Studenten und Ingenieure
Springer-Verlag Berlin des Bauingenieurwesens und Maschinenbaus sowie
Heidelberg New York London anderer Fachrichtungen, die sich in die FE- Methode
P~ris Tokyo Hong Kong einarbeiten bzw. diese anwenden wollen.

You might also like