Inspired by recent experiments and simulations on pattern formation in biomolecules by optical tweezers, a theoretical description based on the reference interaction site model (RISM) is developed to calculate the equilibrium density profiles of small polyelectrolytes in an external potential. The formalism is applied to the specific case of a finite number of Gaussian and rodlike polyelectrolytes trapped in a harmonic potential. The density profiles of the polyelectrolytes are studied over a range of lengths and numbers of polyelectrolytes in the trap, and the strength of the trap potential. For smaller polymers we recover the results for point charges. In the mean field limit the longer polymers, unlike point charges, form a shell at the boundary layer. When the interpolymer correlations are included, the density profiles of the polymers show sharp shells even at weaker trap strengths. The implications of these results are discussed. * Electronic address: ysjho@apctp.org 1 arXiv:1511.03792v2 [cond-mat.soft]