  The main part of this paper is to present an updated review of the Casimir
energy at zero and finite temperature for the transverse oscillations of a
piecewise uniform closed string. We make use of three different
regularizations: the cutoff method, the complex contour integration method, and
the zeta-function method. The string model is relativistic, in the sense that
the velocity of sound is for each string piece set equal to the velocity of
light. In this sense the theory is analogous to the electromagnetic theory in a
dielectric medium in which the product of permittivity and permeability is
equal to unity (an isorefractive medium). We demonstrate how the formalism
works for a two-piece string, and for a 2N-piece string, and show how in the
latter case a compact recursion relation serves to facilitate the formalism
considerably. The Casimir energy turns out to be negative, and the more so the
larger the number of pieces in the string. The two-piece string is quantized in
D-dimensional spacetime, in the limit when the ratio between the two tensions
is very small. We calculate the free energy and other thermodynamic quantities,
demonstrate scaling properties, and comment on the meaning of the Hagedorn
critical temperature for the two-piece string. Thereafter, as a novel
development we present a scalar field theory for a real field in
three-dimensional space in a potential rising linearly with a longitudinal
coordinate z in the interval 0<z<1, and which is thereafter held constant on a
horizontal plateau. The potential is taken as a rough model of the two-piece
string potential under simplifying conditions, when the length ratio between
the pieces is replaced formally with the mentioned length parameter z.
