  We consider a 3D dilute Bose-Einstein condensate at thermal equilibrium in a
rotating harmonic trap. The condensate wavefunction is a local minimum of the
Gross-Pitaevskii energy functional and we determine it numerically with the
very efficient conjugate gradient method. For single vortex configurations in a
cigar-shaped harmonic trap we find that the vortex line is bent, in agreement
with the numerical prediction of Garcia-Ripoll and Perez-Garcia, Phys.Rev.A 63,
041603 (2001). We derive a simple energy functional for the vortex line in a
cigar-shaped condensate which allows to understand physically why the vortex
line bends and to predict analytically the minimal rotation frequency required
to stabilize the bent vortex line. This analytical prediction is in excellent
agreement with the numerical results. It also allows to find in a simple way a
saddle point of the energy, where the vortex line is in a stationary
configuration in the rotating frame but not a local minimum of energy. Finally
we investigate numerically the effect of thermal fluctuations on the vortex
line for a condensate with a straight vortex: we can predict what happens in a
single realization of the experiment by a Monte Carlo sampling of an atomic
field quasi-distribution function of the density operator of the gas at thermal
equilibrium in the Bogoliubov approximation.
