1

If I do Integrate[Exp[I*omega*t],t], it gives me $\frac{1}{\omega} e^{i \omega t}$, as expected in most of the cases, except when $\omega$ is 0.

Mathematica seems to assume, without any input from me (other than Element[omega, Reals], that $\omega$ is non zero.

Is there a way to get a more general integral, also valid in the case $\omega = 0$, or should I handle such cases on my own?

Thanks

EDIT: In my specific case, I have some function, let's say Sin[a * Exp[I*omega_a*t] * Sin[b * Exp[I*omega_b*t]] which I expand in powers of $a$ and $b$ up to some orders. Then, I have multiple terms oscillating at sums and differences of frequencies $\omega_a$ and $\omega_b$ and I am looking at the mean value (over time) of this expansion, depending on the values of $\omega_a$ and $\omega_b$. Then, Integrate being able to deal with such edge cases would directly give me the result.

Phyks
  • 23
  • 3
  • You should handle these cases manually. Special cases that arise only for a single value (as opposed to a range, such as an inequality in assumptions) aren't usually considered by these functions. There were multiple posts about this before, and I'll try to find them (but no promises that I can). – Szabolcs Feb 04 '16 at 09:37
  • Thanks for the links, I did not manage to find them at first… I am having a sum of several exponentials such as the one in my question, with various $\omega$ expressed as sums of other frequencies in my system. Then, I guess I have to double check every term manually to eliminate the edge cases, right? – Phyks Feb 04 '16 at 12:50
  • Can you substitute the $\omega$ values before doing the integration? Then the problem would go away. – Szabolcs Feb 04 '16 at 13:15
  • This question was phrased in a very general way, so I think closing it as duplicate was OK. But after reading the information in the link you still don't have a solution you are satisfied with, then you may want to post a separate question where you describe the specific details of your problem. There may be a solution which is not at all general but works well for the specific application you have. It may involve writing manual integration rules, which can be easy for simple cases (and very difficult otherwise). – Szabolcs Feb 04 '16 at 13:30
  • OK, I didn't see your update when I wrote my last comment. – Szabolcs Feb 04 '16 at 13:30
  • I edited the question to provide more infos, as it is difficult for me to do it before the integration. I can provide extra infos if my goal is unclear. Thanks! – Phyks Feb 04 '16 at 13:30
  • Also, consider using the option, GenerateConditions -> True to identify special cases. – bbgodfrey Feb 04 '16 at 15:17
  • @bbgodfrey I did not know about this option, and gave it a try. However, in this particular case of Integrate, it did not change anything =( – Phyks Feb 04 '16 at 15:32
  • @Phyks Could we approach it like this? Expand the result so we get a linear combination of exponentials. Each exponential has I t times a linear combination of $\omega_a$ and $\omega_b$. We are really only interested in which of these are zero. We can try to do it using careful pattern matching instead of integration. What do you think? Before trying to write an answer about that, can you (semi-)manually work out a very small example, to make sure there's no misunderstanding? – Szabolcs Feb 05 '16 at 17:50
  • Not sure why I cannot answer this question, so will post another comment. Thanks @Szabolcs for the idea! Actually, as I had something like 45k terms to analyze, it was faster to do it this way. But instead of using pattern-matching, I just did integration and looked at the poles of the resulting function. – Phyks Feb 08 '16 at 09:49
  • @Phyks So you have a solution for your special use case? Would you be willing to post it if the question gets reopened? – Szabolcs Feb 08 '16 at 10:32
  • Hmm, my code is too much taylored to my specific use case to be really useful to anybody else I guess. However, the global idea is to perform integration of your sum of exponentials. Then, set the argument of the exponentials to zero, to get a sum of inverse of frequencies (up to some multiplicative factors). Looking at the poles of this function gives you the conditions on the frequencies you are looking for. – Phyks Feb 09 '16 at 16:36

0 Answers0