Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
0 x L,
(1)
d2 u(0)
= b0 ,
dx2
d2 u(L)
= bL ,
dx2
(2)
can be found by standard methods well known in literature of ordinary differential equations and their applications. For more developed data functions, when exact methods
fail, numerical methods are successfully applied to find an approximate solution of a
broad class of the boundary value problems. In the paper, we present effective algorithms based on finite difference methods for linear and non-linear beam equations.
We give the complete analysis of convergence of the algorithms with global error estimates. For the purpose of illustration of the methods and their applications, we design
Mathematica modulae and solve a number of beam equations . The numerical solutions
confirm effectiveness of the algorithms.
Keywords: Beam Equations, Finite Difference Methods
Introduction
Beam equations have a long history starting from Leonardo da Vinci (14521519) and Galileo Galilee (1584-1642) developed by Leonard Euler (17071783), Jacob (1654-1705) and Daniel Bernoulli (1700-1782) in the eighteenth
century. There are numerous structures that evidently were constructed through
application of the beam theory. Practical applications of the beam equations
1 This
62
are presented in broad literature (cf. [1],[2],[3],[7],[8]). These are very huge
buildings like the Manhattan towers, long bridges across big rivers, aero planes
and cars. In these structures, the beams are either used as supporting structures of the floor or as axles of cars. These would not be possible if it was not
for the usage of the beam theory.
In this paper, we consider numerical solutions of the beam equations with use
of Mathematica system for doing Mathematics (see [6]). The paper is intended
to present a complete mathematical analysis of effective algorithms based on
the Finite Difference Method illustrated by a number of examples. The paper
can be also of an academic and scientific interest for those who deal with the
beam equations and their applications including engineering theory and construction.
Boundary Value Problem. We consider the beam equation
d2
d2 u
[r(x)
] = f (x, u),
dx2
dx2
with the free ends boundary conditions
0 x L,
d2 u(0)
= b0 ,
dx2
d2 u(L)
u(L) = aL ,
= bL ,
dx2
Let us write the equation in the equivalent form:
(3)
u(0) = a0 ,
d2 v
= f (x, u),
dx2
d2 u
r(x) 2 = v,
0xL
dx
with the corresponding boundary conditions
u(0) = a0 ,
u(L) = aL ,
1.1
v(0) = b0 ,
v(L) = bL ,
(4)
(5)
(6)
Engineering Interpretation
63
In the case, when q(x) = 0, and the beam is supported with free ends, the
solution u(x) of the boundary problem
d2
d2 u
[E
I
] = p(x),
0 x L,
dx2
dx2
d2 u(0)
(8)
u(0) = a0 ,
= b0 ,
dx2
d2 u(L)
u(L) = aL ,
= bL .
dx2
describes deflection of the beam from the original position under the force of
load p(x). (see Figure 1 and Figure 2).
p(x)
x
u(0) = a0
u(L) = aL
A
u(0) = b0 A
A
A
u (L) = bL
p(x)
u(0) = a0
A
u(0) = b0 A
u(L) = aL
x?
A
A
A
u (L) = bL
64
We apply notation
xi = ih, h =
L
,
n+1
ui = u(xi ),
d2 u(xi )
= u(xi , ) + i0 (h),
dx2
d2 v(xi )
= vi + i1 (h)
dx2
h2 d4 u(i)
,
12 dx4
i1 (h) =
h2 d4 v(i)
12 dx4
(9)
for a certain i (xi1 , xi+1 ), provided that u(x) is six times continuously
differentiable in the interval [0, L] .
Now let us consider the case when r(x) = 1 starting with the standard finite
d2 u
d4 u
and 4 , on the mesh points
difference approximation of the derivatives
dx2
dx
x0
x1
x2
x3
x4
x5
x6
qd
L
Figure 3. The knots xi , i = 1, 2, ..., n, n = 5
Then, the standard finite difference scheme which approximates the two equations (5) with boundary conditions (6) is
vi = f (x, ui ) + i0 (h),
ui = vi + i1 (h),
i = 1, 2, 3, ..., n,
(10)
Let us write equations (10) in the form of the system of equations including
the boundary value conditions.
Canceling the local truncation error i (h) in (10), we arrive at the finite dif-
65
(11)
u0 = a0
ui1 2ui + ui+1
= vi ,
h2
un+1 = aL
(12)
i = 1, 2, ..., n,
(13)
and
2u1 u2
= a0 v1
h2
ui1 + 2ui ui+1
(14)
= vi ,
i = 2, 3, ..., n 1,
h2
un1 + 2un
= aL vn
h2
Now, let us write the finite difference schemes (13) and (14) in the matrix form
for the vector-solutions Uh = {u1, u2 , ..., un } and Vh = {v1 , v2 , ..., vn }
M0 Vh = F (Uh ),
where
2 1
M0 Uh = Fh (Vh ),
0
1
2 1
0
0 1
2 1
1
M0 = 2
0
0
0
0
(15)
0
2 1
0 1
66
Fh (Uh ) =
b0 f (x1 , u1)
f (x2 , u2 )
f (x3 , u3 )
..
f (xn1 , un1)
bL f (xn , un )
2.2
Fh (Vh ) =
a0 v1
v2
v3
..
vn1
aL vn
Convergence
Let us note that the matrix M0 in the systems of equations (15) is positive
definite. Indeed, the matrix has the eigenvalues (cf. [4], p.55):
k =
4
k
sin2
,
2
h
2n
k = 1, 2, ..., n
8
L2
(16)
1
In conclusion, the norm of the matrix M0 satisfies the inequality
||M01 ||
L2
.
8
(17)
M0 Eh (V ) = h (V ),
67
||h (V )|| C h2
Eh (U) = M01 h (V ).
||Vh U|| K h2 ,
w(L) = b0 ,
w (0) = aL , w (L) = bL
To find the interpolating polynomial, we apply the Mathematica commands
(cf. [6])
Enter
n (for example n=9 to be h=10;)
p = {{0, {a_0, 0, b_0}}, {1, {a_L, 0, b_L}}};
Execute
Simplify[InterpolatingPolynomial[p, x]];
to obtain
w(x) = (a0 + x2 ((b0 /2 + ((a0 + aL b0 /2 + 1/2((6a0 6aL + b0
((12a0 12aL + b0 bL ))((1 + x))))((1 + x)))x))
The new unknown u0 (x) is the solution of the equation
d4 w
d4 u 0
0
=
f
(x,
u
+
w)
,
dx4
dx4
0xL
(18)
68
u0 (0) = 0, u0 (L) = 0.
We split equation (18) into two equations of the second order
d2 v 0
d4 w
0
=
f
(x,
u
+
w)
,
dx2
dx4
d2 u 0
= v 0 (x),
0xL
dx2
(19)
v(0) = 0,
u0 (L) = 0,
v(L) = 0,
(20)
(21)
and
u00 = 0
u0i1 + 2u0i u0i+1
= vi0 ,
h2
u0n+1 = 0
i = 1, 2, ..., n,
(22)
0
Because v00 = 0, vn+1
= 0 and u00 = 0, u0n+1 = 0, the system of equations takes
the following form:
2v10 v20
d4 w1
0
=
f
(x
,
u
+
w
)
+
1
1
1
h2
dx4
0
0
vi1
+ 2vi0 vi+1
d4 wi
0
=
f
(x
,
u
+
w
)
+
, i = 2, 3, ..., n 1,
i
i
i
h2
dx4
0
vn1
+ 2vn0
d4 wn
0
=
f
(x
,
u
+
w
)
+
n
n
n
h2
dx4
(23)
69
and
2u01 u02
= v10
h2
u0i1 + 2u0i u0i+1
= vi0 ,
h2
u0n1 + 2u0n
= vn
h2
(24)
i = 2, 3, ..., n 1,
Now, let us write the finite difference schemes (23) and (24) for the solutions
Uh0 = {u01 , u02 , ..., u0n } and Vh0 = {v10 , v20 , ..., vn0 } in the matrix form
M0 Vh0 = F (Uh0 ),
M0 Uh0 = Fh (Vh0 ),
(25)
where the matrix M0 and the vectors F (Uh0 ), F (Vh0 ) are given by formula (15)
for a0 = aL = 0 and b0 = bL = 0
Example 1 Consider the beam equation
d4 u
= 4 x sin x 4 3 cos x,
dx4
0 x 1,
(26)
u(0) = 0,
u (0) = 2,
u(1) = 0,
u (1) = 2,
(27)
Let us note that u(x) = x sin x is the exact solution of the boundary problem.
In order to transform the non-homogeneous boundary conditions to homogeneous one, we introduce the new unknown u0 (x) by the substitution
u(x) = u0 (x) + w(x),
0 x 1,
to get
w(x) = (x 1)2 x2 (2x 1).
Then, the new unknown u0 (x) = x sin x w(x) satisfies the equations
d2 d2 w
d2 d2 u 0
4 0
3
=
4
cos
x
,
dx2 dx2
dx2 dx2
0 x 1,
(28)
70
10
d2 u0 (0)
= 0,
dx2
d2 u0 (1)
= 0,
dx2
(29)
4
cos
x
,
dx2
dx2 dx2
d2 u 0
= v0,
0x1
2
dx
0 x 1,
(30)
v(0) = 0,
u0 (1) = 0,
v(1) = 0.
(31)
0 x 1,
Optimal Algorithm
In order to find the solution of equations (25), we shall modify the algorithm
given in (cf. [5], p.165), which contains proportional number of arithmetic
operations to the number of unknowns n. Let us note that a stable algorithm
for solving a system of equations MV = F with a square matrix M of dimension n n and with n unknowns is called optimal if it solves the system of
equations with the cost of the number of arithmetic operations proportional
to n. In this sense the proposed algorithms are optimal. By the algorithm one
can find a solution of a beam equation in the case of a function f (x, u) = p(x)
independent of u. In the next sections, we shall use the algorithm for any function f (x, u).
71
11
Algorithm
T o evaluate Vh = (v1 , v2 , ..., vn )
Set :
evaluate
evaluate,
1
F1 (Vh )h2
1 = ,
1 =
2
2
1
i =
f or i = 2, 3, . . . , n 1,
2 + i1
Fi (Vh )h2 + i1
i =
f or i = 2, 3, . . . , n,
2 + i1
set :
vn = n
evaluate :
vi = i i vi+1
f or i = n 1, n 2, . . . , 1
F1 (Uh )h2
2
Fi (Uh )h2 + i1
i =
f or i = 2, 3, . . . , n,
2 + i1
un = n
1 =
ui = i i ui+1
(32)
f or i = n 1, n 2, . . . , 1
72
12
x[n] = be[n];
x[i_] := x[i] = be[i] - al[i]*x[i + 1];
Table[x[i], {i, 1, n}]
];
fv = Table[q[i h], {i, n}];
v1 = solveTri[fv];
u1 = solveTri[v1];
u1
]
In order to invoke the module, we enter data
q[x_],
n,
L,
0 x 1,
(33)
0 x 1,
d2 u0 (0)
= 0,
dx2
d2 u0 (1)
= 0.
dx2
(34)
73
13
and invoke the module for the number of interior mesh points n = 9 in the
L
interval [0, L] = [0, 1] with step size h =
= 0.1
n+1
solveFreeEnds[q,9,1]
Then, we write the solutions u0h (x) and u0 (x) rounded off to four decimal places
in the table
x
u0h (x)
u0 (x)
0.1
0.0069
0.0105
0.2
0.0657
0.0693
0.3
0.1864
0.1873
0.4
0.3477
0.3442
0.5
0.5083
0.5
0.6
0.6191
0.6068
0.7
0.6361
0.6217
0.8
0.5319
0.5185
0.9
0.3072
0.2985
Table 1
The exact solution
u0 (x) = x sin[x] w[x],
where
3.2
(35)
(36)
We shall solve the system of equations (25) by the following implicit iterative
method:
Vh0 given initial values
(m+1)
= Fh (Vhm ),
(m+1)
= Fh (Uhm ),
M0 Uh
M0 Vh
(37)
m = 0, 1, ...
74
14
E (m+1) (Uh ) = Uh
(m)
Uh
(m+1)
= Vh
(m)
) F (Vh
(m)
Vh
= E (m+1) (Vh ),
m = 0, 1, 2, ...,
L2
, therefore, by the above relation, we get the estimate
8
1
1
(m)
(0)
m = 0, 1, 2, ..., (38)
||E (m+1) (Uh )|| || Eh (Vh )|| m || Eh (Vh )||,
Because ||M01 ||
8
1
L2
,
we
have
=
<
1,
when
L
<
2
2.
L2
8
Thus, by inequality (38), we conclude that
For =
since then
3.3
1
> 0. End of the proof.
m
We solve equation (25) with free ends, by the Implicit Iterative Method using
the Mathematica module
solveFreeEndsImplicit[v0_, g_, L_, n_] := Module[{x },
h = L/(n + 1);
solveTri[f_] := Module[{al, be, x},
al[1] = -1/2;
al[i_] := al[i] = -1/(2 + al[i - 1]);
be[1] = f[[1]]/2;
be[i_] := be[i] = (f[[i]] + be[i - 1])/(2 + al[i - 1]);
x[n] = be[n];
x[i_] := x[i] = be[i] - al[i]*x[i + 1];
75
15
(39)
u(0) = 0,
u (0) = 0,
u(1) = 0,
u (1) = 0,
(40)
0.1
0.0041
0.00416
0.2
0.0077
0.0077
0.3
0.011
0.0105
0.4
0.0124
0.0124
0.5
0.0130
0.0129
Table 2
0.6
0.0124
0.01230
0.7
0.011
0.01050
0.8
0.0077
0.0077
0.9
0.0041
0.0041
76
16
1
1
max |u2h (ih) uh )(ih)| = max |t2[i] t1[i]| = 0.000025
3 1in
3 1in
globalError
= 0.195%
max1in |t2[i]|
Clear[x]; n = 19;
residual =
Table[g[x, pol19] /. x -> i h-D[pol19, {x, 4}]
{i, n}]
77
17
blad = Max[Abs[residual]]
0.0000510502
and relative residual error
relativeblad = 100 blad/Max[Abs[t2]] %
0.39531 %
Hence, the residual error 0.00005105 is small and proportional to the global
error of the method. Therefore, the global error is also small.
Conclusion. In conclusion, we have proposed stable and convergent algorithms implemented in Mathematica modelae solveFreeEnds and solveFreeEndsImplicit for solving the beam equations. The numerical results given in the
Table 1 and Table 2 confirm high accuracy of the results with small global
and relative errors. For the further analysis of the errors, we represent the
numerical results in the form of interpolating polynomials. Using the interpolating polynomials, we can easily compute the residual errors which for stable
algorithms are consistent with the global errors of the methods. As a standard
principle used in engineering computations the acceptable results are on the
level up 5%. In the examples, the relative errors are: 1.4% in example 2,
0.195% in example 3, and the residual error in example 3 with f (x, u) = eu
is 0.4%,. By the principle, these results confirm the effectiveness of the proposed algorithms.
References
1. Clough, R.W. and Penzien J., Dynamics of Structures, McGraw-Hill,
1993.
2. Gere, J.M.,Mechanics of Materials,Nelson Thomas Publishing, 2002.
3. Popov, E.P., Mechanics of Materials, Prentice-Hall, 1978.
4. T. Stys, (2001), A Course in Numerical Methods of Differential Equations,
5. K. Stys & T. Stys, (2000), A First Course in Numerical Analysis, National Institute of Development Research and Documentation, University
of Botswana, ISBN99912-2-1492.
6. Wolfram, S., (1992), Mathematica a System for Doing Mathematics by
Computers, Addison-Wesley Publishing Company.
7. Euler-Bernoulli Beam Equation, http://en.wikipedia/Euler-Bernoulli-beamequation.
8. Timoshenko Beam Theory, http://en.wikipedia.org/wiki/Timoshenko-beamtheory