I did search at Google and this website before asking this question, so sorry if this somehow has already been answered and I didn't notice. BTW I'm a humanities scholar and not a trained mathematician (probably if I were I wouldn't be asking this question) so sorry if anything I ask/assume is wrong and please kindly correct me if so.
I am working on a Python implementation of the Bezier merging algorithm in this paper: http://cg.cs.tsinghua.edu.cn/~shimin/pdf/cad%202001_merging.pdf and I have implemented the first constrained optimization method and now working on the second one. I realize that StackOverflow is recommended for questions about implementing maths algorithms but my question is about the underlying mathematics itself (and not how to implement it), so I'm asking here.
In the second constrained optimization method I have two ordinary (i.e. not "rational") Bezier curves $P$ and $Q$ (of degree $n$) and I need to find the squared area between the two curves, defined as:
$$ \int_0^1 (P(t)-Q(t))^2 dt $$
Now I hope I understand correctly that $ P(t)-Q(t) $ can be understood as yet another Bezier curve $D$ where the control points $D_i$ $(i=0,1,...,n)$ are simply equal to $ P_i - Q_i $.
I know that differentiating a Bezier curve (i.e. finding the hodograph) will give me another Bezier curve of one lesser degree. I hope I understand correctly that this also means that the integral of a Bezier curve will also be another Bezier curve? But here I have to do the integral of the square of a Bezier curve and am not sure how to do that. Do I understand correctly that what is in fact meant is the square of the Euclidean distance between corresponding points of $P$ and $Q$, i.e.
$$ \int_0^1 || P(t) - Q(t) || ^ 2 dt $$
because a Bezier curve involves vectors, but area is a scalar, right?
Now googling for "square area under a bezier curve" I found this: http://cagd.cs.byu.edu/~557/text/ch2.pdf which shows (under sec 2.15) that if $F$ (I changed the names to not conflict with my previous formulae) is an Bezier curve of degree $n$ defined by:
$$ F(t) = \sum_{i=0}^n F_i B_i^n (t) $$
where $B$ is the Bernstein basis function and $F_i$ are the control points, then the integral of $F$ is another Bezier curve $G$ of degree $n+1$ defined as:
$$ G(t) = \sum_{i=0}^{n+1} G_i B_i^{n+1} (t) $$
where $G_0$ is $0$ (or the origin point of whatever dimensional curve we have) and the other control points $G_i$ $(i=1,2,...,n+1)$ are found as:
$$ G_i = { \sum_{j=0}^{i-1} F_j \over n + 1 }$$
but now I have to integrate $G^2$ which I assume means $||G||^2$ and I wonder if there is an analytical way of doing so i.e. a generic formulation just like $G$ was defined in terms of $F$? If there is not, then what other way should I follow to find the integral?
Thanking you very much for your kindness and patience!
Shriramana Sharma.