# Numerical integration over given integral. How to do it in Julia?

In my current work I integrate numericaly some function over [0, \infty) using NumPy calling of Fortran libraries. I want to try do my problem using Julia, but I can’t find out-of-the-box library computing integrals.

Can someone tell my how numerical integration look now in Julia? Do I need call Fortran code directly? I try google something, but find almost nothing.

1 Like

Hi, There are several packages for numerical integration in Julia.

5 Likes

More explicitly, do using Pkg; Pkg.add("QuadGK") to install the QuadGK package, and then do

using QuadGK


to compute \int_0^\infty f(x)dx (along with an error estimate) for a function f, to about 3–4 digits.

7 Likes

Does anyone know how to perfom numerical integration on a gpu?

1 Like

5 Likes

this would work, thanks!