What assumptions to use to check for orthogonality under integration?
- To: mathgroup at smc.vnet.net
- Subject: [mg112868] What assumptions to use to check for orthogonality under integration?
- From: "Nasser M. Abbasi" <nma at 12000.org>
- Date: Mon, 4 Oct 2010 06:06:03 -0400 (EDT)
- Reply-to: nma at 12000.org
This is basic thing, and I remember doing this or reading about it before. I am trying to show that Cos[m Pi x], Cos[n Pi x] are orthogonal functions, m,n are integers, i.e. using the inner product definition Integrate[Cos[n*Pi*x]*Cos[m*Pi*x], {x, 0, 1}]; So, the above is ZERO when n not equal to m and 1/2 when n=m. hence orthogonal functions. This is what I tried: ------ case 1 ------------- Clear[n, m, x] r = Integrate[Cos[n*Pi*x]*Cos[m*Pi*x], {x, 0, 1}]; Assuming[Element[{n, m}, Integers], Simplify[r]] Out[167]= 0 ---------------- I was expecting to get a result with conditional on it using Piecewise notation. Then I tried ---------case 2 ------------ Clear[n, m, x] r = Integrate[Cos[n*Pi*x]*Cos[m*Pi*x], {x, 0, 1}]; Assuming[Element[{n, m}, Integers] && n != m, Simplify[r]] Out[140]= 0 Assuming[Element[{n, m}, Integers] && n == m, Simplify[r]] Out[184]= Indeterminate ---------------- So, it looks like one has to do the limit by 'hand' to see that for n=m we get non-zero? ------------------- Clear[n, m, x] r = Integrate[Cos[n*Pi*x]*Cos[m*Pi*x], {x, 0, 1}]; Limit[Limit[r, n -> m], m -> 1] Out[155]= 1/2 Limit[Limit[r, n -> 1], m -> 99] Out[187]= 0 ---------------------------- So, is there a way to get Mathematica to tell me that the integral is zero for m!=n and 1/2 when n=m? (tried Reduce, Refine). It seems the problem is that the Integrate is not taking the limit automatically to determine what happens when n=m? Should it at least in case have told me that when n!=m it is zero, and when n=m it is Indeterminate? It just said zero which is not correct when n=m and I did say n,m are integers. thanks --Nasser