Quadratic least squares can be used to fit a quadratic curve to $3$ or more points, such that the resulting curve is the quadratic curve that has the least squared distance of the data points to the resulting curve.
Is there a way to do the same but with the restriction that the resulting curve is monotonic over a specific range? Like being monotonic in $[0,500]$ for instance. The data set itself is monotonic over the same range.
One thing that's come to mind is to do a regular fit and then adjust the result to have positive derivatives. While that would technically be a fit, I don't think it'd be optimal.
I've also thought about maybe doing some gradient descent to find a good fit, but I'm really hoping to find something like least squares, which is a constant time algorithm that doesn't get caught in local minima.
I specifically am trying to fit a monotonic quadratic curve to three data points, so any other technique that does the same would also be useful.
I'm looking to understand and implement this, so I'm looking for the information about how to do it, instead of being pointed at any software that might be able to do it for me.
Thank you!