I have a function $f(x)$ and I wrote the approximation for $f(x)$ as $f\_approx(x)$ which is a simple algebraic formula with sums and products .
I now want to study the 2 functions side by side and see :
- how much they differ on average on a given range
- if there is a coefficient that multiplied by $f\_approx(x)$ can improve the accuracy of $f\_approx(x)$ itself
- if there is a constant difference so I can just add back the gap to $f\_approx(x)$
The main problem is that I haven't really found much in Matlab, Octave and Mathematica that really tackles my problem as I wish this softwares could do and plotting doesn't help much because the current versions of the functions only diverge for some zero-point-zero-something and it's a difference that I can't really appreciate graphically when my Domain is spanning over a couple of integers .
Thanks for your help.
As an example :
$f(x) = sin(x)$
$f\_approx(x) = x-(x^3/3!)$