MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

WorkingPrecision, AccuracyGoal and PrecisionGoal

Dear all,

I am using a combination of NDSolve and Findroot, and I don't know how to set the WorkingPrecision, AccuracyGoal and/or PrecisionGoal to get the optimal result. Here is part of my lines

a[o_,k_]:=Sqrt[(o-k M)^2-k^2];

rez[o_,k_?NumericQ]:= (p'[1]/.NDSolve[{p''[y]-(2 k M)/(o h-k M(1-y)) p'[y] +((o- (k M)/h (1-y))^2-k^2)p[y]==0,

                                   p[1-h]==Exp[I a[o,k](1-h)]+Exp[-I a[o,k](1-h)],

                                   p'[1-h]==I a[o,k](Exp[I a[o,k](1-h)]-Exp[-I a[o,k](1-h)])},p,{y,1-h,1},PrecisionGoal->Infinity])[[1]]

FindRoot[rez[1/2,k]==0, {k, -1/2/(1-M)}]

where M=1/2 and h=1/100.

If I require a certain WorkingPrecision in Findroot, do I have to use the same inside the NDSolve?

Thanks a lot,


  • Prev by Date: Re: Comparing terms of expression with Implied sum over indices
  • Next by Date: how to compute mass data?
  • Previous by thread: Is Histogram Equalization still supported?
  • Next by thread: how to compute mass data?