增加Mathematica函数插值精度/域

时间:2012-09-24 11:53:49

标签: wolfram-mathematica

我目前的问题是尝试在复杂的函数上使用FunctionInterpolation [],最容易看到的可能就是当你比较它们之间的区别时:

FunctionInterpolation[Sin[t], {t, 0, 30}]
Plot[%[t], {t, 0, 30}]

FunctionInterpolation[Sin[t], {t, 0, 1000}]
Plot[%[t], {t, 0, 30}]

通过增加函数的域,插值变得非常不准确,我正在寻找一种方法来创建一个对于任意长域具有任意高精度的FunctionInterpolation []。对于短域而言似乎是可能的,但到目前为止我还无法找到两者的解决方案。

如果不可能,为什么不呢?我不知道InterpolationFunction的形式有什么特别之处吗?

3 个答案:

答案 0 :(得分:3)

您也可以尝试包含衍生品:

FunctionInterpolation[{Sin[t], Cos[t], -Sin[t], -Cos[t]}, {t, 0, 1000}]
Plot[%[t], {t, 0, 100}]

plot

答案 1 :(得分:2)

您可以通过使用函数范围的未记录语法显然增加基础采样频率:

FunctionInterpolation[Sin[t], {t, 0, 1000, 20}]

Plot[%[t], {t, 0, 30}]

Mathematica graphics

答案 2 :(得分:2)

尝试使用大InterpolationOrder->n之类的未记录选项n,例如50

With[{func = FunctionInterpolation[Sin[t], {t, 0, 1000}]}, 
  Plot[func[x], {x, 150, 160}]
]

enter image description here

With[{func = FunctionInterpolation[Sin[t], {t, 0, 1000}, InterpolationOrder -> 50]}, 
  Plot[func[x], {x, 150, 160}]
]

enter image description here

您还可以尝试未记录的InterpolationPoints

With[{func = FunctionInterpolation[Sin[t], {t, 0, 1000}, InterpolationPoints -> 50]}, 
  Plot[func[x], {x, 150, 160}]
]

enter image description here

相关问题