I'm defining functions
e[k_, t_] := Cos[Pi (k - 1) t] cosIntRaw[k_, l_, m_] := Integrate[e[k, t] e[l, t] e[m, t], {t, 0, 1}] cosInt[k_, l_, m_] := Assuming[Element[{k, l, m}, Integers], Refine[cosIntRaw[k, l, m]]]
The value that Mathematica gives me for cosInt[k,l,m]
is 0
.
But explicitly evaluating cosInt[1, 1, 1]
, I get 1
. In fact, for any given value of m
, the number of nonzero elements in the n
$\times$n
matrix whose [k,l]
element is cosInt[k,l,m]
grows linearly in n
, said matrix having a nice banded structure.
Any idea why Mathematica gives me 0
for cosInt[k,l,m]
?
Thank you!