I am trying to confirm that a function $f$ satisfies a particular differential equation of the type $D f=0$, for some differential operator $D$. I set $Df$ as Diffeq
in Mathematica and I tried to check if it gives zero for any numerical value of the variables that $f$ depends on. I wrote
N[Difeqx /. x -> 3/4 /. y -> 1/5 , 500]
I got the following:
"N::meprec: Internal precision limit $MaxExtraPrecision = 50.` reached while evaluating [the function]
Out[1]=-1.214057*10^-613 -
6.579195*10^-614 I ".
I then used
Block[{$MaxExtraPrecision = 550}, N[Difeqx /. x -> 3/4 /. y -> 1/5, 500]]
and I got back
"N::meprec: Internal precision limit $MaxExtraPrecision = 550.` reached while evaluating [the function]
Out[2]= 4.131621*10^-1089 +
2.022562*10^-1089 I "
The numerical result changes (and becomes smaller for this particular case) as I increase the MaxExtraPrecision.
The question:
From the different numerical results I get, I can conclude with some uncertainty that indeed $Df=0$ (or Difeq=0) is satisfied. But, can I make it more precise? How can I be more sure that it indeed gives zero?
P.S. I don't think that Chop
, which returns zero, makes it any more sure that the result is precisely zero.
f
and the differential equation with us. Moreover, your actual question doesn't have anything to do with the title of your question: Even if there were no error message, you would perform "only" some numerical testing which would not be a strict mathematical proof; the only difference would be that you would just feel more secure because no error or warning message pops up. $\endgroup$PossibleZeroQ
-- To give a Tolstoyan echo of @Henrik's comment, every unhappy numerical code is unhappy in its own way. (That is to say, without the code, it's hard to give an answer.) $\endgroup$$MaxExtraPrecision
is a system parameter that you are changing; it changes the computational environment, and for a numerically troublesome computation, I would expect it to make a difference -- indeed, I'd expect just what you are seeing if the answer should be zero. Of course, it's always possible that the true value is10^-40000
or some other nonzero value. (2) The numbers are both close to zero; relative error is not the way to measure closeness to zero. $\endgroup$