Object-oriented Scientific Computing Library: Version 0.910
Public Member Functions | Protected Member Functions | Protected Attributes
gsl_inte_qawf_sin< func_t > Class Template Reference

Adaptive integration for oscillatory integrals (GSL) More...

#include <gsl_inte_qawf.h>

Inheritance diagram for gsl_inte_qawf_sin< func_t >:
gsl_inte_qawo_sin< func_t > gsl_inte_cheb< func_t > gsl_inte_transform< func_t > gsl_inte_singular< func_t > gsl_inte_kronrod< func_t > gsl_inte inte< func_t > gsl_inte_qawf_cos< func_t >

Detailed Description

template<class func_t>
class gsl_inte_qawf_sin< func_t >

The Fourier integral

\[ \int_a^{\infty} f(x) \sin(\omega x)~dx \]

is computed for some frequency parameter $ \omega $, stored in gsl_inte_qawo_sin::omega .

The integral is computed using the same method as gsl_inte_qawo_sin and gsl_inte_qawo_cos over each of the subintervals,

\begin{eqnarray*} C_1 &=& [a, a+c] \\ C_2 &=& [a+c, a+2c] \\ &\vdots & \\ C_k &=& [a +(k-1)c,\, a+kc], \end{eqnarray*}

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 GSL-based integration routines 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 gsl_inte_qawo_sin and the overall integration progress in this class.

Definition at line 88 of file gsl_inte_qawf.h.

Public Member Functions

virtual int integ_err (func_t &func, double a, double b, double &res, double &err)
 Integrate function func from a to b and place the result in res and the error in err.

Protected Member 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()
virtual double transform (double t, func_t &func)
 Add the oscillating part to the integrand.
const char * type ()
 Return string denoting type ("gsl_inte_qawf_sin")

Protected Attributes

gsl_inte_workspacecyclew
 The integration workspace.

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.