Problem consist in simplifying complicated multiple numerical integral, where I know analytical solution for a subset of them. Integrand is of the form
E^(I vecr.A + I vecrp.B + I (vecr.C + vecrp.D)) (vecr.D vecrp.C - vecr.vecrp D.C),
where vecr
, vecrp
, A
, B
, C
and D
are real 3-vectors. I know the analytical solution of a double integral over vecr and vecrp and I want to substitute them, so Mathematica needs to recognize that ''Integral over vecr...*Exp[...*r]->f[r]'' and ''Integral over vecrp...*Exp[...*rp]->f[rp]''. vecr is given by
vecr = {r*Sqrt[1 - μ^2]*Cos[φ], r*Sqrt[1 - μ^2]*Sin[φ], r*μ};
and similarly for vecrp.
Problem with the brute force approach where Mathematica does this analytical calculations is that it needs too much time (I haven't seen that Mathematica finishes the calculation at all).
Solution of
Table[Integrate[ vecr[[i]]*r^2*Exp[I*veck.vecr], {φ, 0, 2*Pi}, {μ, -1, 1}, {r, 0, R}] , {i, 1, Length[vecr]}]
is
I*12*Pi*R^5*(Sin[k*R]/(k*R)^5 - Cos[k*R]/(k*R)^4 - Sin[k*R]/(3*(k*R)^3))*veck,
where
veck = {k*Cos[φk]*Sqrt[1 - μk^2], k*Sin [φk]*Sqrt[1 - μk^2], k*μk}
For a toy-example
Integrate[y*Exp[-t], {x, 0, \[Infinity]}, {y, 1, 5}
where I know that
Integrate[y, {y, 1, 5}]
is equal to 12 I tried
a[t_] := HoldForm[Integrate[y*Exp[-t], {x, 0, \[Infinity]}, {y, 1, 5}]]
a[t] /. HoldForm[Integrate[y, {y, 1, 5}] -> 12]
but it doesn't work.