Hello everyone.
I encountered the following problem, which I am not sure is a bug or simply
a annoying detail.
I will use as an example a piece of code from the mathematica tutorials.
Say I solve a system of ODEs
s = NDSolve[{x'[t] == -y[t] - x[t]^2, y'[t] == 2 x[t] - y[t]^3,
x[0] == y[0] == 1}, {x, y}, {t, 20}]
My quantity of interest could be x[t] + y[t]. I can plot it:
Plot[x[t] + y[t] /. s, {t, 0, 20}]
But say I wish to store it as a single object.
So I do (this is the kinky part):
sum = FunctionInterpolation[x[t] + y[t] /. s, {t, 0, 20}]
Now, when I plot the result, it comes out completely different. It looks
like something changed with the interpolation order or something.
Plot[sum[t], {t, 0, 20}]
What do you guys think?
Best regards,
Gabriel