$$ y = a^2+b^2+1 $$ $$ a = 3cx(1-x)^2 + 3x^2(1-x) + x^3 $$ $$ b = 3cx^2(1-x) + 3x(1-x)^2 + (1-x)^3 $$ For x between 0 and 1, for what value of c is the area under the curve the smallest?
For context, this is the equation for the error in an approximation of a cubic Bézier curve for a given value of c.
The naive result for the approximation is $$ c = \frac4 3 (\sqrt2 - 1) = 0.5522847498 $$
Mortensen's result seeks to equalizing the positive and negative error and gets: $$ c = 0.551915024494 $$
Whereas because there's clearly more space for the error in the positive than negative so if we want to minimize the error overall we need to minimize the area under the graph:
From brute-forcing it (i'm a computer scientist) the answer should be something like $$ c = 0.5520137217 $$ But, my actual skills to do the calculus needed are lacking and my brute force methodology is quite likely to have error (since I can only find the maxima with very many samples.
So I know that given a value of c = 0.55191502449 at 0.0000001 increments so 10,000,001 samples. gives me a total sum of the errors equal to: 1180.57375326880...
Adjusting the value of c and just throwing a computer at it finds that 0.55201372171 gives a total error 1159.83397426356..., for the same samples.
Clearly there's a marked improvement if our metric is not difference in extrema but rather total error. But, my calculus-fu is weak and I can't figure either the optimal result or the equation for the total sum of the error. I know it requires calculus. But, if we seek to not just reduce the error at the extremes but the error as a whole, this would seem to give a different value. Largely in part because the two twin extremes, or generally flattening out the graph of the error.