0
$\begingroup$

I would appreciate some advice on numerically integrating the following function

\begin{align} I &= \int_a^b f(x) ~dx = \int^b_a \cos\left[\alpha\left(\sqrt{x^2 + \beta_1x + \gamma_1} - \sqrt{x^2 + \beta_2x + \gamma_2}\right)\right] dx. \\ & a,b, \alpha, \gamma_{1,2} \in \mathbb{R}_{>0},~~ \beta_{1,2} \in \mathbb{R} \end{align}

The integrand $f(x)$ is initially highly varying and then stops oscillating as can be seen in the plot of f(x). The boundary between the regions is given by \begin{align} c = \frac{\alpha[4(\gamma_1-\gamma_2) + (\beta_2 - \beta_1)]}{16\pi}. \end{align}

What numerical integration methods would be suitable for the two regions?

$\endgroup$
  • $\begingroup$ The graph show a function which is not even continuous at 0. Is this a part on the integration domain? $\endgroup$ – user14717 Jun 26 '17 at 15:35
  • $\begingroup$ @user14717: It is continuous at 0, however it is oscillating very rapidly. $\endgroup$ – jw217 Jun 26 '17 at 16:27
  • $\begingroup$ Use tanh-sinh quadrature with extended precision. The extended precision will help cope with the horrific condition number of the summation problem. $\endgroup$ – user14717 Jun 26 '17 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.