Hello everybody,
does anyone know how to integrate the output of BsplineCurve in maple 8? I can plot it over a given interval, but if I try to perform the corresponding definite integral, I get the following error message:
Error, (in int) wrong number (or type) of arguments
as opposed to the output of the Spline routine, which can be integrated without problems.
Thank you for your help.
Piecewise vs Parametric Form
I do not have Maple 8 at hand, but the issue seems to be related to the structure of the result returned by both functions. Spline returns a piecewise function, whereas BSplineCurve returns a parametric function. So the first structure can be directly integrated. Here is what we can read in Maple 11 online help for Spline,
and for BSplineCurve,
with(CurveFitting): Spline([[0,0],[1,1],[2,4],[3,3]], v); / 1 4 3 14 41 42 2 3 piecewise|v < 1, - v + - v , v < 2, -- - -- v + -- v - 2 v , \ 5 5 5 5 5 114 151 54 2 6 3\ - --- + --- v - -- v + - v | 5 5 5 5 / type(%, piecewise); trueDoes this match your problem with Maple 8?
Regards,
--
Jean-Marc
Thank you, that is indeed
Thank you, that is indeed the core of the problem
BSplineCurve
The output of BSplineCurve is in parametric form [x(t), y(t), t=a..b]. If by "integrate the output" you mean you want
, that would be

Thus:
Thanks a lot, I guess that
Thanks a lot, I guess that will certainly be helpful. It is nevertheless interesting that the plot command works when specifying a given x-range.
Why plot works
That is because you can give a parametric definition to plot. How to do that? Why, by giving a list with 3 elements [f(t), g(t), t=a..b], that's how. Hum, rather like the output of BSplineCurve!
That's not a coincidence at all. In fact, parametric plot came first, and then some clever designer [I don't know who in this case, but I do have a guess] reused that same data-structure for the output of BSplineCurve, so as to obtain automatic composability!