4

Are there methods to analytically compute this integral, composed of the maximum function, $max(\exp(x_{0})-\exp(z_{0}), 0)$, and exponential functions?

$$\iint_{-\infty}^{\infty}\tilde{A}\max(\exp(x_{0})-\exp(z_{0}), 0)\exp(A_{2}(x_{M}-x_{0})^2)\exp(2A_{2}\alpha_{1}(x_{M}-x_{0}))\exp(-2A_{2}\Omega(x_{M}-x_{0}+\alpha_{1})(z_{M}-z_{0}))\exp(A_{2}\Omega^2(z_{M}-z_{0})^{2})\exp(A_{5}(z_{M}-z_{0}))\exp(A_{6}(z_{M}-z_{0})^{2})dx_{0}dz_{0}$$

$\tilde{A},A_{2},\alpha_{1},\Omega,A_{5},A_{6},x_{M},z_{M}$ are constants. Specifically, $\tilde{A},A_{2},A_{5},A_{6}$ are negative, while the others take on any real number.

So now let $x_{M}-x_{0}= {x}'$ and $z_{M}-z_{0}= {z}'$.

We transform the integral to:

$$\iint_{\infty}^{-\infty}\tilde{A}\max(\exp(x_{M}-{x}')-\exp(z_{M}-{z}'), 0)\exp(A_{2}({x}')^2)\exp(2A_{2}\alpha_{1}({x}'))\exp(-2A_{2}\Omega({x}')({z}'))\exp(A_{2}\Omega^2({z}')^{2})\exp((A_{5}-2A_{2}\Omega\alpha_{1})({z}'))\exp(A_{6}({z}')^{2})d{x}'d{z}'$$

where the limits have changed because of the substitution.

The exponent can now elegantly be written as:

$$\left ( {x}', {z}' \right )\begin{pmatrix} A_{2} & -A_{2}\Omega \\ -A_{2}\Omega & A_{6}+A_{2}\Omega^2 \end{pmatrix}\left ( {x}', {z}' \right )^{T} +\left ( 2A_{2}\alpha_{1},(A_{5}-2A_{2}\Omega\alpha_{1}) \right )\left ( {x}', {z}' \right )^{T}$$

and by letting $ \hat{A}=\begin{pmatrix} A_{2} & -A_{2}\Omega \\ -A_{2}\Omega & A_{6}+A_{2}\Omega^2 \end{pmatrix}$ and $ J=\left ( 2A_{2}\alpha_{1},(A_{5}-2A_{2}\Omega\alpha_{1})\right )$

The integral becomes $$\iint_{\infty}^{-\infty}\tilde{A}\max(\exp(x_{M}-{x}')-\exp(z_{M}-{z}'), 0)\exp(\left ( {x}', {z}' \right )\hat{A}\left ( {x}', {z}' \right )^{T}+J\left ( {x}', {z}' \right )^{T})d{x}'d{z}'$$


I have tried doing a simpler integral:

$\iint_{-\infty}^{\infty}\tilde{A}\max(\exp(x_{0})-\exp(z_{0}), 0)\exp(A_{1}(x_{M}-x_{0}-\alpha_{1})^2)\exp(A_{6}(z_{M}-z_{0}-\alpha_{2})^{2})dx_{0}dz_{0}$

but still can not reach a closed-form solution involving error function, dilogarithms, etc ...

TheDawg
  • 71
  • The expression can be simplified and written as an exponent of some inner product, the problem is I dont understand how double integration with the maximum function is done. – TheDawg Feb 15 '21 at 14:13
  • Just integrate over the region $-\infty <z < \infty,\ z< x<\infty$, and replace$\max(x-z, 0)$ by $x-z$. – saulspatz Feb 15 '21 at 14:34
  • Right but how does one integrate within this region given such exponential function. The exponent can be cast into an inner product and the standard wick theorem for Gaussian can be done, but in this case the region is different. – TheDawg Feb 15 '21 at 14:40
  • I don't know; you know more about this than I do. It's best to write what you know about the problem in your post, so that readers can judge what your background is. – saulspatz Feb 15 '21 at 14:44

1 Answers1

4

HINT.

The first integral can be presented in the form of $$I=\iint\limits_{-\infty}^{\infty}\tilde{A}\max\left(e^{\large x_0}-e^{\large z_0}, 0\right)e^{\large P_{20}(\vec v_0,x_0,z_0)}\,\text dz_0\,\text dx_0,$$ where $$\vec v_0 = \{x_M,z_M,A_2,A_5,A_6,\alpha_1,\Omega\},$$ $$P_{20}(\vec v_0, x_0, z_0) = A_{2}\bigg((x_{M}-x_{0})^2+2\alpha_{1}(x_{M}-x_{0})-2\Omega(x_{M}-x_{0})(z_{M}-z_{0}))$$ $$+\Omega^2(z_{M}-z_{0})^{2}\bigg) +(A_{5}-2\Omega\alpha_1)(z_{M}-z_{0})+A_{6}(z_{M}-z_{0})^{2},$$ or $$I=\iint\limits_{-\infty}^{\infty}\tilde{A}\max\left(e^{\large x_C+x_M}-e^{\large z_C+z_M }, 0\right)e^{\large P_{2C}(\vec v_C,x_C,z_C)}\,\text dz_C\,\text dx_C,\tag1$$ where \begin{cases} \vec v_C = \{A_2,A_5,A_6,\alpha_1,\Omega\}\\[4pt] P_{2C}(\vec v_C, x_C, z_C) = A_{2}\big(x_C^2-2\alpha_1x_C-2\Omega x_C z_C+\Omega^2z_C^2\big)\\[4pt] \qquad\qquad\qquad\;-(A_{5}-2\Omega\alpha_1)z_C+A_{6}z_C^2.\tag2 \end{cases} Transformation of the coordinates in the form of $$x_C+iz_C = (x_R+iz_R)e^{\large i\varphi} + x_D +iz_D\tag3$$ should lead from $(2)$ to the expression in the form of $$P_{2R}(\vec p, x_R, z_R)= p_{xx} x_R^2+p_{zz} z_R^2+p_0.\tag4$$ This allows to get a system of equations for unknowns $\;x_D,z_D,\varphi.\;$


Really, from $(3)$ should

  • $$\dbinom{x_C}{z_C}=\dbinom{x_R\cos\varphi-z_R\sin\varphi+x_D} {x_R\sin\varphi+z_R\cos\varphi+z_D},$$
  • $$P_{2C}(\vec v_C, x_C, z_C) = p_{xx}x_R^2+p_{xz}x_Rz_R+p_{zz}z_R^2+p_x x_R+p_z z_R+p_0,$$ where $p_{xx},p_{xz},p_{zz},p_{x},p_{z},p_{0}$ are functions of $v_C$.

Obtaining $x_D,z_D,\varphi$ from the system $p_{xz}=p_x=p_z=0,$ we should get $(4).$


At the same time, is known closed form of the integral $$I=\int\limits_{-\infty}^\infty \int\limits_{ax+b}^\infty e^{\large -x^2-z^2} \, \text dx\, \text dz = \dfrac\pi2 \operatorname{erfc}\left(\dfrac b{\sqrt{1+a^2}}\right)\tag5$$ (pointed by DinosaurEgg), and this allows to get the closed form of the given integral.

Polar coordinates

Let $x=r\cos t,\,z=r \sin t.$

If $\;a>0,\,b>0,\;$ then the angle coordinate corresponds to line $\;z=ax+b,\;$ when $\;t\in(\arctan a,\pi+\arctan a).$

The polar radius can be obtained from the equation $\;a r \cos t +b = r \sin t,\;$ with the result $r=\dfrac b{|\sin t - a\cos t|}=\dfrac b{\sqrt{a^2+1}\cos(t-\arctan a)}.$ Therefore, $$I=\int\limits_{\arctan a}^{\pi+\arctan a} \int\limits_{\large \frac b{\sqrt{a^2+1}\cos(t-\arctan a)}}^\infty e^{\large -r^2} \, \text dr\, \text dt =\dfrac12 \int\limits_{0}^{\pi} e^{\left({\large \frac b{\sqrt{a^2+1}\cos t}}\right)^2} \, \text dt,$$ $$I= \dfrac\pi2 \operatorname{erfc}\left(\dfrac b{\sqrt{1+a^2}}\right).$$ Integration


About the factor with $\;\max\;$ function:

  • Equation $(3)$ defines a linear transformation.
  • Exponential function is monotonic.
  • $\max\left(e^{\large x_C+x_M}-e^{\large z_C+z_M}, 0\right)=\left(e^{\large x_C+x_M}-e^{\large z_C+z_M}\right)h\left(x_C+x_M-z_C-z_M\right).$
  • $\;I=I^\star - I^\diamond,\;$ where $$I^\star=\iint\limits_{-\infty}^{\infty}\tilde{A}h\left(x_C+x_M-z_C-z_M\right)e^{x_C+x_M+\large P_{2C}(\vec v_C,x_C,z_C)}\,\text dz_C\,\text dx_C,$$ $$I^\diamond =\iint\limits_{-\infty}^{\infty}\tilde{A}h\left(x_C+x_M-z_C-z_M\right)e^{z_C+z_M+\large P_{2C}(\vec v_C,x_C,z_C)}\,\text dz_C\,\text dx_C,$$ $\hspace{100mu}h(t)=\begin{cases} 1,\; \text{if} \;t>0\\ 0,\; \text{otherwize} \end{cases}\quad$ is the Heaviside step function.

Therefore, we have $\;P_{2C}^\star =P_{2C}+x_C+x_M,\;P_{2C}^\diamond =P_{2C}+z_C+z_M,\;$ with the same transformation technique.

On the other hand:

  • Equation $(4)$ can define ellipse, parabola or hyperbola.
  • Integral $(1)$ diverges in the hyperbolic case.
  • Integral $(1)$ can be easily calculated in the parabolic case.
  • Integral $(1)$ can be calculated via $(5)$ in the elliplic case.

  • Is the form $\int_{-\infty}^\infty \int_{ax+b}^\infty e^{\large -x^2-z^2} , \text dx, \text dz= \pi-\frac{\pi}{2}\text{erfc}(b/\sqrt{1+a^2})$ not closed enough? – DinosaurEgg Feb 17 '21 at 20:45
  • @DinosaurEgg If ;$a=b=1;$ then LHS=0.49843, RHS=2.64316 :( – Yuri Negometyanov Feb 17 '21 at 21:31
  • 1
    Yes I apologize for I made a mistake $\int_{-\infty}^{\infty}\int_{ax+b}^{\infty}dx dz e^{-x^2-z^2}=\frac{\pi}{2}\text{erfc}(b/\sqrt{1+a^2})$ – DinosaurEgg Feb 17 '21 at 22:17
  • Thanks for your answer, tough I am not sure what you intend by $\vec v$, do you intend by the list of all constants? Also, using your substitution, you say we can solve for constants $x_D,z_D,\varphi$, where does $p_{0}$ come from ? Assuming equation (4), I dont see how that leads to equation (5), especially because we need to take into consideration the maximum function and upon your substitution (3), the integral limits are certainly non-trivial, I am not sure myself what the limits become upon substitution (3). – TheDawg Feb 18 '21 at 09:11
  • @TheDawg Thank you for the constructive comment. The answer is detalized. – Yuri Negometyanov Feb 18 '21 at 14:08
  • Thanks, so what you are saying is to cast the exponent in such a form to only preserve quadratics, and from there, given the nature of the prefactor of the quadratic terms, I should be able to find a closed form solution. What are the conditions you lay regarding hyperbolic, parabolic ,elliptic ? – TheDawg Feb 18 '21 at 16:48
  • @TheDawg If production $p_{xx} p_{zz}$ is positive, then elliptic; negative -hyperbolic; if zero - parabolic. – Yuri Negometyanov Feb 18 '21 at 17:08
  • So how would you cast, for example, $;P_{2C}^\star$ , into quadratic terms ? I don't see how it can be simplified. Given that, once it is in quadratic terms, then the integral can be performed and then inverse transform back into original variables. – TheDawg Feb 18 '21 at 17:32
  • @TheDawg You may use the substitution $(3)$ to change coordinates. – Yuri Negometyanov Feb 18 '21 at 17:49
  • I understand, but how do you cast P into the form of (4), with the additional terms in computing the integral with the max function? It seems unreasonable to plug expressions for $x_{C}, z_{C}$ and try to obtain only quadratic terms in $x_{R}, z_{R}$. I will get terms in cosine, sine and would have to find those free parameters that cast P into quadratic form, which leads to non linear equations . – TheDawg Feb 18 '21 at 18:33
  • @TheDawg The final formulas (with $\star, \diamond$) does not contain "max". At the same time, Heaviside function directly influent to the limits of integration, and nothing more. – Yuri Negometyanov Feb 18 '21 at 20:02
  • @TheDawg Non-linear equations give three constans. All the other transformstions are linear. – Yuri Negometyanov Feb 18 '21 at 20:09
  • I checked, I believe (5) should be $$\dfrac\pi2 (1-\operatorname{erfc}\left(\dfrac b{\sqrt{1+a^2}}\right))$$ – TheDawg Feb 19 '21 at 19:03
  • @TheDawg Explanations in the answer. – Yuri Negometyanov Feb 19 '21 at 20:24
  • @YuriNegometyanov Thanks! What is wrong with the following argument : $$\int_{-\infty}^{\infty}\int_{az+b}^{\infty}e^{-x^{2}}e^{-z^{2}}dxdz = \int_{-\infty}^{\infty}-\frac{\sqrt\pi}{2}(erfc(az+b)-1)e^{-z^{2}}dz= -\frac{\sqrt\pi}{2}(\sqrt\pi erfc(\frac{b}{\sqrt{1+a^{2}}})-\sqrt\pi)$$ – TheDawg Feb 19 '21 at 22:05
  • @TheDawg I have not a table with the last integral. My question is::Have you any solution in the closed form? – Yuri Negometyanov Feb 19 '21 at 22:55
  • @YuriNegometyanov The $ erfc(az + b)e^{-z^{2}}$ integral is standard, so how come we obtain two different formulas? And sorry, I do not understand you last comment. – TheDawg Feb 19 '21 at 23:03
  • @TheDawg erfc$(\infty)=0.$ – Yuri Negometyanov Feb 19 '21 at 23:26
  • @YuriNegometyanov erfc($\infty$) is definitely not 0, what definition are you using? – TheDawg Feb 20 '21 at 08:51
  • @TheDawg Discussion transforms to offtopic See right value in my ansswer. – Yuri Negometyanov Feb 20 '21 at 12:09
  • @YuriNegometyanov sorry i don’t understand, if you use (5) for a=1 and b=1, you get 1.07 while the correct answer using online integration packages is 0.49. What’s happening? – TheDawg Feb 20 '21 at 13:54
  • @YuriNegometyanov So erfc is not the same as erf, I’ve checked on wolfram and both your solution (5) and my solution in the comment section are equivalent. I didn’t know erfc was different to erf. – TheDawg Feb 20 '21 at 15:03