private void calculateChebyshevCoefficients(double x, int nOrder) {
		if (ChebyP == null || ChebyV == null)
			initialiseChebyshevArrays();

		ChebyP[0] = 1.0;
		ChebyP[1] = x;

		ChebyV[0] = 0.0;
		ChebyV[1] = 1.0;

		for (int i = 2; i < nOrder; i++) {
			ChebyP[i] = 2.0 * x * ChebyP[i - 1] - ChebyP[i - 2];
			ChebyV[i] = 2.0 * x * ChebyV[i - 1] - ChebyV[i - 2] + 2.0
					* ChebyP[i - 1];
		}
	}