I'm trying to solve self-consistent equations of the form
RecurrenceTable[{d[n] == NIntegrate[(d[n - 1]/Sqrt[((1/3) + (2/9) (Cos[kx] + Cos[(kx + Sqrt[3] ky)/2] + Cos[(kx - Sqrt[3] ky)/2]))^2 + d[n - 1]^2]), {kx,0,4}, {ky,0,4}], d[0] == 1}, d, {n, 1, 10}]
However the above expression, when evaluated, produces the following error:
and the output:
{NIntegrate[d[(1 + 0) - 1]/
Sqrt[(1/3 +
2/9 (Cos[kx] + Cos[(kx + Compile`$53) Compile`$56] +
Cos[(kx - Compile`$53) Compile`$56]))^2 +
d[(1 + 0) - 1]^2], {kx, 0, 4}, {ky, 0, 4}],
NIntegrate[d[(1 + 1) - 1]/
Sqrt[(1/3 +
2/9 (Cos[kx] + Cos[(kx + Compile`$53) Compile`$56] +
Cos[(kx - Compile`$53) Compile`$56]))^2 +
d[(1 + 1) - 1]^2], {kx, 0, 4}, {ky, 0, 4}]}
Any help would be greatly appreciated, thank you!
RecurrenceTable
butd[0]=1; d[n_]:=d[n]=NIntegrate[d[n-1]/Sqrt[(1/3 +2/9(Cos[kx]+Cos[(kx+Sqrt[3] ky)/2]+Cos[(kx-Sqrt[3]ky)/2]))^2+d[n-1]^2],{kx,0,4},{ky,0,4}]; Table[d[i],{i,1,10}]
instantly gives you your table of results without any errors. $\endgroup$ – Bill Mar 18 '20 at 4:49