Define
f[x_, i_] := Piecewise[{{1/n,
0 < x < (i - 1)/n}, {(i/n - x), (i - 1)/n < x < i/n} , {0,
i/n < x}} ];
I would like to compute
Integrate[f[x,i]*f[y,i]*f[x,j]*f[y,j],{x,0,1},{y,0,1}],
assuming that $n$, $i$ and $j$ are natural numbers and $1\leq j\leq i\leq n$. So far, I have try to use PiecewiseExpand[f[x,i]*f[y,i]*f[x,j]*f[y,j]]
and split the integral in different ways. However, it takes forever the computation of the double integral. Do you have any advice to proceed?
n
as constant and go about the integration as inIntegrate[Piecewise[{{ x, 0 <= x < a}, {a, x >= a}}],x]
? $\endgroup$f[x_, i_,n_] := Piecewise[{{1/n, 0 < x < (i - 1)/n}, {(i/n - x), (i - 1)/n < x < i/n} , {0, i/n < x}} ];
but it did not shown any improvement. $\endgroup$