Re: Condition Generation in Integrate

*To*: mathgroup at smc.vnet.net*Subject*: [mg126456] Re: Condition Generation in Integrate*From*: danl at wolfram.com*Date*: Sat, 12 May 2012 04:52:26 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*References*: <joi3ok$n53$1@smc.vnet.net>

On Thursday, May 10, 2012 11:15:16 PM UTC-5, Michael Musheghian wrote: > Greetings! > > Integrate[ > Cos[\[Pi] x]^2*Sin[\[Pi] x (m + 1)]*Sin[\[Pi] x (n + 1)], {x, 0, 1}] > > When I evaluate this I get an answer, however, there are some special cases (for example, m & n are both integers and m == n+2)in which this integral must yield different result. My question is, why doesn't it take in consideration all cases and doesn't generate conditional expressions? > > Thank you. You might do as below. i[m_, n_] = Integrate[ Cos[\[Pi] x]^2*Sin[\[Pi] x (m + 1)]*Sin[\[Pi] x (n + 1)], {x, 0, 1}, Assumptions -> Element[{m, n}, Reals]] To evaluate at integers you can fix one value and take a limit in the other. In[382]:= Limit[i[1, n], n -> 3] Out[382]= 1/8 There has been past discussion in this forum on why Integrate will not generate conditions involving parameter integrality, and will generally not do much with assumptions of that sort either. It boils down to measure zero cases that will either get missed or messed up using technology currently available. I believe it will remain thus for the foreseeable future. Daniel Lichtblau Wolfram Research