I need this rewritten as an AI detector states that the code below is mostly AI generated, this is for a university assignment. Help please!
float compute_area(float a, float b, float c, float d, float lower, float upper){
float width = 0.01;
float area = 0.0;
for (float x = lower; x < upper; x += width){
float y = a * x * x * x + b * x * x + c * x + d;
area += y * width;
}
return area;
}