Monte Carlo Integration - function np.sin(θ)^24) / (θ^2) where 0<θ<∞ .
How can we integrate this function over a bounded domain and get an accurate result and what bounds should you choose to get a result within 0.001 of the correct solution?
All help welcome.
One option: Find $g$ such that $$\int_0^\infty f(x)\,\mathrm dx = \int_0^1 g(x)\,\mathrm dx.$$
But I suppose, you are expected to find $h$ such that $|f(x)|\le h(x)$ and $H(a):=\int_a^\infty h(x)\,\mathrm dx$ is easily computed formally. Then find $a$ to make $H(a)<\frac12\epsilon$ and compute $\int_0^af(x)\,\mathrm dx$ numerically with an expected error $<\frac12\epsilon$ as well.