So I understand how to solve for the largest rectangle that can be inscribed under a basic quadratic say $9-x^2$ (Using optimization), but I have no clue how to do it for an equation like $2x^4+4x^3+3x+1.$ How would you go about solving something like this? The only way we learned was to divide the graph into two sections $(-x\text{ and }+x).$ These two sides were of equal magnitude, since it was a parabola, so to maximize area you could just do $2x(y)$ and $y$ could be written in terms of $x.$ Taking the derivative of this would give you the max area and then you could solve for dimensions.
However, I have no idea how to do it will something even slightly more complicated, like a quartic function that isn't equally divided by the $y$ axis.