Background: I'm trying to learn how to work with cubic and quadratic bezier splines for various drawing libraries, and working through how to approximate a cubic spline with a quadratic spline. It's occured to me that it should be possible to approximate any continuous parametric function with an arbitrary series of interconnected quadratic splines, as long as you have a suitable fitness function for each section.
It has further occured to me that the derivative of any cubic spline is expressible as a quadratic spline. So now I am curious.
if I have an abitrary function f(t); its derivative f'(t); and I can approximate f'(t) with a series of quadratic splines... can I have some way of assuming those quadratics as derivatives of cubics, and directly compute a series of cubics that then approximates f(t) from the quadratics?
is there something wrong with my reasoning here?
(edited for brevity)
(clarification) I mentioned I was working through how to approximate a cubic spline with a quadratic spline. Let us assume for the purposes of this question that I have already solved this problem, and I have a procedure P which takes any arbitrary function f(t) (which could be a cubic spline, or anything else) with the constraint that we will only approximate over intervals where f'(t) is continuous.
The question therefore is not how do I approximate a cubic with a quadric but, given that I have procedure P, if I apply procedure P to f'(t) to compute a series of quadratic splines, can I use that information to recover a cubic spline approximation of f(t).
From the answers, if I am understanding corrrectly, I think that I can so long as I can still use f(t) to recover this "integral constant". This is an acceptable solution since what I want is something like a procedure P2 which can take a f(t) and give me a sequence of cubic splines which approximate it.
edit: further, it seems that if we have f(t) and its f'(t) and its f''(t) we could even do a straight forward linear approximation of f''(t) and recover a cubic spline approximation of f(t) by solving for the integral constants in f'(t) and f(t). neat.