Basically integrand has the largest value iff, it is positive in the interval. If you consider all interval where it is positive and integrate it, you will get the max value. Now, before becoming negative from positive, the polynomial changes sign, i.e, becomes zero. So, you have to find the roots, and integrate between the roots, between which it stays positive.
This is sufficient for quadratic polynomial. For others, you need to consider multiple intervals, and the integrand value on intermediate negative intervals also, and try to do an optimization.