The following seems to do what you want. (You might wanna remove the Print
line at some point.)
Clear[MyNIntegrate];
Options[MyNIntegrate] = Options[NIntegrate];
MyNIntegrate[int_, args___] :=
Block[{ranges, opts},
opts = Cases[{args}, _Rule];
ranges = Complement[{args}, opts];
If[FreeQ[opts, AccuracyGoal -> _], opts = Append[opts, AccuracyGoal -> 10]];
If[FreeQ[opts, PrecisionGoal -> _], opts = Append[opts, PrecisionGoal -> 10]];
If[FreeQ[opts, WorkingPrecision -> _],
opts =
Append[opts,
WorkingPrecision -> 3*Max[AccuracyGoal /. opts, PrecisionGoal /. opts]]
];
Print[opts];
NIntegrate[int, Evaluate[Sequence @@ ranges], Evaluate[opts]]
];
MyNIntegrate[1/Sqrt[x + y], {x, 0, 1}, {y, 0, 1},
PrecisionGoal -> 20,
Method -> {"GlobalAdaptive", Method -> "ClenshawCurtisRule"},
MaxRecursion -> 20]
(*During evaluation of In[173]:= {PrecisionGoal->20,Method->{GlobalAdaptive,Method->ClenshawCurtisRule},MaxRecursion->20,AccuracyGoal->10,WorkingPrecision->60}*)
(* 1.10456949966230204653590120649568830997449857498155244452310 *)
MyNIntegrate[1/Sqrt[x + y], {x, 0, 1}, {y, 0, 1},
PrecisionGoal -> 12, WorkingPrecision -> MachinePrecision,
Method -> {"GlobalAdaptive", Method -> "ClenshawCurtisRule"},
MinRecursion -> 3, MaxRecursion -> 20]
(* During evaluation of In[175]:= {PrecisionGoal->12,WorkingPrecision->MachinePrecision,Method->{GlobalAdaptive,Method->ClenshawCurtisRule},MinRecursion->3,MaxRecursion->20,AccuracyGoal->10} *)
(* 1.10457 *)
```