I have a problem to dinstinguish the following two mathematica codes, the only difference is the first use FullSimplify and the second is Simplify. but the results are totally different. what is wrong, is it a bug or not ? I really cannot figure it out
first codes are
f = WaveletPsi[MorletWavelet[], x];
g = FourierTransform[f, x, y, FourierParameters -> {0, -2 Pi}] // FullSimplify;
Plot[g, {y, -3, 3}, PlotRange -> All]
the output figure is
the second codes are
f = WaveletPsi[MorletWavelet[], x];
g = FourierTransform[f, x, y, FourierParameters -> {0, -2 Pi}] // Simplify;
Plot[g, {y, -3, 3}, PlotRange -> All]
Why is there so big difference of the output figures? I just modify the first codes from FullSimplify to Simplify !
anyone understand it ? Is it bug or not ?
I,due to low reputation, cannot post the formula about difference between the output formula with FullSimplify and Simplify: Ok, now I can post the formula:
anyone understand it ? Thanks.
thank you very mcuh, everyone, to give the advice. by the way, how can I acknowledge your contributions ?
thanks to the firends below, I have found the hints for this problem. this is due to the floating point error in numerical calculation inlcuding substractive cancellation, loss of significance, etc. In In usual cases, the default precision may deal with these erros well, however, for diverging term, the default precision may not handle it. so increasing precision may solve it. or by changing algrithom, like what Submit has done, may also handle it without changing precision. well, thank you !
Simplify
andFullSimplify
? $\endgroup$WorkingPrecision -> $MachinePrecision
to the Plot after Simplify, and see if anything changes. $\endgroup$Simplify[]
, you have a result composed of adding and subtracting a bunch of $\cosh$ and $\sinh$ terms, which get big pretty quick, to get a result that is not very big. It's a recipe for screw-ups. Stick withFullSimplify[]
. $\endgroup$