
In a multispan beam, we write for the deflection of the th span, where
and where is the span's length. The coordinate indicates the
location within the span, with corresponding to the span's left endpoint.
Thus, each span has its own coordinate system.
We assume that the interface of the two adjoining spans is supported on springs
which (a) resist transverse displacement proportional to the displacement (constant of
proportionality of (d for displacement), and (b) resist rotation proportional to the
slope (constant of proportionality of (t for torsion or twist). The spans are numbered
from left to right. The interface conditions between spans and +1 are
1. 
The displacements at the interface match:
.

2. 
The slopes at the interface match
(0).

3. 
The difference of the moments just to the left and just to the right of the
support is due to the torque exerted by the torsional spring:

4. 
The difference of the shear forces just to the left and just to the right of the
support is due to the force exerted by the linear spring:

The special case of a pinned support corresponds to and .
In that case, condition 3 above implies that ,
and condition 4 implies that
Let us write the displacements and in terms of the KrylovDuncan
functions as:
Then applying the cyclic properties of the KrylovDuncan functions described
earlier, the four interface conditions translate to the following system of four
equations involving the eight coefficients .
,
which we write as a matrix equation
.
That coefficient matrix plays a central role in solving
for modal shapes of multispan beams. Let's call it .
Note that the value of enters that matrix only in combinations with
and . Therefore we introduce the new symbols
, .
The following proc generates the matrix . The parameters and
are optional and are assigned the default values of infinity and zero, which
corresponds to a pinned support.
The % sign in front of each Krylov function makes the function inert, that is, it
prevents it from expanding into trig functions. This is so that we can
see, visually, what our expressions look like in terms of the functions. To
force the evaluation of those inert function, we will apply Maple's value function,
as seen in the subsequent demos.
> 
M_interface := proc(mu, L, {Kd:=infinity, Kt:=0})
local row1, row2, row3, row4;
row1 := %K[1](mu*L), %K[2](mu*L), %K[3](mu*L), %K[4](mu*L), 1, 0, 0, 0;
row2 := %K[4](mu*L), %K[1](mu*L), %K[2](mu*L), %K[3](mu*L), 0, 1, 0, 0;
row3 := %K[3](mu*L), %K[4](mu*L), %K[1](mu*L), %K[2](mu*L), 0, Kt/mu, 1, 0;
if Kd = infinity then
row4 := 0, 0, 0, 0, 1, 0, 0, 0 ;
else
row4 := %K[2](mu*L), %K[3](mu*L), %K[4](mu*L), %K[1](mu*L), Kd/mu^3, 0, 0, 1;
end if:
return < <row1>  <row2>  <row3>  <row4> >^+;
end proc:

Here is the interface matrix for a pinned support:
And here is the interface matrix for a general springy support:
> 
M_interface(mu, L, 'Kd'=a, 'Kt'=b);

Note: In Maple's Java interface, inert quantities are shown in gray.
Note: The in this matrix is the length of the span to the left of the interface.
Recall that it is , not , in the derivation that leads to that matrix.
In a beam consisting of spans, we write the th span's deflection as
Solving the beam amounts to determining the unknowns
which we order as
At each of the interface supports we have a set of four equations as derived
above, for a total of equations. Additionally, we have four usersupplied
boundary conditions  two at the extreme left and two at the extreme right of the
overall beam. Thus, altogether we have equations which then we solve for the
unknown coefficients .
The usersupplied boundary conditions at the left end are two equations, each in the
form of a linear combination of the coefficients . We write for the
coefficient matrix of that set of equations. Similarly, the usersupplied boundary
conditions at the right end are two equations, each in the form of a linear combination
of the coefficients . We write for the coefficient matrix of
that set of equations. Putting these equations together with those obtained at the interfaces,
we get a linear set of equations represented by a matrix which can be assembled
easily from the matrices , and . In the case of a 4span beam the
assembled matrix looks like this:
The pattern generalizes to any number of spans in the obvious way.
For future use, here we record a few frequently occurring and matrices.
> 
M_left_pinned := <
1, 0, 0, 0;
0, 0, 1, 0 >;

> 
M_right_pinned := (mu,L) > <
%K[1](mu*L), %K[2](mu*L), %K[3](mu*L), %K[4](mu*L);
%K[3](mu*L), %K[4](mu*L), %K[1](mu*L), %K[2](mu*L) >;

> 
M_left_clamped := <
1, 0, 0, 0;
0, 1, 0, 0 >;

> 
M_right_clamped := (mu,L) > <
%K[1](mu*L), %K[2](mu*L), %K[3](mu*L), %K[4](mu*L);
%K[4](mu*L), %K[1](mu*L), %K[2](mu*L), %K[3](mu*L) >;

> 
M_left_free := <
0, 0, 1, 0;
0, 0, 0, 1 >;

> 
M_right_free := (mu,L) > <
%K[3](mu*L), %K[4](mu*L), %K[1](mu*L), %K[2](mu*L);
%K[2](mu*L), %K[3](mu*L), %K[4](mu*L), %K[1](mu*L) >;

The following proc builds the overall matrix in the general case. It takes
two or three arguments. The first two arguments are the matrices
which are called and in the discussion above. If the beam
consists of a single span, that's all the information that need be supplied.
There is no need for the third argument.
In the case of a multispan beam, in the third argument we supply the
list of the interface matrices , as in , listed in order
of the supports, from left to right. An empty list is also
acceptable and is interpreted as having no internal supports,
i.e., a singlespan beam.
> 
build_matrix := proc(left_bc::Matrix(2,4), right_bc::Matrix(2,4), interface_matrices::list)
local N, n, i, M;
# n is the number of internal supports
n := 0;
# adjust n if a third argument is supplied
if _npassed = 3 then
n := nops(interface_matrices);
if n > 0 then
for i from 1 to n do
if not type(interface_matrices[i], 'Matrix(4,8)') then
error "expected a 4x8 matrix for element %1 in the list of interface matrices", i;
end if;
end do;
end if;
end if;
N := n + 1; # number of spans
M := Matrix(4*N);
M[1..2, 1..4] := left_bc;
for i from 1 to n do
M[4*i1..4*i+2, 4*i3..4*i+4] := interface_matrices[i];
end do;
M[4*N1..4*N, 4*N3..4*N] := right_bc;
return M;
end proc:

For instance, for a singlespan cantilever beam of length we get the following matrix:
> 
build_matrix(M_left_clamped, M_right_free(mu,L));

For a twospan beam with with span lengths of and , and all three
supports pinned, we get the following matrix:
> 
build_matrix(M_left_pinned, M_right_pinned(mu,L[2]), [M_interface(mu, L[1])]);

The matrix represents a homogeneous linear system (i.e., the righthand side vector
is zero.) To obtain a nonzero solution, we set the determinant of equal to zero.
That gives us a generally transcendental equation in the single unknown . Normally
the equation has infinitely many solutions. We call these
Remark: In the special case of pinned supports at the interfaces, that is, when
, the matrix depends only on the span lengths .
It is independent of the parameters that enter the EulerBernoulli
equations. The frequencies , however, depend on those parameters.
This proc plots the calculated modal shape corresponding to the eigenvalue .
The params argument is a set of equations which define the numerical values
of all the parameters that enter the problem's description, such as the span
lengths.
It is assumed that in a multispan beam, the span lengths are named etc.,
and in a singlespan beam, the length is named .
> 
plot_beam := proc(M::Matrix,mu::realcons, params::set)
local null_space, N, a_vals, i, j, A, B, P;
eval(M, params);
eval(%, :mu=mu);
value(%); #print(%);
null_space := NullSpace(%); #print(%);
if nops(null_space) <> 1 then
error "Calculation failed. Increasing Digits and try again";
end if;
N := Dimension(M)[1]/4; # number of spans
a_vals := convert([seq(seq(a[i,j], j=1..4), i=1..N)] =~ null_space[1], list);
if N = 1 then
eval(add(a[1,j]*K[j](mu*x), j=1..4), a_vals);
P[1] := plot(%, x=0..eval(L,params));
else
A := 0;
B := 0;
for i from 1 to N do
B := A + eval(L[i], params);
eval(add(a[i,j]*K[j](mu*x), j=1..4), a_vals);
eval(%, x=xA):
P[i] := plot(%, x=A..B);
A := B;
end do;
unassign('i');
end if;
plots:display([P[i] $i=1..N]);
end proc:

