MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: What assumptions to use to check for orthogonality

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112885] Re: What assumptions to use to check for orthogonality
  • From: Leonid Shifrin <lshifr at gmail.com>
  • Date: Tue, 5 Oct 2010 05:32:18 -0400 (EDT)

Nasser,

The m==n is a singular case for this integral.

This seems to be a tough cookie even for Reduce or FindInstance:

In[37]:=
Reduce[Exists[{m,n},0!=Integrate[Cos[n*Pi*x]*Cos[m*Pi*x],{x,0,1}]],{m,n},Integers]

Out[37]= False

In[38]:= FindInstance[0!=(m Cos[n \[Pi]] Sin[m \[Pi]]-n Cos[m \[Pi]] Sin[n
\[Pi]])/(m^2 \[Pi]-n^2 \[Pi]),{m,n},Integers]

Out[38]= {}

So, looks like you are out of luck with automated answer in this case (M7).
Regarding Reduce,
I am not sure whether this should be considered a bug or a missing feature.

Regards,
Leonid


On Mon, Oct 4, 2010 at 2:06 PM, Nasser M. Abbasi <nma at 12000.org> wrote:

> 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
>
>



  • Prev by Date: Re: What assumptions to use to check for orthogonality
  • Next by Date: Re: How to apply a list of functions
  • Previous by thread: Re: What assumptions to use to check for orthogonality
  • Next by thread: Re: What assumptions to use to check for orthogonality