Skip to main content
4 of 4
added and deleted tag
bbgodfrey
  • 62.1k
  • 18
  • 92
  • 160

How to speed this process up?

Clear[Hmp$, "*Hmp*", m, n, p, Nmax, "ψ*"]
Nmax = 10.; (*want 80*)
Hmp = Table[0, {p, Nmax}, {m, Nmax}];

Chop[ReplacePart[Hmp, {m_, p_} :> (p^2 π^2)/2 KroneckerDelta[m, p] + 
  2 Integrate[Sin[m π χ] Sin[p π χ] V[χ], {χ, 0, 1}]]]
Jacob
  • 11
  • 1