Integration in Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg92123] Integration in Mathematica
- From: sigmundv at gmail.com
- Date: Sat, 20 Sep 2008 05:02:00 -0400 (EDT)
Dear group, Let f[n_]:= Sin[Pi x] Cos[Pi x] Sin[n Pi x]; We then want to integrate f[n] w.r.t. x from 0 to 1 and therefore issue the command Integrate[f[n],{x,0,1}] which yields Sin[n Pi]/((-4 + n^2) Pi) If we assume that n is an integer, the result is 0. However, for n=2, the result above is not defined but nevertheless Integrate[f[2],{x,0,1}] returns 1/4, which is correct. In fact, n=2 is the only integer for which the integral of f[n] is different from 0. This leads me to ask if Mathematica should be able to single out the case n=2 automatically, or if it at all would be able to. Of course, the result Sin[n Pi]/((-4 + n^2) Pi) should lead you to examine the case n=2 closer, but if you in advance told Mathematica to assume that n is an integer, you would just get a plain 0 as a result. What are your thoughts on the example above? Regards, Sigmund Vestergaard
- Follow-Ups:
- Re: Integration in Mathematica
- From: danl@wolfram.com
- Re: Integration in Mathematica