Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*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 1996

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

Search the Archive

Re: is this integration possible with mathematica?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3106] Re: is this integration possible with mathematica?
  • From: Sascha at sunmail.lrz-muenchen.de, Unzicker at lrz.uni-muenchen.de
  • Date: Fri, 2 Feb 1996 03:35:09 -0500
  • Organization: Universitaet Muenchen (Germany)
  • Sender: owner-wri-mathgroup at wri.com

md88-msa at nada.kth.se (Mickael Salabasis) writes:

>i have encountered a problem in statistics that i cannot seem
>to solve without help.

>i have a line separating the xy-plane. the line is given by the
>following equation:

>f(x,y) : f1(x,y)/f2(x,y) = 1

>where 
>f1(x,y) = exp[-k* ((x-m11)^2 + (y-m12)^2)] + exp[-k*((x-m21)^2 + (y-m22)^2)]
>f2(x,y) = exp[-k* ((x-m31)^2 + (y-m32)^2)] + exp[-k*((x-m41)^2 + (y-m42)^2)]
>the m's and k are known constants

>now i want to calculate the (double) integral of f1 in the area ABOVE the
>line defined by f and respectively the integral of f2 for the area BELOWE 
>the same line. but i have problems with one of the integrals limits as the
>function f cannot be manipulated to give an expression of the type y=h(x)...

>can it be done and if so how?
>any help appreciated preferrably by email

>with best regards

>majk

I think I had a similar problem.
You should define a function which takes only 0 and 1 as values:
def[x_,y_]:=If[x<y && y>-x,1,0];
And now use NIntegrate:

gr10;
NIntegrate[Exp[-x^2-y^2] def[x,y],{x,-gr,0,gr},
{y,-gr,gr},SingularityDepth->6,MaxRecursion->6,MinRecursion->0,
GaussPoints->100]//Timing

You see, I set some options, because it is still fragile!

If somebody has a good solution, I would be interested as well!

Regards,
Alexander Unzicker
sascha at space.imp.med.uni-muenchen.de



==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: Temperature conversion
  • Next by Date: Re: is this integration possible with mathematica?
  • Previous by thread: Re: Temperature conversion
  • Next by thread: Re: is this integration possible with mathematica?