Skip to main content
edited tags
Link
user21
  • 42.2k
  • 8
  • 116
  • 176
added 82 characters in body
Source Link
b3m2a1
  • 48k
  • 3
  • 98
  • 251

Bug Introduced in Version 11 or earlier and persisting through 12.0


For integer values of $n$, I was trying to calculate the convolution of $t^{-n}$ with itself. So I wrote this:

Table[Convolve[t^-n UnitStep[t], t^-n UnitStep[t], t, x], {n,5}] 

which resulted in a sequence of functions whose general form was like this: $$\frac{b_n+c_n\ln{x}}{x^{2n-1}}\text{u}(x)\qquad n=1,2,3,...$$ where $b_n\le0$ and $c_n>0$ are constant values. I couldn't find a pattern in these constants. So I tried to evaluate the general term of convolution in Mathematica. I defined f as:

f[t_,n_]:= Piecewise[{{t^-n, Element[n,Integers] && n>0 && t>0}, {0,True}}] 

and

g[x_,n_]:= Evaluate[Convolve[f[t,n],f[t,n],t,x]] 

to get: $$\frac{\text{u}(t)}{t^n}*\frac{\text{u}(t)}{t^n}=\frac{\Gamma(1-n)\sqrt{\pi}}{\Gamma(3/2-n)}\left(\frac 2t\right)^{2n-1}\text{u}(t)$$ But this doesn't add up. For example, if you write

h[t_,n_]:= (2/t)^(2n-1) Sqrt[Pi] Gamma[1-n] / Gamma[3/2-n]; Limit[h[t, n], n -> 1] 

It gives the result as $\pm\infty$, which is surely not equal to the convolution of $\frac 1t\text{u}(t)$ with itself. (It was $\frac {2\text{u}(t)}t\ln{t}$ by the way).

So the question is, what am I missing here? Why Mathematica gives two completely different results for two (seemingly) same expressions?

For integer values of $n$, I was trying to calculate the convolution of $t^{-n}$ with itself. So I wrote this:

Table[Convolve[t^-n UnitStep[t], t^-n UnitStep[t], t, x], {n,5}] 

which resulted in a sequence of functions whose general form was like this: $$\frac{b_n+c_n\ln{x}}{x^{2n-1}}\text{u}(x)\qquad n=1,2,3,...$$ where $b_n\le0$ and $c_n>0$ are constant values. I couldn't find a pattern in these constants. So I tried to evaluate the general term of convolution in Mathematica. I defined f as:

f[t_,n_]:= Piecewise[{{t^-n, Element[n,Integers] && n>0 && t>0}, {0,True}}] 

and

g[x_,n_]:= Evaluate[Convolve[f[t,n],f[t,n],t,x]] 

to get: $$\frac{\text{u}(t)}{t^n}*\frac{\text{u}(t)}{t^n}=\frac{\Gamma(1-n)\sqrt{\pi}}{\Gamma(3/2-n)}\left(\frac 2t\right)^{2n-1}\text{u}(t)$$ But this doesn't add up. For example, if you write

h[t_,n_]:= (2/t)^(2n-1) Sqrt[Pi] Gamma[1-n] / Gamma[3/2-n]; Limit[h[t, n], n -> 1] 

It gives the result as $\pm\infty$, which is surely not equal to the convolution of $\frac 1t\text{u}(t)$ with itself. (It was $\frac {2\text{u}(t)}t\ln{t}$ by the way).

So the question is, what am I missing here? Why Mathematica gives two completely different results for two (seemingly) same expressions?

Bug Introduced in Version 11 or earlier and persisting through 12.0


For integer values of $n$, I was trying to calculate the convolution of $t^{-n}$ with itself. So I wrote this:

Table[Convolve[t^-n UnitStep[t], t^-n UnitStep[t], t, x], {n,5}] 

which resulted in a sequence of functions whose general form was like this: $$\frac{b_n+c_n\ln{x}}{x^{2n-1}}\text{u}(x)\qquad n=1,2,3,...$$ where $b_n\le0$ and $c_n>0$ are constant values. I couldn't find a pattern in these constants. So I tried to evaluate the general term of convolution in Mathematica. I defined f as:

f[t_,n_]:= Piecewise[{{t^-n, Element[n,Integers] && n>0 && t>0}, {0,True}}] 

and

g[x_,n_]:= Evaluate[Convolve[f[t,n],f[t,n],t,x]] 

to get: $$\frac{\text{u}(t)}{t^n}*\frac{\text{u}(t)}{t^n}=\frac{\Gamma(1-n)\sqrt{\pi}}{\Gamma(3/2-n)}\left(\frac 2t\right)^{2n-1}\text{u}(t)$$ But this doesn't add up. For example, if you write

h[t_,n_]:= (2/t)^(2n-1) Sqrt[Pi] Gamma[1-n] / Gamma[3/2-n]; Limit[h[t, n], n -> 1] 

It gives the result as $\pm\infty$, which is surely not equal to the convolution of $\frac 1t\text{u}(t)$ with itself. (It was $\frac {2\text{u}(t)}t\ln{t}$ by the way).

So the question is, what am I missing here? Why Mathematica gives two completely different results for two (seemingly) same expressions?

edited tags
Link
edited tags
Source Link
b3m2a1
  • 48k
  • 3
  • 98
  • 251
Loading
replaced http://math.stackexchange.com/ with https://math.stackexchange.com/
Source Link
Loading
added 73 characters in body; edited tags
Source Link
polfosol
  • 964
  • 7
  • 21
Loading
Tweeted twitter.com/StackMma/status/816285259574738944
Source Link
polfosol
  • 964
  • 7
  • 21
Loading