MathGroup Archive 1997

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

Search the Archive

Re: Integrate product of Gaussian*Sin

  • To: mathgroup at smc.vnet.net
  • Subject: [mg6984] Re: [mg6855] Integrate product of Gaussian*Sin
  • From: Dick Zacher <dick at loc3.tandem.com>
  • Date: Thu, 1 May 1997 14:48:33 -0400 (EDT)
  • Organization: Tandem Computers
  • Sender: owner-wri-mathgroup at wolfram.com

Richard Finley wrote:
> 
> James,
> 
> I am a little confused because there is an end bracket missing in your
> equation.  I presume that you mean the integral:
> 
> Integrate[Exp[-alpha*(x-a)^2]*Sin[n Pi x/L],{x,-Infinity,Infinity}]
> 
> If this is the integral you are interested in there is no need to change
> variables because it is the integral of a product of odd and even functions
> over the real line and is therefore identically zero for all values of the
> parameters.
> 
> hope that helps.
> 
> regards,   RF
> 
> At 02:44 AM 4/24/97 -0400, [Jim] wrote:
> >Hi,
> >
> >       Can anyone suggest a good change of variables to carry out the
> >integration
> >
> >       Integrate[Exp[-alpha*(x-a)^2*Sin[n Pi x/L],{x,-Infinity,Infinity}]
> >
> >       I can't find this form in my integral tables (I'm going to check
> >the library today for a more comprehensive list, I might find a form that I
> >can convert my expression to), and Mathematica can't find a solution unless
> >I take the limits of the integral {x,-c,c}. However, treated as an improper
> >integral
> >
> >       Integrate[Exp[-alpha*(x-a)^2*Sin[n Pi x/L],{x,-c,c}]
> >       Limit[%,c->Infinity]
> >or     Limit[%,c->-Infinity]
> >
> >       Still does not give a solution, since the answer to the integral
> >(with limits {x,-c,c}) is a combination of Erf[x] and Erfi[x], and the
> >Limit[Erfi[x],x->+/- Infinity]->+/- Infinity. The Erf[x] has a limit of +/-
> >1 as x->+/- Infinity.
> >       I'm not sure if there is a solution to this, anyone with
> >Gaussian-type function experience?
> >
> >Thank you
> >Jim

First: Richard, look again.  (x-a)^2 is not an even function, so in
general the integral isn't zero.  If variable a happens to be equal to a
zero of the function Sin[n Pi x/L], then when you replace x-a with y,
the second function transforms to (+ or -) Sin[n Pi y/L], and you have a
product of an even times an odd function whose integral is zero.

Second: Jim, there is a solution if alpha is real and positive (at
least).  In this case the integrand is the product of a function
Exp[-alpha*(x-a)^2] whose integral over the real line converges
absolutely, and a bounded function
Sin[n Pi x/L]; the integral of their product must converge absolutely. 
The reason Mma has trouble with the limit is that it needs to be told
that alpha is real and positive.  The fact that the Erfi function
appeared in the integral with finite limits is a clue to this.  You can
do the following:

In[1]:=
Im[alpha]^=0;

In[2]:=
Sign[alpha]^=1;

In[3]:=
integral = 
  Simplify at Integrate[
        Exp[-alpha*(x-a)^2]*Sin[n Pi
x/L],{x,-Infinity,Infinity}]//InputForm

Out[3]//InputForm=
(Sqrt[Pi]*Sin[(a*n*Pi)/L])/
  (Sqrt[alpha]*E^((n^2*Pi^2)/(4*alpha*L^2)))

It may be worth repeating that when you want to specify that a variable
alpha is positive (or negative), a statement specifying the value of
Sign[alpha] is generally a useful way to do it.  If you specify
Sign[alpha], then both Positive[alpha] and Negative[alpha] will evaluate
to the correct values.
-- 
-----------------------------
Dick Zacher                    
Performance Engineering Dept., Tandem Computers
zacher_dick at tandem.com     phone: 408-285-5746     fax:   408-285-7079


  • Prev by Date: Mapping onto a held expression
  • Next by Date: Re: Integrate product of Gaussian*Sin
  • Previous by thread: Re: Integrate product of Gaussian*Sin
  • Next by thread: Re: Integrate product of Gaussian*Sin