Re: RE: Double Integral

• To: mathgroup at smc.vnet.net
• Subject: [mg29234] Re: [mg29217] RE: Double Integral
• From: BobHanlon at aol.com
• Date: Wed, 6 Jun 2001 04:24:22 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```In a message dated 2001/6/5 4:42:53 AM, Yannis.Paraskevopoulos at ubsw.com
writes:

>I'm trying to create a function that computes the following double
>integral subject to some input parameters:
>
>f[k1_,k2_,r_,t_]:=
>
>           NIntegrate[1/(2 Pi Sqrt[1-r^2])
>Exp[(x1^2-2*r*x1*x2+x2^2)/(2(1-r^2))], {x1,-Infinity, k1/Sqrt[t]},
>{x2,-  Infinity, k2/Sqrt[t]}]
>
>but I'm failing dramatically. I'm wondering if there's a way to deal
>with this?
>

Needs["Statistics`MultinormalDistribution`"];

PDF[MultinormalDistribution[{0, 0}, {{1, r}, {r, 1}}], {x1, x2}]//Simplify

E^((x1^2 - 2*r*x2*x1 + x2^2)/
(2*r^2 - 2))/(2*Pi*Sqrt[1 - r^2])

f[k1_, k2_, r_, t_] :=
CDF[MultinormalDistribution[{0, 0}, {{1, r}, {r, 1}}], {k1/Sqrt[t],
k2/Sqrt[t]}];

Plot3D[f[k1, k2, .5, 1.], {k1, -2., 2.}, {k2, -2., 2.}];

Bob Hanlon
Chantilly, VA  USA

```

• Prev by Date: Re: Double-spaced text within cell
• Next by Date: Re: Differential eqn. with interpolated coeficients
• Previous by thread: RE: Double Integral
• Next by thread: Inverse Interpolating Functions