I want to calculate integral of implicit function containing imaginary numbers
$$\int\limits_0^1 f(iz) \, \mathrm{d}z$$
where $f(iz)$ is something like:
$$f(iz)=\int\limits_{0.3}^{0.9} g(ix) \mathrm{d}x$$
and $g(ix)$ is something like:
$$g(ix)=e^{ixz}$$
I want to calculate it numerically. Python scipy.quad doesn't calculate integrals of imaginary numbers. Quadpy isn't efficient also. So I am thinking about dividing integrals like in the way shown below (where $\operatorname{Re}$ is real part and $\operatorname{Im}$ is imaginary part):
$$ \int f(iz) dz = \int \operatorname{Re} f(iz) \mathrm{d}z + \int \operatorname{Im} f(iz) \mathrm{d}z$$
and continuing:
$$ \int f(iz) \mathrm{d}z = \int \operatorname{Re} \left[ \int \operatorname{Re} g(ix) \mathrm{d}x + \int \operatorname{Im} g(ix) \mathrm{d}x\right] \mathrm{d}z + \int \operatorname{Im} \left[ \int \operatorname{Re} g(ix) \mathrm{d}x + \int \operatorname{Im} g(ix) \mathrm{d}x\right]\mathrm{d}z$$ Can I do that?
You can use Sympy to approximate it directly.