Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.
der[x_]:=Piecewise[{{E^((-4 - 4*x - x^2 - Log[2]^2)/8)/(2^(x/4)*Sqrt[Pi]*(2*Sqrt[2/E]*Erf[Log[2]/(2*Sqrt[2])] + Erfc[(-2 + Log[2])/(2*Sqrt[2])] + 2*Erfc[(2 + Log[2])/(2*Sqrt[2])])), x >= 0}}, (2^(x/4)*E^((-4 - 4*x - x^2 - Log[2]^2)/8))/(Sqrt[Pi]*(2*Sqrt[2/E]*Erf[Log[2]/(2*Sqrt[2])] + Erfc[(-2 + Log[2])/(2*Sqrt[2])] + 2*Erfc[(2 + Log[2])/(2*Sqrt[2])]))]

pdf[x_]:=0.2015152271993863*DiracDelta[x] + Piecewise[{{E^((-4 - 4*x - x^2 - Log[2]^2)/8)/(2^(x/4)*Sqrt[Pi]*(2*Sqrt[2/E]*Erf[Log[2]/(2*Sqrt[2])] + Erfc[(-2 + Log[2])/(2*Sqrt[2])] + 2*Erfc[(2 + Log[2])/(2*Sqrt[2])])), x >= 0}}, (2^(x/4)*E^((-4 - 4*x - x^2 - Log[2]^2)/8))/(Sqrt[Pi]*(2*Sqrt[2/E]*Erf[Log[2]/(2*Sqrt[2])] + Erfc[(-2 + Log[2])/(2*Sqrt[2])] + 2*Erfc[(2 + Log[2])/(2*Sqrt[2])]))]

N[Integrate[der[x], {x, -Infinity, Infinity}]]
0.798485
N[Integrate[0.2015152271993863` DiracDelta[x], {x, -Infinity, Infinity}]]
0.201515
N[Integrate[pdf[x], {x, -Infinity, Infinity}]]
0.798485

EDIT (code part related to convolution)

Integrate[pdf[x - w] pdf[w], {w, -2, 2}, Assumptions -> x ∈ Reals && x ∈ Reals]

the last convolution involves a dirac delta as well as a continuous density. Both version 7 and 9 doesnt produce any solutions. Do you have any ideas to get a solution?

share|improve this question
    
FWIW no problems with V8 –  Mike Honeychurch Oct 18 '13 at 22:13
    
What did you expect? Have you read this? –  Hector Oct 18 '13 at 22:13
    
the last integral which is over $pdf[x]$ should give me $1$. Because it is the summation of the first two integrals!! It was $1$ with version $9$. I am surprised now. –  Seyhmus Güngören Oct 18 '13 at 22:15
    
@Hector thanks for the info. I only wanted to share if there was a problem and if people use it (version 7). It is good to know. –  Seyhmus Güngören Oct 18 '13 at 22:17
    
OK, I got 1 with version 9.0.1. –  Hector Oct 18 '13 at 22:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.