I was hoping to incorporate an If
function into a Convolve
operation, as in
Convolve[
(-E^(-2 x) + E^-x) (7 - 3 If[-E^(-2 x) + E^-x >= 0, 1, 0]) +
(-E^(-2 x) + 2 E^-x) (2 - 2 If[-E^(-2 x) + 2 E^-x >= 0, 1, 0]) +
(E^(-2 x)/4 - 2 E^-x + 1/4 (7 - 6 x + 2 x^2)) *
(3 - 2 If[E^(-2 x)/4 - 2 E^-x + 1/4 (7 - 6 x + 2 x^2) >= 0, 1, 0]) +
(150 - 100 If[(2 E^(-2 x))/5 - E^-x/2 + 1/100 (10 Cos[x] + 30 Sin[x]) >=0, 1, 0]) *
((2 E^(-2 x))/5 - E^-x/2 + 1/100 (10 Cos[x] + 30 Sin[x]))[x],
Sqrt[1/2 Pi]*Exp[-x^2/2] - 1,
x, y
]
But at each time I run the programme computer does not respond. Can you tell me if the code is correct?
I see I will try Heaviside theta function.
I mean after executing the code I waited for about 5 hours without interrupting mathematica but it did not give me any input. There was still 'Running' on the window.
If
is not a mathematical function. Try something likeHeavisideTheta
instead. Also, what do you mean "the computer does not respond"? Do you mean that Mathematica crashes? (Also, please note how I formatted your post. Please don't use $\TeX$ markup in place of code blocks.) $\endgroup$f
(the first one insideConvolve
) is not defined correctly. You have a trailing[x]
, but the head is not a function. $\endgroup$