  A variational approach, based on a discrete representation of the chain, is
used to calculate free energy and conformational properties in
polyelectrolytes. The true bond and Coulomb potentials are approximated by a
trial isotropic harmonic energy containing force constants between {\em
all}monomer-pairs as variational parameters. By a judicious choice of
representation and the use of incremental matrix inversion, an efficient and
fast-convergent iterative algorithm is constructed, that optimizes the free
energy. The computational demand scales as $N^3$ rather than $N^4$ as expected
in a more naive approach. The method has the additional advantage that in
contrast to Monte Carlo calculations the entropy is easily computed. An
analysis of the high and low temperature limits is given. Also, the variational
formulation is shown to respect the appropriate virial identities.The accuracy
of the approximations introduced are tested against Monte Carlo simulations for
problem sizes ranging from $N=20$ to 1024. Very good accuracy is obtained for
chains with unscreened Coulomb interactions. The addition of salt is described
through a screened Coulomb interaction, for which the accuracy in a certain
parameter range turns out to be inferior to the unscreened case. The reason is
that the harmonic variational Ansatz becomes less efficient with shorter range
interactions.
  As a by-product a very efficient Monte Carlo algorithm was developed for
comparisons, providing high statistics data for very large sizes -- 2048
monomers. The Monte Carlo results are also used to examine scaling properties,
based on low-$T$ approximations to end-end and monomer-monomer separations. It
is argued that the former increases faster than linearly with the number of
bonds.
