The form of my problem is as follows:
$\Psi=C\int_{-\infty}^\infty\int_{-\infty}^\infty\left(f(x,y)\times \left(\int_0^t g(x,t)dt\right)dxdy\right)$
I have already attempted numerical solutions using Matlab's integrate3
, without success.
However integrate3
is meant for problems of the form:
$\Psi=\int_a^b\int_c^d\int_e^f f(x,y,z)dxdydz$
Similarly, attempts made with scipy's integration toolkit have also not borne fruit.
I have attempted to first calculate $\int_0^tg(x,t)$ at discrete $x$ values and then place it in $\Psi$ but for rather obvious reasons that does not work either.
Additionally, $g(x,t)$ cannot be factored in the form of $h(x)\times i(t)$, which might have allowed for a by parts solution which might be integrated symbolically (for x) and numerically for t.
Also $\int_0^t\int_{-\infty}^{\infty} g(x,t)$ has singularities at multiple points.
Is there a mathematica method to solve this?
From the documentation I see mathematica seems to handle only region level integrations with integrate, so perhaps a linear solution in $t$ with a corresponding region integration over $x$ and $y$?
UPDATE
More specifically, I'm trying to reproduce the work of Shen et. al. so my equations are
shenPhiG[_g,_t]:= (1/(1+2(t/tc)))(1-Exp[(-2m*g/(1+2(t/tc)))])
shenU[_g]:=Exp[-(1+I*v)g]
NIntegrate[shenPhiG[g]*Exp[-I*(theta/tc)*NIntegrate[shenPhiG[g,t],{t,0,tf}]],{x, -Infinity, Infinity}, {y, -Infinity, Infinity}]
I've tried with tf as 5 or 10000 but I always get
NIntegrate::inumr : The integrand shenPhiG[g,t] has evaluated to non-numerical values for all sampling points in the region with boundaries {{0,1000}}.
UPDATE 2
The equations being modeled are given in the paper (in spherical coordinates, hence the reduction of integrals) as:
$\Theta=\frac{\theta}{t_c}\int_0^t\frac{1}{1+\frac{2t^\prime}{t_c}}\left[1-\mathrm{exp}\left(\frac{-2mg}{1+2\frac{t^\prime}{t_c}}\right)dt^\prime\right]$
and
$U_p=C\int_0^\infty \mathrm{exp}[-(1+\mathrm{i}V)g]\mathrm{exp}(-\mathrm{i}\Theta) dg$
With the approximation $\mathrm{exp}(-\mathrm{i}\Theta)\approx1-\mathrm{i}\Theta$
$U=C\int_0^{\infty}(1-\mathrm{i}\Theta)\mathrm{exp}[-(1+\mathrm{i}V)g]dg$
The form I've explained in the original question is obtained on converting to Cartesian coordinates.
Upon using
shenPhi[g_,t_]:=(1/(1+2(t/tc)))(1-Exp[(-2m*g/(1+2(t/tc)))])
and
shenU[g_]:=Exp[-(1+I*v)*g]NIntegrate[shenPhiG[g]*Exp[-I*(theta/tc)*
Integrate[shenPhiG[g,t], {t, 0, tf}]],
{g, -Infinity, Infinity}]
I get no output at all..
With
shenU[_g,t_]=Exp[-(1+I*v)*g]NIntegrate[shenPhiG[g]
*Exp[-I*NIntegrate[shenPhiG[g,t],{t,0,tf}]],{g,-Infinity,Infinity},{t,-Infinity,Infinity}
and
shenPhi[g_,t_]:=(theta/tc)(1/(1+2(t/tc)))(1-Exp[(-2m*g/(1+2(t/tc)))])
I get
NIntegrate::inumr: The integrand $\frac{1-\mathrm{exp}\left(-\frac{2g}{1+Times[<<2>>]} \right)}{1+\frac{t}{2542}}$ has evaluated to non-numerical values for all sampling points in the refion with boundaries {{0,50000}}.
Throw::nocatch:
Uncaught Throw[-HolonomicDifferentialRootReduceDump
y[NIntegrateLevinRuleDump
x\$373597]+HolonomicDifferentialRootReduceDump
y'[NIntegrateLevinRuleDump
x\$373597],NIntegrateLevinRuleDump
FastLookupHolonomicDifferentialEquation] returned to top level.
NIntegrate
can probably make a decent attempt at this problem directly, but depending on the form of $f(x,y)$ and $g(x,t)$, there may be better alternatives. $\endgroup$NIntegrate
requires a range and also seems to meant for problems likeintegrate3
$\endgroup$_g
inshenPhiG[_g,...
a typo? If not, it's an error. You should haveg_
instead of_g
. $\endgroup$