We consider the problem of a polymer, modelled as a self-avoiding walk
on a square lattice on the (x,y greater than or equal to 0) semi-plan
e, which is confined between walls located at x = -m and x = m. For ea
ch monomer incorporated into the walk and located at one of the walls
the partition function is multiplied by a Boltzmann factor w = exp[-ep
silon/k(B)T], so that the walls may be attractive (epsilon < 0) or rep
ulsive (epsilon > 0). The activity of a monomer will be denoted by z.
Using a recursive procedure which allows us to obtain the partition fu
nction of the problem for values of m up to 4, we calculated the fract
ion of monomers in each column x of the slab, at the critical value of
the activity z(c), where the mean value of the number of monomers div
erges. As expected, this density profile is convex for sufficiently at
tracting walls and concave for repulsive walls. For m > 1, there exist
s an interval of values for w in which the profile is neither convex n
or concave.