Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to evaluate the following integral, it runs for a much longer time than I think is should without producing a result. What might be the problem? Can anybody please point it out?

h[s_, t_] := HeavisideTheta[s] HeavisideTheta[t - s]
Integrate[Abs[(b*(1 - e^((-b)*s)))/b - h[s, t]], {s, 0, Infinity}]
share|improve this question

closed as too localized by Jens, m_goldberg, Dr. belisarius, István Zachar, Simon Woods Apr 8 '13 at 8:35

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Granting the beginner's mistake of confusing e with E (not really the culprit here), let's look at your integrand:

Simplify[Abs[(b*(1 - e^((-b)*s)))/b - h[s, t]]]

(* ==> Abs[1 - e^(-b s) - HeavisideTheta[s] HeavisideTheta[-s + t]] *)

it becomes clear that the integral over $s$ to $\infty$ is not convergent for $b\neq 0$. So you should go back and check your math. When you encounter such integration problems, it's a good idea to test the expression for some reasonable numerical choice of the parameters (b and t in particular)!

In this case you perhaps confused multiplication by the HeavysideTheta terms with subtraction.

Because I'm guessing that this is a math error on the user end, I'm proposing to close this question as too localized.

share|improve this answer
It may still be good to have an answer here, since people who encounter similar problems should be encouraged to do some sanity checking before posting to StackExchange... – Jens Apr 8 '13 at 3:55
well, thank you for your response, but i evaluated the integral by hand too, and there is no problem, it is convergent. I am trying to find out what is wrong with the mathematica code. I am correcting e -> E, however, i am not following your comment on heavisidetheta – No Leaf Clover Apr 8 '13 at 4:09
@jens Are you sure about convergence? I'm not on my pc so can't check this, but I believe the integral converges for positive b. – Sjoerd C. de Vries Apr 8 '13 at 5:26
@SjoerdC.deVries The integrand goes to 1 outside the unit box, so it doesn't converge. – Jens Apr 8 '13 at 5:52
@NoLeafClover Of course I can't really guess what your goal is. But the step functions have no effect for s > t, and the remaining terms don't go to zero, so the infinite integral goes to infinity. – Jens Apr 8 '13 at 6:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.