  We derive and describe a very accurate variational scheme for the ground
state of the system of a few ultra-cold bosons confined in one-dimensional
traps of arbitrary shapes. It is based on assumption that all inter-particle
correlations have two-body nature. By construction, the proposed ansatz is
exact in the noninteracting limit, exactly encodes boundary conditions forced
by contact interactions, and gives full control on accuracy in the limit of
infinite repulsions. We show its efficiency in a whole range of intermediate
interactions for different external potentials. Our results manifest that for
generic non-parabolic potentials mutual correlations forced by interactions
cannot be captured by distance-dependent functions.
