Start with some function of t :
It looks like this:
To fourth order in t, we have, analytically,
We'll actually use 20th order for numerical calculations.
Create a function that numerically evaluates the Taylor series representation.
For example,
Compare the Taylor series with the original function:
The Taylor series is good to about
.
Check the conversion routines:
Take a look at the first few terms of the Legendre polynomial representation:
Convert the Taylor series to different representations, for example Legendre and Chebyshev:
Numerically,