Class inte_qawf_gsl_sin (o2scl)¶
-
template<class
func_t
>
classo2scl
::
inte_qawf_gsl_sin
: public o2scl::inte_qawo_gsl_sin<func_t>¶ Adaptive integration for oscillatory integrals (GSL)
The Fourier integral
\[ \int_a^{\infty} f(x) \sin(\omega x)~dx \]is computed for some frequency parameter \( \omega \), stored in inte_qawo_gsl_sin::omega .The integral is computed using the same method as inte_qawo_gsl_sin and inte_qawo_gsl_cos over each of the subintervals,
\[\begin{split}\begin{eqnarray*} C_1 &=& [a, a+c] \\ C_2 &=& [a+c, a+2c] \\ &\vdots & \\ C_k &=& [a +(k-1)c,\, a+kc], \end{eqnarray*}\end{split}\]where \( c = (2\mathrm{floor}(|\omega|)+1)\pi/|\omega|\). This width is chosen to cover an odd number of periods so that the contributions from the intervals alternate in sign and are monotonically decreasing when \( f \) is positive and monotonically decreasing. The sum of this sequence of contributions is accelerated using the \( \varepsilon \) algorithm.The algorithm uses zero for the relative tolerance inte::tol_rel and attempts to compute the integral to an overall absolute tolerance set by inte::tol_abs. The following strategy is used: on each interval \( C_k\), the algorithm tries to achieve the tolerance
\[ \mathrm{TOL}_k = u_k\cdot \epsilon_{\mathrm{abs}} \]where \( u_k = (1-p)p^{k-1} \) and \( p = 0.9\). The sum of the geometric series of contributions from each interval gives an overall tolerance of \( \epsilon_{\mathrm{abs}}\). If the integration of a subinterval leads to difficulties then the accu racy requirement for subsequent intervals is relaxed,\[ \mathrm{TOL}_k = u_k\cdot \max\{\epsilon_{\mathrm{abs}}, E_1, \ldots, E_{k-1} \} \]where \( E_k\) is the estimated error on the interval \( C_k\).See gslinte_subsect in the User’s guide for general information about the GSL integration classes.
When verbose output is enabled, this class outputs information from both the subintegrations performed by inte_qawo_gsl_sin and the overall integration progress in this class.
- Todo:
More documentation and examples for the qawf, qawo and qawc integrators.
Subclassed by o2scl::inte_qawf_gsl_cos< func_t >
Protected Functions
-
int
qawf
(func_t &func, const double a, const double epsabs, double *result, double *abserr)¶ The full GSL integration routine called by integ_err()
-
const char *
type
()¶ Return string denoting type (“inte_qawf_gsl_sin”)
Protected Attributes
-
inte_workspace_gsl *
cyclew
¶ The integration workspace.