Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Integral?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14131] Re: Integral?
  • From: Daniel Lichtblau <danl>
  • Date: Mon, 28 Sep 1998 03:51:46 -0400
  • Organization: Wolfram Research, Inc.
  • References: <6ud2f0$17f@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Torben Mikael Hansen wrote:
> 
> Hi
> How do I make Mathematica perform the double integral
> Integrate[Integrate[Exp[x]*Exp[y]*p[x,y],{x,-Infinity,Infinity}],{y,-Infinity,Infinity}]
> 
> where
> p[x_,y_]:=1/(2 Pi s^2 Sqrt[1-r^2])*Exp[-(x^2-2 r s x y +y^2)/(2 s^2
> (1-r^2))]
> and I know
> r is a real, positive number less than 1 s is a real, positive number
> 
> 
> Regards
> Torben M. Hansen


I cannot make the current version of Mathematica do this integral.

If in our development version I do

p[x,y] = 1/(2*Pi*s^2*Sqrt[1-r^2])*
	Exp[-(x^2-2*r*s*x*y+y^2)/(2*s^2*(1-r^2))]; igrand =
Exp[x]*Exp[y]*p[x,y];

then I can get an undersimplified result as below.

In[6]:= InputForm[Timing[Integrate[igrand, {x,-Infinity,Infinity},
        {y,-Infinity,Infinity},
        Assumptions->{r>0,r<1,s>0}]]]

Out[6]//InputForm=
{9.010000000000005*Second, E^(((-1 + r^2)*s^2)/(-1 + r*s))/
  (Sqrt[2*Pi]*Sqrt[1 - r^2]*s^2*Sqrt[(-1 + r^2*s^2)/((-1 + r^2)*s^2)]*
   Sqrt[(2*Pi*s^2 - 2*Pi*r^2*s^2)^(-1)])}

Further simplification yields

E^(((-1 + r^2)*s^2)/(-1 + r*s))/
  Sqrt[(-1 + r^2*s^2)/(-1 + r^2)]

which does not agree with your given result. A numerical integration
with particular values for r,s leads me to believe the Mathematica
result is correct. In the lines below, 'ss' is the name I gave to the
symbolic result.

In[22]:= Exp[(r+1)*s^2] /. {r->.2, s->1.2}

Out[22]= 5.62938

In[23]:= ss /. {r->.2, s->1.2}

Out[23]= 6.22267

In[24]:= Timing[NIntegrate[igrand /. {r->.2, s->1.2},
{x,-Infinity,Infinity},
        {y,-Infinity,Infinity}]]

Out[24]= {25.14 Second, 6.22267}


Daniel Lichtblau
Wolfram Research


  • Prev by Date: Nonlinear Differential Equation
  • Next by Date: Re: Field of Functions
  • Previous by thread: Integral?
  • Next by thread: Re: Integral?