My problem consists as follows. Say I have a sinusoidal function whose argument is a cubic polynomial: $$f(t) = \sin(at^3+bt^2+ct+d) \quad a, b, c, d\in \mathbb{R}, \quad t\in[T_1, T_2]$$
I want to approximate this with cubic spline $F(t)$ with boundary conditions $F'(T_1)=f'(T_1)$ and $F'(T_2)=f'(T_2)$. Construction of spline form sample points I am familiar with, my problem in this case is choosing the sample point set. Namely, I want that
- The number of sample points is as little as possible
- We ensure the bound on deviation, i.e. $$|F(t)-f(t)|<d, \quad d\in \mathbb{R}$$ for all $t\in[T_1, T_2]$
I am going to use a computer for this procedure, so I guess the solution should be some kind of algorithm. Few things I was thinking about:
- Cubic spline is bounded by maximum of 4th derivative of the original function. However, although I can compute the 4th derivative, I do not know how to calculate the maximum of it.
- Divide and conquer based algorithm. I start with three sample points, perform cubic spline, check for the max error in each of the segments, if its bigger than $d$ split in, perform the procedure again. The problem is the max error evaluation. If we say that $Q, R$ are cubic polynomials, $Q$ argument of the sinusoidal in $f$ and $R$ the approximating segment of the spline, the error is $$ \sin(Q(t)) - R(t)$$ and to find t when the error attains maximum, we need to solve $$ Q'(t)\cdot \cos(Q(t))-R'(t)=0$$ which I do not know how to do. Approach it maybe with the fact that $\sin(Q(t)))=R(t)$ at the boundaries?
Any help or advice how I should proceed with this problem would be greatly appreciated.