# How to handle special functions?

## Solution

Find your special functions in "/usr/include/boost/math/special_functions/".

## Details

### Elliptic integrals

```  #include <boost/math/special_functions/ellint_1.hpp> // header file for F(k,phi), the elliptic integral of the 1st kind
#include <boost/math/special_functions/ellint_2.hpp> // header file for E(k,phi), the elliptic integral of the 2nd kind
#include <iostream> //for output

int main(void)
{
std::cout << boost::math::ellint_1(0.5,0.7) << std::endl;
std::cout << boost::math::ellint_2(0.5,0.7) << std::endl;
std::cout << boost::math::ellint_1(0.5) << std::endl;
std::cout << boost::math::ellint_2(0.5) << std::endl;

return 0;
}
```

The 1st and the 2nd arguments are the modulus "k" and the "angle" respectively. If the second argument is omitted, the functions return the values of the complete elliptic integrals, namely K(k) and E(k) respectively.

### Modified Bessel function of the 1st kind

```  #include <boost/math/special_functions/bessel.hpp> //header file
#include <iostream> //for output

int main(void)
{
std::cout << boost::math::cyl_bessel_i(0,0.5) << std::endl;
return 0;
}
```

The 1st argument is the order (real), and the 2nd is the point to compute (complex). For instance, cyl_bellel_i(0,0.5) returns the value of I_0(0.5).