Skip to main content
edited body
Source Link
Me-me
  • 43
  • 4

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 ExpandPiecewise[f[xPiecewiseExpand[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?

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 ExpandPiecewise[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?

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?

Source Link
Me-me
  • 43
  • 4

Integration of a piecewise function

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 ExpandPiecewise[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?