I want to calculate the integral defined as $$ P(s)=\iint \mathrm dx \, \mathrm dy\ \ \delta\left(\frac{(x+y)^2+4x^2y^2}{(x+y)^2+(x+y)^4}-s \right). $$ The integration is taken within the rectangle $-a\le x,y\le a$. All I know is that $P(0)=0$. Is it possible to explicitly carry out this integral?
-
1$\begingroup$ @SamHopkins. Maybe my question is somehow misleading. Actually, I want to compute the statistics of the function $f(x,y)$ mentioned in my question, and $x,y\in [-a,a]$ are uniformly distributed random numbers. If the integral in my question denotes indeed the statistics of $f(x,y)$ (please help me to check that), then it should not be zero for all $s$. $\endgroup$– GuoqingCommented Jul 26, 2023 at 2:09
-
3$\begingroup$ In principle, it's clear what to do - the $\delta $-distribution integrated over one of the variables, say $x$, will give contributions at all the zeros of the argument of the $\delta $-distribution as a function of $x$, and then the integral over $y$ is a standard integral yielding, in general, a finite result. The trouble is, the expressions for the aforementioned zeros are extremely ugly and I'm not going to attempt to write anything explicitly. Numerical evaluation seems more promising. $\endgroup$– Michael EngelhardtCommented Jul 26, 2023 at 3:50
-
1$\begingroup$ The function is linear (its derivative is constant) and vanishes for $s\leq 0$. $\endgroup$– terceiraCommented Jul 26, 2023 at 11:22
-
$\begingroup$ @terceira Sure, you have $P(s)=0$ for $s<0$. $\endgroup$– GuoqingCommented Jul 27, 2023 at 1:08
-
$\begingroup$ Well how many linear functions on the line do you know which vanish on the negative axis? $\endgroup$– terceiraCommented Jul 27, 2023 at 5:11
2 Answers
Let's see how far we can get with the original problem. First, note that, since $x^2 y^2= \frac{1}{16} [(x+y)^4 + (x-y)^4 -2 (x+y)^2 (x-y)^2]$, the integrand is symmetric under reflections with respect to the $y=x$ axis and the $y=-x$ axis. Therefore, we can restrict the integration to the region $x+y \geq 0$, $x-y \leq 0$ (the remaining edge being the one at $y=a$), and just multiply the result by 4. Now, use the substitution suggested by @Guoqing, $$ p=x+y\ , \hspace{2cm} q=\left( \frac{1}{x} +\frac{1}{y} \right)^{-1} $$ which inverts to $$ x=\frac{p}{2} - \sqrt{\frac{p^2 }{4} -pq} \, \hspace{2cm} y=\frac{p}{2} + \sqrt{\frac{p^2 }{4} -pq} $$ (note our choice of integration region, $x\leq y$, makes the signs of the roots unique). Under this transformation, in the argument of the $\delta $-function, $$ \frac{(x+y)^2 +4x^2 y^2 }{(x+y)^2+ (x+y)^4 } = \frac{1+4q^2 }{1+p^2 } $$ and the Jacobian is $$ \left| \frac{\partial (x,y)}{\partial (p,q)} \right| = \frac{p}{2} \frac{1}{\sqrt{\frac{p^2 }{4} -pq} } $$ We elect to perform the integration over $q$ first. At any given, fixed $p=x+y$, the $q$-integration extends from the edge at $y=a$, from $x=p-a$, to the $x=y$ axis, at $x=y=\frac{p}{2} $. In terms of $q$, that is from $q=a-\frac{a^2 }{p} $ to $q=\frac{p}{4} $. The subsequent integration over $p$ extends from $p=0$ to $p=2a$.
The $\delta $-function yields contributions when $$ \frac{1+4q^2 }{1+p^2 } = s \ \ \ \Longrightarrow \ \ \ q=\pm \frac{1}{2} \sqrt{s(1+p^2 ) -1} $$ In particular, therefore, there are no contributions unless $s(1+p^2) \geq 1$. Thus, the $\delta $-function can be expressed as \begin{eqnarray} \delta \left( \frac{1+4q^2 }{1+p^2 } -s \right) &=& \theta \left(s(1+p^2 ) -1\right) \ \frac{1+p^2}{8} \frac{1}{\frac{1}{2} \sqrt{s(1+p^2 ) -1} } \cdot \\ & & \left( \delta \left( q+\frac{1}{2} \sqrt{s(1+p^2 ) -1} \right) + \delta \left( q-\frac{1}{2} \sqrt{s(1+p^2 ) -1} \right) \right) \end{eqnarray} Carrying out the integration over $q$, extending over $a-\frac{a^2 }{p} \leq q \leq \frac{p}{4} $, we thus obtain \begin{eqnarray} P(s) &=& 4\int_{0}^{2a} dp\ \ \theta \! \left(s(1+p^2 ) -1\right) \ \frac{(1+p^2)p}{8\sqrt{s(1+p^2 ) -1} } \cdot \\ & & \left[ \frac{1}{\sqrt{\frac{p^2}{4} + \frac{p}{2} \sqrt{s(1+p^2 ) -1} } } \theta \left( -\frac{1}{2} \sqrt{s(1+p^2 ) -1} -a +\frac{a^2 }{p} \right) \right. \\ & & \left. + \frac{1}{\sqrt{\frac{p^2}{4} - \frac{p}{2} \sqrt{s(1+p^2 ) -1} } } \theta \left( \frac{1}{2} \sqrt{s(1+p^2 ) -1} -a +\frac{a^2 }{p} \right) \theta \left( \frac{p}{4} -\frac{1}{2} \sqrt{s(1+p^2 ) -1} \right) \right] \end{eqnarray} A closed form for the $p$-integral does not seem immediately apparent, but a numerical integration offers itself.
Certainly, this result confirms the statement $P(0)=0$. In fact, $P(s)$ remains zero at least until $s=\frac{1}{1+4a^2 } $, when the upper limit of the $p$-integration comes within the range compatible with the condition $s(1+p^2 ) \geq 1$. The additional step functions in the final expression extend the range in which $P(s)$ remains zero even somewhat beyond the aforementioned bound.
-
$\begingroup$ Nice answer! Can I cite your answer in my paper? $\endgroup$– GuoqingCommented Aug 1, 2023 at 2:49
-
1$\begingroup$ @Guoqing - certainly, you can cite my answer. Or just put an acknowledgment. As you prefer. I'm happy that this was useful and would be interested in a pointer to your paper when it is finished. $\endgroup$ Commented Aug 1, 2023 at 4:32
This is only the solution of a toy problem to illustrate how ugly this gets - much too long for a comment.
I'll consider $$ \int_{-a}^{a} dy\int_{-a}^{a} dx\, \delta (x^2 +y^2 -s) $$ Focusing on the integration over $x$ first, we have $$ \delta (x^2 +y^2 -s) = \frac{1}{2\sqrt{s-y^2 } } \theta (s) \theta (s-y^2 ) \left(\delta \left(x-\sqrt{s-y^2 } \right) + \delta \left(x+\sqrt{s-y^2 } \right) \right) $$ (where $\theta $ denotes the step function), and therefore $$ \int_{-a}^{a} dx\, \delta (x^2 +y^2 -s) = \frac{1}{2\sqrt{s-y^2 } } \theta (s) \theta (s-y^2 ) \left(\theta \left(a-\sqrt{s-y^2 } \right) +1 -\theta \left(\sqrt{s-y^2 } -a \right) \right) $$ Note that this is manifestly even in $y$, so we can perform the subsequent $y$-integral as $\int_{-a}^{a} dy (\ldots ) = 2\int_{0}^{a} dy (\ldots )$. Now, carefully distinguishing the different cases implied by the step functions, this results in \begin{eqnarray} \int_{-a}^{a} dy\, \int_{-a}^{a} dx\, \delta (x^2 +y^2 -s) &=& 2\theta (s) \theta (a^2-s) \int_{0}^{\sqrt{s} } dy\, \frac{1}{\sqrt{s-y^2 } } \\ & & + 2\theta (s-a^2) \theta (2a^2 -s) \int_{\sqrt{s-a^2 } }^{a} dy\, \frac{1}{\sqrt{s-y^2 } } \end{eqnarray} and therefore \begin{eqnarray} \int_{-a}^{a} dy\, \int_{-a}^{a} dx\, \delta (x^2 +y^2 -s) &=& \theta (s) \theta (a^2 -s) \pi \\ & & + 2\theta (s-a^2) \theta (2a^2 -s) \left[ \arcsin \frac{a}{\sqrt{s} } - \arcsin \frac{\sqrt{s-a^2 } }{\sqrt{s} } \right] \end{eqnarray} Now imagine having a quartic instead of a quadratic $\ldots $
-
$\begingroup$ Thanks for your enlightening answer. The only way I can get to deal with that quartic term is the changing variables as $x+y=p,1/x+1/y=1/q$ then you get a quadratic form within the delta function. But this will also introduce the complexity to the integral region :( $\endgroup$– GuoqingCommented Jul 27, 2023 at 6:00
-
1$\begingroup$ @Guoqing - ah, this transformation may nevertheless get you part of the way there: The $\delta $-function becomes fairly simple, the Jacobian can be evaluated, and the boundaries of the $q$-integral at given $p$ don't seem too complicated, whereupon that $q$-integral should be straightforward. Whether the $p$-integral is anywhere close to tractable is another matter, but it would surely be useful to have only one integral left ... $\endgroup$ Commented Jul 27, 2023 at 14:51