I need to generate a table of Chebyshev expansion coefficients of trigonometric functions (in this case Cos[2 Pi t] to very high accuracy. Code is:
ClearAll["Global`*"]
m = 4;
f[t] = Cos[2 Pi t];
Tn[t] = ChebyshevT[j, 2*t - 1];
wt[t] = 1/Sqrt[t - t^2];
p = Table[
NIntegrate[f[t]*Tn[t]*wt[t], {t, 0, 1}]/(Pi/2.0), {j, 0, m - 1}];
p[[1]] = p[[1]]/2;
p
Where f[t] is the trigonometric function, Tn[t], is the shifted Chebyshev polynomial, w[t] is the weight function. How can I increase the precision of this numerical integration?
I apologize if this is a duplicate, but I've read dozens of past questions dealing with $MinPrecision, $MinAccuracy, PrecisionGoal, WorkingPrecision, etc. and I've been unable to increase the precision. I'm stuck at machine precision still!
2.0
converts the result to machine precision regardless of whatNIntegrate
does..WorkingPrecision -> 20 , PrecisionGoal -> 20
should do what you want if you make that an integer2
$\endgroup$N
. $\endgroup$