Bug introduced in 9.0 and persisting through 11.0.1 or later
I would like to convolute the inverse square root on the interval [0,inf]
with a Gaussian function, like so:
f[x_] := 1/Sqrt[x]
g[x_, sigma_] := Exp[-x^2/(2 sigma^2)]
conv[x_, sigma_] := Integrate[f[y] g[x - y, sigma], {y, 0, \[Infinity]}, Assumptions -> {sigma > 0}]
conv[x,sigma]
The result from Mathematica (9) reads
Exp[-x^2/(4 sigma^2)] Sqrt[-x] BesselK[1/4, x^2/(4 sigma^2)]/Sqrt[2]
which is purely imaginary for x>0
.
This is certainly not the answer to the question I had in mind, which should be a positive real-valued function for all real-valued x (correct?).
Please tell me what is going wrong and (if possible) what I need to change to get the result I am looking for.
P.S. Adding assumptions like x>0
also doesn't seem to help (it simply will replace Sqrt[-x]
by I Sqrt[x]
).
n>0
needs to be removed, then it seems to provide the correct result also here. $\endgroup$ – leopold.talirz Aug 12 '14 at 16:45x^e
instead of1/Sqrt[x]
, specify e>-1, and substitutee->-1/2
at the end, you might get a more reliable result (at least it worked for a simpler case that has the same problem). $\endgroup$ – Daniel Lichtblau Aug 12 '14 at 19:31