function Integral(myFunction, scope, begin, end, parts) {
	this.className = "Integral";
	
	if (!begin) { begin = 0; }
	if (!end)	{ end 	= 1; }
	if (!parts) { parts = 1; }
	
	var step = (end - begin) / parts;
	var result;
	var temp = 0;
	temp = myFunction(begin, scope) / 2;
	begin += step;
	for (var c = 0; c < parts - 1; c++) {
		temp += myFunction(begin, scope);
		begin += step;
	}
	temp += myFunction(begin, scope) / 2;
	result = temp*step;
	return result;
}
