public Polynomial derivative(){
		if(terms == null)return null;
		double[] newTerms = new double[terms.length-1];
		
		for(int i=0; i<newTerms.length; i++){
			newTerms[i] = terms[i+1] * (i+1);
		}
		
		return new Polynomial(newTerms);
	}