Computes the Struve function Hv(x)

View versions (1)

Interface

#include <codecogs/maths/special/bessel/struve.h>

using namespace Maths::Special::Bessel;

The Struve function, denoted H_n(x) is defined as

H_v(x) = \left ( \frac{1}{2} x \right )^{v+1} \sum_{k=0}^{\infty} \frac{(-1)^k (\frac{1}{2}x)^2k }{ \Gamma(k+\frac{3}{2}) \Gamma(k+v+\frac{3}{2}) }
(1)

where \Gamma(x) is the gamma function.

Struve function
Struve function

The function computes the Struve function Hv(x) of order v, argument x. Negative x is rejected unless v is an integer.

This module also contains the hypergeometric functions 1F2 and 3F0 and a routine for the Bessel function Yv(x) with noninteger v.

Crossover points between ascending series and asymptotic series for Struve function <pre> v x 0 19.2 1 18.95 2 19.15 3 19.3 5 19.7 10 21.35 20 26.35 30 32.31 40 40.0 </pre>

References

Cephes Math Library Release 2.0: April, 1987; http://mathworld.wolfram.com/StruveFunction.html

Example 1

#include <stdio.h>
#include <codecogs/maths/special/bessel/struve.h>

int main()
{
  printf("\nStruve\n  x      v=0      v=1      v=2      v=3      v=4      v=5");
  for(double x=-5; x<6; x++)
  {
    printf("\nx=%.1lf",x);
    for(int v=0;v<=5;v++)
      printf(" %8.6lf", Maths::Special::Bessel::struve(x,v));
  }
  return 0;
}

Output

Struve
x      v=0      v=1      v=2      v=3      v=4      v=5
x=-5.0 0.185217 0.807812 -1.569375 1.508721 -0.998971 0.510678
x=-4.0 -0.135015 1.069727 -1.248675 0.858010 -0.426374 0.167199
x=-3.0 -0.574306 1.020110 -0.742387 0.351711 -0.124738 0.035491
x=-2.0 -0.790859 0.646764 -0.280318 0.083638 -0.019099 0.003538
x=-1.0 -0.568657 0.198457 -0.040465 0.005843 -0.000654 0.000060
x=0.0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
x=1.0 0.568657 0.198457 0.040465 0.005843 0.000654 0.000060
x=2.0 0.790859 0.646764 0.280318 0.083638 0.019099 0.003538
x=3.0 0.574306 1.020110 0.742387 0.351711 0.124738 0.035491
x=4.0 0.135015 1.069727 1.248675 0.858010 0.426374 0.167199
x=5.0 -0.185217 0.807812 1.569375 1.508721 0.998971 0.510678

Parameters

x
the point at which the function is evaluated
v
the order of the function

Returns

the Struve function of order v evaluated at point x
GPL Licence — free for non commercial use. See Licence details.

Interactive Calculator

x
v
Result