I have a long formula
-0.0579484 kx ((Sin[-3.2 kx] Cos[Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] t])/Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] (Sqrt[0.0232723 + kx^2 + ky^2 + kz^2]/(0.0232723 + kx^2 + ky^2 + 0.00008649 kz^2) + 1/Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] (kx^2 + ky^2 + kz^2)/(-kx^2 - ky^2 - 0.00008649 kz^2)) + (Cos[-3.2 kx] Sin[Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] t])/Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] ((-0.999957 kz)/(0.0232723 + kx^2 + ky^2 + 0.00008649 kz^2) + (-0.999957 kz)/(-kx^2 - ky^2 - 0.00008649 kz^2)) + (Sin[-3.2 kx] Cos[-0.999957 kz t] + Cos[-3.2 kx] Sin[-0.999957 kz t])/(-0.0232723 - kx^2 - ky^2 - 0.00008649 kz^2) + Sin[-3.2 kx] 0.0232723/(0.0232723 + kx^2 + ky^2 + kz^2)1/(-kx^2 - ky^2 - 0.00008649 kz^2))
which I want to integrate over $\int kx \, ky \, kz$ and plot over $t$.
I can integrate the elements of the sum separately and add them at the end. The elements are
I:
-0.0579484 kx ((Sin[3.2 kx] Cos[Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] t])/Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] Sqrt[0.0232723 + kx^2 + ky^2 + kz^2]/(0.0232723 + kx^2 + ky^2 + 0.00008649 kz^2))
II:
-0.0579484 kx ((Sin[3.2 kx] Cos[Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] t])/Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] 1/Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] (kx^2 + ky^2 + kz^2)/(-kx^2 - ky^2 - 0.00008649 kz^2))
III:
-0.0579484 kx ((Cos[3.2 kx] Sin[Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] t])/Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] (0.999957 kz)/(0.0232723 + kx^2 + ky^2 + 0.00008649 kz^2))
IV:
-0.0579484 kx ((Cos[3.2 kx] Sin[Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] t])/Sqrt[0.0232723 + kx^2 + ky^2 + kz^2] (0.999957 kz)/(-kx^2 - ky^2 - 0.00008649 kz^2))
V:
-0.0579484 kx ((Sin[3.2 kx] Cos[0.999957 kz t] + Cos[3.2 kx] Sin[0.999957 kz t])/(0.0232723 - kx^2 - ky^2 - 0.00008649 kz^2))
VI:
-0.0579484 kx (Sin[3.2 kx] 0.0232723/(0.0232723 + kx^2 + ky^2 + kz^2)1/(-kx^2 - ky^2 - 0.00008649 kz^2))
The V and VI is the only part which I know how to compute with correct results. The method is as follows: First, I Integrate the formula V analytically over $ky$ and $kz$
f = Assuming[{kz \[Element] Reals && kz != 0 && kx \[Element] Reals && ky \[Element] Reals && t \[Element] Reals}, Integrate[-0.0579484 kx ((Sin[3.2 kx] Cos[0.999957 kz t] + Cos[3.2 kx] Sin[0.999957 kz t])/(0.0232723 - kx^2 - ky^2 - 0.00008649 kz^2)), {kz, -\[Infinity], \[Infinity]}, {ky, -\[Infinity], \[Infinity]}]]
Then, I numerically integrate the result over $kx$
Nf[t_] := NIntegrate[fV2, {kx, -\[Infinity], \[Infinity]}, Method -> "LevinRule"];
(Integrating first over $kx$ and $ky$ and then numerically over $kz$ works too)
Finally I plot the result as
Plot[Nf[t], {t, -2, 2}, PlotRange -> {{-0.2, 0.2}, All}]
The above method was provided here https://mathematica.stackexchange.com/a/276353/88922 and works only for the V and VI case.
For I-IV I tried integrating over $kx$, $ky$, $kz$ separately and for I-II Mathematica doesn't provide any result, for III-IV integrating over $kx$ or $kz$ gives 0, over $ky$ - nothing.
Method of V works on VI as wellAny ideas how to approach the topic? How to integrate the I-IV formulas over $kx$, $ky$, $kz$?
P.S. I couldn't integrate analytically over all of the three k variables at once - no results, and integrating fully numerically is too slow.
WorkingPrecision
in yourNIntegrate
statements. $\endgroup$Integrate
) and inexact coefficients (like decimal-point numbers) sometimes don't mix well (because, for instance, round-off error prevent cancellation of what should be equal terms). So rationalizing as Bill suggested might help withIntegrate
, too. $\endgroup$Integrate
are the same - integrals that weren't computing still aren't. $\endgroup$