# Preconditioning the objective function of NIntegrate for higher PrecisionGoal

By default, NIntegrate works with MachinePrecision and its PrecisionGoal is set to Automatic which is effectively a value near 6:

In[1]:= Options[NIntegrate, {WorkingPrecision, PrecisionGoal}]

Out[1]= {WorkingPrecision -> MachinePrecision, PrecisionGoal -> Automatic}


I need sufficiently higher accuracy when computing the integrals similar to this one:

dpdA[i_] := NIntegrate[
Cos[φ] Cos[i*φ] Exp[Sum[-Cos[j*φ], {j, 11}]], {φ, 0, Pi},
Method -> {Automatic, "SymbolicProcessing" -> None}]


The integral cannot be taken symbolically, so "SymbolicProcessing" is off.

Actually I need to compute such integrals thousands of times during an optimization procedure in order to find best coefficients a[j] under the summation:

dpdA[i_] :=
NIntegrate[Cos[φ] Cos[i φ] Exp[Sum[(-a[j]) Cos[j φ], {j, 11}]], {φ, 0, Pi},
Method -> {Automatic, "SymbolicProcessing" -> None}]


Is there a way to precondition this integral in order to make integration with high WorkingPrecision faster? Perhaps using ExperimentalNumericalFunction?

The problem is that when I increase PrecisionGoal to 15 and consequently WorkingPrecision to a value higher than MachinePrecision I get very low performance.

-

-