WorkingPrecision, AccuracyGoal and PrecisionGoal

*To*: mathgroup at smc.vnet.net*Subject*: [mg126605] WorkingPrecision, AccuracyGoal and PrecisionGoal*From*: "Darau, M." <M.Darau at tue.nl>*Date*: Fri, 25 May 2012 04:54:04 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com

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, Mirela