  We address the question of an appropriate choice of basis functions for the
self-consistent field (SCF) method of simulation of the N-body problem. Our
criterion is based on a comparison of the orbits found in N-body realizations
of analytical potential-density models of triaxial galaxies, in which the
potential is fitted by the SCF method using a variety of basis sets, with those
of the original models. Our tests refer to maximally triaxial Dehnen
gamma-models for values of $\gamma$ in the range 0<=gamma<=1. When an N-body
realization of a model is fitted by the SCF method, the choice of radial basis
functions affects significantly the way the potential, forces, or derivatives
of the forces are reproduced, especially in the central regions of the system.
We find that this results in serious discrepancies in the relative amounts of
chaotic versus regular orbits, or in the distributions of the Lyapunov
characteristic exponents, as found by different basis sets. Numerical tests
include the Clutton-Brock and the Hernquist-Ostriker (HO) basis sets, as well
as a family of numerical basis sets which are `close' to the HO basis set. The
family of numerical basis sets is parametrized in terms of a quantity
$\epsilon$ which appears in the kernel functions of the Sturm-Liouville (SL)
equation defining each basis set. The HO basis set is the $\epsilon=0$ member
of the family. We demonstrate that grid solutions of the SL equation yielding
numerical basis sets introduce large errors in the variational equations of
motion. We propose a quantum-mechanical method of solution of the SL equation
which overcomes these errors. We finally give criteria for a choice of optimal
value of $\epsilon$ and calculate the latter as a function of the value of
gamma.
