I have a function $f(x)$ which needs to be bounded between 2 functions $g(x)$ and $h(x)$. Functions $g(x)$ and $h(x)$ are guaranteed never to intersect.
I have a function $f(x) = a + bx + cx^2$ and I need to select parameters $a$, $b$, and $c$ such that $\int_0^1 f(x) dx = w$ and $g(x) < f(x) < h(x)$ for $x \in [0,1]$.
How would I construct f(x) to enforce these constraints? All functions here are polynomials.
Edit: I have a hypothesis of how I might solve this, but I don't know how to formalize it:
If I specify this as an optimization problem, \begin{equation} \min_{a,b,c} \left(\int_0^1 f(x) dx - w\right)^2 \end{equation} and apply g(x) and h(x) as constraints to that optimization, perhaps such that I integrate $f(x) - h(x)$ only if the constraint is broken (and the same for $g(x)$) I could do something with Lagrange multipliers and slack variables... but I'm not sure how I would apply that.
When $g$ and $h$ form a narrow hose going up-down-up there will be no quadratic polynomial $f$ in between.