# §11.13 Methods of Computation

## §11.13(i) Introduction

Subsequent subsections treat the computation of Struve functions. The treatment of Lommel and Anger–Weber functions is similar. For a review of methods for the computation of $\mathop{\mathbf{H}_{\nu}\/}\nolimits\!\left(z\right)$ see Zanovello (1975).

## §11.13(ii) Series Expansions

Although the power-series expansions (11.2.1) and (11.2.2), and the Bessel-function expansions of §11.4(iv) converge for all finite values of $z$, they are cumbersome to use when $|z|$ is large owing to slowness of convergence and cancellation. For large $|z|$ and/or $|\nu|$ the asymptotic expansions given in §11.6 should be used instead.

For numerical purposes the most convenient of the representations given in §11.5, at least for real variables, include the integrals (11.5.2)–(11.5.5) for $\mathop{\mathbf{K}_{\nu}\/}\nolimits\!\left(z\right)$ and $\mathop{\mathbf{M}_{\nu}\/}\nolimits\!\left(z\right)$. Subsequently $\mathop{\mathbf{H}_{\nu}\/}\nolimits\!\left(z\right)$ and $\mathop{\mathbf{L}_{\nu}\/}\nolimits\!\left(z\right)$ are obtainable via (11.2.5) and (11.2.6). Other integrals that appear in §11.5(i) have highly oscillatory integrands unless $z$ is small.

For complex variables the methods described in §§3.5(viii) and 3.5(ix) are available.

## §11.13(iv) Differential Equations

A comprehensive approach is to integrate the defining inhomogeneous differential equations (11.2.7) and (11.2.9) numerically, using methods described in §3.7. To insure stability the integration path must be chosen so that as we proceed along it the wanted solution grows in magnitude at least as rapidly as the complementary solutions.

Suppose $\nu\geq 0$ and $x$ is real and positive. Then from the limiting forms for small argument (§§11.2(i), 10.7(i), 10.30(i)), limiting forms for large argument (§§11.6(i), 10.7(ii), 10.30(ii)), and the connection formulas (11.2.5) and (11.2.6), it is seen that $\mathop{\mathbf{H}_{\nu}\/}\nolimits\!\left(x\right)$ and $\mathop{\mathbf{L}_{\nu}\/}\nolimits\!\left(x\right)$ can be computed in a stable manner by integrating forwards, that is, from the origin toward infinity. The solution $\mathop{\mathbf{K}_{\nu}\/}\nolimits\!\left(x\right)$ needs to be integrated backwards for small $x$, and either forwards or backwards for large $x$ depending whether or not $\nu$ exceeds $\tfrac{1}{2}$. For $\mathop{\mathbf{M}_{\nu}\/}\nolimits\!\left(x\right)$ both forward and backward integration are unstable, and boundary-value methods are required (§3.7(iii)).

## §11.13(v) Difference Equations

Sequences of values of $\mathop{\mathbf{H}_{\nu}\/}\nolimits\!\left(z\right)$ and $\mathop{\mathbf{L}_{\nu}\/}\nolimits\!\left(z\right)$, with $z$ fixed, can be computed by application of the inhomogeneous difference equations (11.4.23) and (11.4.25). There are similar problems to those described in §11.13(iv) concerning stability. In consequence forward recurrence, backward recurrence, or boundary-value methods may be necessary. See §3.6 for implementation of these methods, and with the Weber function $\mathop{\mathbf{E}_{n}\/}\nolimits\!\left(x\right)$ as an example.