I want to integrate the real function myFun
defined on a 2D plane over the line locus
, defined as the solution of a set of equality and inequalities. For instance, let's define
myFun[x_,y_]:= Exp[-(x^2+y^2)]/\[Pi]
locus[x_,y_]:= x>0 && y==0
This is just a simplified version of the general problem, in general we may not be able to esplicitate the line locus
in a parametric form (and solve the integral, as in this case, with an appropriate substitution). Consider we can find it implicitly as the intersection of a region (defined by inequalities) with an equality (as given above).
How do I integrate myFun
over the set locus
? It should be something like
Integrate[
Exp[-(x^2 +
y^2)]/\[Pi] Ind[x,y], {x, -\[Infinity], +\[Infinity]}, {y, \
-\[Infinity], +\[Infinity]}]
with Ind[x,y]
an indicator function which restrict the integration on the correct set. This function probably involves Boole and DiracDelta function. For example, in this case it works
Integrate[
Integrate[
Exp[-(x^2 + y^2)] Boole[
x > 0] DiracDelta[
y]/\[Pi], {y, -\[Infinity], +\[Infinity]}], {x, -\[Infinity], +\
\[Infinity]}]
but it is just because we could "solve" the line locus
. (NOTE the order of the variable - if swapped it does not work.)
But what about the general case? For example, what if the 2D plane is the complex plane and I have the (not necessarily straight) line
locus[x_,y_]:= Re[(x + I y)^2+(3 + I 5)]>0 && Im[(x + I y)^2+(3 + I 5)]==0
Comments
Post a Comment